]> git.saurik.com Git - apple/system_cmds.git/blob - KDBG/IOActivity.hpp
system_cmds-643.30.1.tar.gz
[apple/system_cmds.git] / KDBG / IOActivity.hpp
1 //
2 // IOActivity.hpp
3 // KDBG
4 //
5 // Created by James McIlree on 9/2/13.
6 // Copyright (c) 2014 Apple. All rights reserved.
7 //
8
9 #ifndef kdprof_IOActivity_hpp
10 #define kdprof_IOActivity_hpp
11
12 template <typename SIZE>
13 class IOActivity : public TRange<AbsTime> {
14 private:
15 MachineThread<SIZE>* _thread;
16 typename SIZE::ptr_t _size;
17
18 public:
19 IOActivity(AbsTime start, AbsTime length, MachineThread<SIZE>* thread, typename SIZE::ptr_t size) :
20 TRange(start, length),
21 _thread(thread),
22 _size(size)
23 {
24 ASSERT(_thread, "Sanity");
25 ASSERT(_size, "Zero length IO");
26 }
27
28 MachineThread<SIZE>* thread() const { return _thread; }
29 void set_thread(MachineThread<SIZE>* thread) { _thread = thread; }
30
31 typename SIZE::ptr_t size() const { return _size; }
32 };
33
34 #endif