BlkIo | Statistics related to I/O at block device level
|
Client | Interface to access kernel taskstats API through the netlink socket.
|
ContextSwitches | Statistics related to context switches
|
Cpu | Staticstics related to CPU time
|
DelayStat | |
Delays | Statistics related to scheduling delay (delay accounting)
|
Io | Staticstics related to I/O at syscall surface
|
Memory | Statistics related to memory, vm
|
TaskStats | The taskstats representation for a task.
This struct remaps commonly used struct taskstats fields for primarily:
|
__bindgen_taskstats | |
taskstats | This is custom copy of the generated struct taskstats from linux version 3.10.0 and in this crate
this type is used to read binary data transferred from linux kernel.
The reason of doing this despite the bindgen generates rust bindings including struct taskstats
is due to potential corruption of on-memory struct layout likely caused by old clang version.
ref: https://github.com/rust-lang/rust-bindgen/issues/867
Specifically, when bindgen generates struct taskstats with older clang version, the resulting
struct defined in generated rust source code contains size padding as the last member of the struct
causing offset of members after ac_uid to shift 4-byte or more and the result data becomes unreliable.
The bindgen generated definition works well in environment that uses newer clang versions, but I
decided to use copied definition of this struct for the time being by following considerations:
|