summaryrefslogtreecommitdiff
path: root/taskstats
AgeCommit message (Collapse)Author
2015-09-01Fix taskstats for libnlColin Cross
taskstats doesn't work, probably caused by when I switched it from using system/core/libnl_2 to external/libnl. Fix a few bugs that libnl_2 didn't care about: - callbacks must be registered with NL_CB_CUSTOM - nla_next is not guaranteed to work if !nla_ok, use nla_for_each_attr which does the right thing - instead of fixing get_family_id, use genl_ctrl_resolve - instead of manually setting pid, seq, and flags, use nl_send_auto_complete - since there is now only one command sent, get rid of send_command and take advantage of the known parameter type to use nla_put_u32 - libnl does not set errno, return nl error codes and use nl_perror instead of perror Change-Id: Ic631c8c1d9cc6ed288cbbeb6fe40c45ca5fe9143
2014-03-20taskstats: fix warningsColin Cross
Fix warnings on arm64 build Change-Id: Icc1b497361e8f532f10c850fb0bf5e3fa22249b5
2014-03-20taskstats: convert to libnlColin Cross
libnl_2 has been replaced with libnl. Change-Id: Ie96a92c3a77a1a4dcbf0646b1a8f41659f0027e8
2014-02-27Fix 64-bit build.Ying Wang
Change-Id: I52f4acaab3e2dcd59c23701f60ac12fed40828c6
2013-09-27Add taskstats reporting toolSami Kyostila
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