All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] perf sched timehist: Add pid and tid options
@ 2017-09-01 17:49 David Ahern
  2017-09-07 15:07 ` David Ahern
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: David Ahern @ 2017-09-01 17:49 UTC (permalink / raw)
  To: namhyung, acme; +Cc: linux-kernel, David Ahern

Add options to only show event for specific pid(s) and tid(s).

Signed-off-by: David Ahern <dsahern@gmail.com>
---
 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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] perf sched timehist: Add pid and tid options
  2017-09-01 17:49 [PATCH] perf sched timehist: Add pid and tid options David Ahern
@ 2017-09-07 15:07 ` David Ahern
  2017-09-08 13:28   ` Arnaldo Carvalho de Melo
  2017-09-07 15:17 ` Namhyung Kim
  2017-09-22 16:28 ` [tip:perf/core] " tip-bot for David Ahern
  2 siblings, 1 reply; 5+ messages in thread
From: David Ahern @ 2017-09-07 15:07 UTC (permalink / raw)
  To: namhyung, acme; +Cc: linux-kernel, Arnaldo Carvalho de Melo

Hi Arnaldo:

are you ok with this change?

On 9/1/17 11:49 AM, David Ahern wrote:
> Add options to only show event for specific pid(s) and tid(s).
> 
> Signed-off-by: David Ahern <dsahern@gmail.com>
> ---
>  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)
>  	};
>  
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] perf sched timehist: Add pid and tid options
  2017-09-01 17:49 [PATCH] perf sched timehist: Add pid and tid options David Ahern
  2017-09-07 15:07 ` David Ahern
@ 2017-09-07 15:17 ` Namhyung Kim
  2017-09-22 16:28 ` [tip:perf/core] " tip-bot for David Ahern
  2 siblings, 0 replies; 5+ messages in thread
From: Namhyung Kim @ 2017-09-07 15:17 UTC (permalink / raw)
  To: David Ahern; +Cc: Arnaldo Carvalho de Melo, linux-kernel@vger.kernel.org

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] perf sched timehist: Add pid and tid options
  2017-09-07 15:07 ` David Ahern
@ 2017-09-08 13:28   ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 5+ messages in thread
From: Arnaldo Carvalho de Melo @ 2017-09-08 13:28 UTC (permalink / raw)
  To: David Ahern; +Cc: namhyung, acme, linux-kernel

Em Thu, Sep 07, 2017 at 09:07:24AM -0600, David Ahern escreveu:
> Hi Arnaldo:
> 
> are you ok with this change?

Yes, it is already merged in my perf/core branch.

- Arnaldo
 
> On 9/1/17 11:49 AM, David Ahern wrote:
> > Add options to only show event for specific pid(s) and tid(s).
> > 
> > Signed-off-by: David Ahern <dsahern@gmail.com>
> > ---
> >  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)
> >  	};
> >  
> > 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [tip:perf/core] perf sched timehist: Add pid and tid options
  2017-09-01 17:49 [PATCH] perf sched timehist: Add pid and tid options David Ahern
  2017-09-07 15:07 ` David Ahern
  2017-09-07 15:17 ` Namhyung Kim
@ 2017-09-22 16:28 ` tip-bot for David Ahern
  2 siblings, 0 replies; 5+ messages in thread
From: tip-bot for David Ahern @ 2017-09-22 16:28 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: acme, namhyung, hpa, dsahern, tglx, mingo, linux-kernel

Commit-ID:  0f59d7a352c11712de0f226b46cb82775b4fcece
Gitweb:     http://git.kernel.org/tip/0f59d7a352c11712de0f226b46cb82775b4fcece
Author:     David Ahern <dsahern@gmail.com>
AuthorDate: Fri, 1 Sep 2017 10:49:12 -0700
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Wed, 13 Sep 2017 09:49:12 -0300

perf sched timehist: Add pid and tid options

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>
---
 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 a092a24..55b6733 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 322b4de..b7e8812 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)
 	};
 

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-09-22 16:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-01 17:49 [PATCH] perf sched timehist: Add pid and tid options David Ahern
2017-09-07 15:07 ` David Ahern
2017-09-08 13:28   ` Arnaldo Carvalho de Melo
2017-09-07 15:17 ` Namhyung Kim
2017-09-22 16:28 ` [tip:perf/core] " tip-bot for David Ahern

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.