5 // Created by James McIlree on 9/2/13.
6 // Copyright (c) 2014 Apple. All rights reserved.
9 #ifndef kdprof_IOActivity_hpp
10 #define kdprof_IOActivity_hpp
12 template <typename SIZE>
13 class IOActivity : public TRange<AbsTime> {
15 MachineThread<SIZE>* _thread;
16 typename SIZE::ptr_t _size;
19 IOActivity(AbsTime start, AbsTime length, MachineThread<SIZE>* thread, typename SIZE::ptr_t size) :
20 TRange(start, length),
24 ASSERT(_thread, "Sanity");
25 ASSERT(_size, "Zero length IO");
28 MachineThread<SIZE>* thread() const { return _thread; }
29 void set_thread(MachineThread<SIZE>* thread) { _thread = thread; }
31 typename SIZE::ptr_t size() const { return _size; }