Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1506827 > unrolled thread

[PATCH 2/3] perf sched map: Always show task comm with -v

Started byNamhyung Kim <namhyung@kernel.org>
First post2016-10-24 04:10 +0200
Last post2016-10-24 19:00 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 2/3] perf sched map: Always show task comm with -v Namhyung Kim <namhyung@kernel.org> - 2016-10-24 04:10 +0200
    Re: [PATCH 2/3] perf sched map: Always show task comm with -v Jiri Olsa <jolsa@redhat.com> - 2016-10-24 19:00 +0200

#1506827 — [PATCH 2/3] perf sched map: Always show task comm with -v

FromNamhyung Kim <namhyung@kernel.org>
Date2016-10-24 04:10 +0200
Subject[PATCH 2/3] perf sched map: Always show task comm with -v
Message-ID<svCS6-18W-21@gated-at.bofh.it>
I'd like to see the name of tasks with perf sched map, but it only shows
name of new tasks and then use short names after all.  This is not good
for long running tasks since it's hard for users to track the short
names.  This patch makes it show the names (except the idle task) when
-v option is used.  Probably we may make it as default behavior.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
---
 tools/perf/builtin-sched.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c
index 78006e991d91..97d6cbf486bb 100644
--- a/tools/perf/builtin-sched.c
+++ b/tools/perf/builtin-sched.c
@@ -1493,7 +1493,7 @@ static int map_switch_event(struct perf_sched *sched, struct perf_evsel *evsel,
 		goto out;
 
 	color_fprintf(stdout, color, "  %12.6f secs ", (double)timestamp / NSEC_PER_SEC);
-	if (new_shortname) {
+	if (new_shortname || (verbose && sched_in->tid)) {
 		const char *pid_color = color;
 
 		if (thread__has_color(sched_in))
-- 
2.10.0

[toc] | [next] | [standalone]


#1507446

FromJiri Olsa <jolsa@redhat.com>
Date2016-10-24 19:00 +0200
Message-ID<svQLn-1O1-7@gated-at.bofh.it>
In reply to#1506827
On Mon, Oct 24, 2016 at 11:02:44AM +0900, Namhyung Kim wrote:
> I'd like to see the name of tasks with perf sched map, but it only shows
> name of new tasks and then use short names after all.  This is not good
> for long running tasks since it's hard for users to track the short
> names.  This patch makes it show the names (except the idle task) when
> -v option is used.  Probably we may make it as default behavior.
> 
> Signed-off-by: Namhyung Kim <namhyung@kernel.org>

Acked-by: Jiri Olsa <jolsa@kernel.org>

thanks,
jirka

> ---
>  tools/perf/builtin-sched.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c
> index 78006e991d91..97d6cbf486bb 100644
> --- a/tools/perf/builtin-sched.c
> +++ b/tools/perf/builtin-sched.c
> @@ -1493,7 +1493,7 @@ static int map_switch_event(struct perf_sched *sched, struct perf_evsel *evsel,
>  		goto out;
>  
>  	color_fprintf(stdout, color, "  %12.6f secs ", (double)timestamp / NSEC_PER_SEC);
> -	if (new_shortname) {
> +	if (new_shortname || (verbose && sched_in->tid)) {
>  		const char *pid_color = color;
>  
>  		if (thread__has_color(sched_in))
> -- 
> 2.10.0
> 

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web