Add taskstats reporting tool
Add a tool for querying and printing out the kernel's taskstats
structure. This structure contains various profiling information about a
given process or thread group.
Sample output:
Basic task statistics
---------------------
Stats version: 8
Exit code: 0
Flags: 0x2
Nice value: 0
Command name: init
Scheduling discipline: 0
UID: 0
GID: 0
PID: 1
PPID: 0
Begin time: Fri Sep 20 17:06:14 2013
Elapsed time: 611384577 usec
User CPU time: 980000 usec
Minor page faults: 515
Major page faults: 0
Scaled user time: 980000 usec
Scaled system time: 2590000 usec
Delay accounting
----------------
Count Delay (ms) Average delay Real delay Scaled real Virtual delay
CPU 1101 90.615 0.082 3570.000 3570.000 3620.204
IO 45 50.155 1.115
Swap 0 0.000 0.000
Reclaim 0 0.000 0.000
Extended accounting fields
--------------------------
Average RSS usage: 0.348 MB
Average VM usage: 0.727 MB
RSS high water mark: 548 KB
VM high water mark: 688 KB
IO bytes read: 330752
IO bytes written: 979968
IO read syscalls: 17408
IO write syscalls: 0
Per-task/thread statistics
--------------------------
Voluntary switches: 768
Involuntary switches: 333
Change-Id: I4dab68d98de5db0f9112bec014872a067684f799
4 files changed