Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
offcputime: Support tracking specified processes and threads
Inspired by the perf-top command, the offcputime tool is enhanced to support tracking multiple processes and threads. $ man perf-top -p <pid>, --pid=<pid> Profile events on existing Process ID (comma separated list). -t <tid>, --tid=<tid> Profile events on existing thread ID (comma separated list). Before: $ offcputime -h optional arguments: -p PID, --pid PID trace this PID only -t TID, --tid TID trace this TID only examples: ./offcputime -p 185 # only trace threads for PID 185 ./offcputime -t 188 # only trace thread 188 After: $ offcputime -h optional arguments: -p PID, --pid PID trace these PIDs only, comma separated list -t TID, --tid TID trace these TIDs only, comma separated list examples: ./offcputime -p 185,175,165 # only trace threads for PID 185,175,165 ./offcputime -t 188,120,134 # only trace threads 188,120,134 Signed-off-by: Yingming Mao <[email protected]> Reviewed-by: Shuo Li <[email protected]>
- Loading branch information