Reads the /proc/[pid]/stat file for a thread.
More...
#include "util/linux/proc_stat_reader.h"
|
bool | Initialize (pid_t tid) |
| Initializes the reader. More...
|
|
bool | UserCPUTime (timeval *user_time) const |
| Determines the time the thread has spent executing in user mode. More...
|
|
bool | SystemCPUTime (timeval *system_time) const |
| Determines the time the thread has spent executing in system mode. More...
|
|
bool | StartTime (timeval *start_time) const |
| Determines the target thread’s start time. More...
|
|
Reads the /proc/[pid]/stat file for a thread.
◆ Initialize()
bool crashpad::ProcStatReader::Initialize |
( |
pid_t |
tid | ) |
|
Initializes the reader.
This method must be successfully called before calling any other.
- Parameters
-
[in] | tid | The thread ID to read the stat file for. |
◆ StartTime()
bool crashpad::ProcStatReader::StartTime |
( |
timeval * |
start_time | ) |
const |
Determines the target thread’s start time.
- Parameters
-
[out] | start_time | The time that the thread started. |
- Returns
true
on success, with start_time set. Otherwise, false
with a message logged.
◆ SystemCPUTime()
bool crashpad::ProcStatReader::SystemCPUTime |
( |
timeval * |
system_time | ) |
const |
Determines the time the thread has spent executing in system mode.
- Parameters
-
[out] | system_time | The time spent executing in system mode. |
- Returns
true
on success, with system_time set. Otherwise, false
with a message logged.
◆ UserCPUTime()
bool crashpad::ProcStatReader::UserCPUTime |
( |
timeval * |
user_time | ) |
const |
Determines the time the thread has spent executing in user mode.
- Parameters
-
[out] | user_time | The time spent executing in user mode. |
- Returns
true
on success, with user_time set. Otherwise, false
with a message logged.
The documentation for this class was generated from the following files:
- util/linux/proc_stat_reader.h
- util/linux/proc_stat_reader.cc