Skip to content

Commit

Permalink
perf sched timehist: Add pid and tid options
Browse files Browse the repository at this point in the history
Add options to only show event for specific pid(s) and tid(s).

Signed-off-by: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: http://lkml.kernel.org/r/1504288152-19690-1-git-send-email-dsahern@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
  • Loading branch information
David Ahern authored and Arnaldo Carvalho de Melo committed Sep 13, 2017
1 parent b130a69 commit 0f59d7a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tools/perf/Documentation/perf-sched.txt
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,14 @@ OPTIONS for 'perf sched timehist'
--max-stack::
Maximum number of functions to display in backtrace, default 5.

-p=::
--pid=::
Only show events for given process ID (comma separated list).

-t=::
--tid=::
Only show events for given thread ID (comma separated list).

-s::
--summary::
Show only a summary of scheduling by thread with min, max, and average
Expand Down
4 changes: 4 additions & 0 deletions tools/perf/builtin-sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -3363,6 +3363,10 @@ int cmd_sched(int argc, const char **argv)
OPT_STRING(0, "time", &sched.time_str, "str",
"Time span for analysis (start,stop)"),
OPT_BOOLEAN(0, "state", &sched.show_state, "Show task state when sched-out"),
OPT_STRING('p', "pid", &symbol_conf.pid_list_str, "pid[,pid...]",
"analyze events only for given process id(s)"),
OPT_STRING('t', "tid", &symbol_conf.tid_list_str, "tid[,tid...]",
"analyze events only for given thread id(s)"),
OPT_PARENT(sched_options)
};

Expand Down

0 comments on commit 0f59d7a

Please sign in to comment.