Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1728264
| From | Namhyung Kim <namhyung@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] perf sched timehist: Add pid and tid options |
| Date | 2017-09-07 17:20 +0200 |
| Message-ID | <un6L0-1Qb-23@gated-at.bofh.it> (permalink) |
| References | <ukYeR-8i9-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hi David,
On Sat, Sep 2, 2017 at 2:49 AM, David Ahern <dsahern@gmail.com> wrote:
> Add options to only show event for specific pid(s) and tid(s).
>
> Signed-off-by: David Ahern <dsahern@gmail.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Thanks,
Namhyung
> ---
> tools/perf/Documentation/perf-sched.txt | 8 ++++++++
> tools/perf/builtin-sched.c | 4 ++++
> 2 files changed, 12 insertions(+)
>
> diff --git a/tools/perf/Documentation/perf-sched.txt b/tools/perf/Documentation/perf-sched.txt
> index a092a2499e8f..55b67338548e 100644
> --- a/tools/perf/Documentation/perf-sched.txt
> +++ b/tools/perf/Documentation/perf-sched.txt
> @@ -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
> diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c
> index 322b4def8411..b7e8812ee80c 100644
> --- a/tools/perf/builtin-sched.c
> +++ b/tools/perf/builtin-sched.c
> @@ -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)
> };
>
> --
> 2.1.4
>
--
Thanks,
Namhyung
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH] perf sched timehist: Add pid and tid options David Ahern <dsahern@gmail.com> - 2017-09-01 19:50 +0200
Re: [PATCH] perf sched timehist: Add pid and tid options David Ahern <dsahern@gmail.com> - 2017-09-07 17:10 +0200
Re: [PATCH] perf sched timehist: Add pid and tid options Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-09-08 15:30 +0200
Re: [PATCH] perf sched timehist: Add pid and tid options Namhyung Kim <namhyung@kernel.org> - 2017-09-07 17:20 +0200
csiph-web