|
The Pedigree Project 0.1
|
#include <TimeTracker.h>
Collaboration diagram for TimeTracker:Public Member Functions | |
| ALWAYS_INLINE | TimeTracker (Process *pProcess, bool fromUserspace, bool entryInterruptsAlreadyDisabled=false, Thread *currentThread=nullptr) |
| void | finish () |
| void | finishInKernel () |
| ALWAYS_INLINE void | finishForUserReturn () |
| void | attributeSyscall (size_t rawNumber) |
Private Member Functions | |
| void | initialise (bool entryInterruptsAlreadyDisabled) |
Private Attributes | |
| Process * | m_pProcess |
| Thread * | m_pThread |
| bool | m_bFromUserspace |
Tracks time spent and assigns it to the given process, in an RAII way.
Mostly useful for things like syscalls where there's a definitive entry and exit at which time should be tracked differently.
Definition at line 36 of file TimeTracker.h.
|
inline |
Definition at line 40 of file TimeTracker.h.
|
inline |
Definition at line 54 of file TimeTracker.h.
| void TimeTracker::attributeSyscall | ( | size_t | rawNumber | ) |
Attributes this userspace Linux syscall to the active Process.
Definition at line 56 of file TimeTracker.cc.
Referenced by HostedSyscallManager::syscall(), and X64SyscallManager::syscall().
Here is the caller graph for this function:| void TimeTracker::finish | ( | ) |
Completes accounting before a no-return architectural transition.
Definition at line 72 of file TimeTracker.cc.
References Thread::transitionTime().
Referenced by HostedSyscallManager::syscall().
Here is the caller graph for this function:
|
inline |
Retires the tracker while leaving the kernel interval for user return.
Definition at line 66 of file TimeTracker.h.
Referenced by X64SyscallManager::syscall().
Here is the caller graph for this function:| void TimeTracker::finishInKernel | ( | ) |
Completes accounting before restoring a saved kernel continuation.
Definition at line 90 of file TimeTracker.cc.
References Thread::transitionTime().
Referenced by HostedSyscallManager::syscall(), and X64SyscallManager::syscall().
Here is the caller graph for this function:
|
private |
Definition at line 26 of file TimeTracker.cc.
|
private |
Definition at line 91 of file TimeTracker.h.
|
private |
Definition at line 89 of file TimeTracker.h.
|
private |
Definition at line 90 of file TimeTracker.h.