Skip to contentSkip to conversation

perf report: Fix -T/--threads option to work again

PATCH Applied Namhyung Kim 3 participants 3 messages Apr 29, 2015 – May 6, 2015 perf events

lore
Share & tools
lore

Namhyung Kim

author maintainer
#0 lore raw

PATCH 1/1 perf report: Fix -T/--threads option to work again

The commit 512ae1bd6acb ("perf tools: Consolidate management of default sort orders") changed default value of the 'sort_order' variable to NULL indicating that users don't set any sort keys on the command line.

However it missed to update a check in perf_evlist__tty_browse_hists() so that 'perf report -T' cannot show the per-thread values after the normal output. This patch fixes it to work again.

Note that the -T option only works on --stdio and neither --sort nor --parent option was given.

---
 tools/perf/builtin-report.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/builtin-report.c +1 -1
index 476cdf7afcca..b63aeda719be 100644
@@ -329,7 +329,7 @@ static int perf_evlist__tty_browse_hists(struct perf_evlist *evlist,
 		fprintf(stdout, "\n\n");
 	}
 
-	if (sort_order == default_sort_order &&
+	if (sort_order == NULL &&
 	    parent_pattern == default_parent_pattern) {
 		fprintf(stdout, "#\n# (%s)\n#\n", help);
 
Signature · 1 line
2.3.5
maintainer Applied
#1 lore raw

Em Wed, Apr 29, 2015 at 09:08:48PM +0900, Namhyung Kim escreveu:

Quoted 10 lines

The commit 512ae1bd6acb ("perf tools: Consolidate management of default sort orders") changed default value of the 'sort_order' variable to NULL indicating that users don't set any sort keys on the command line.

However it missed to update a check in perf_evlist__tty_browse_hists() so that 'perf report -T' cannot show the per-thread values after the normal output. This patch fixes it to work again.

Note that the -T option only works on --stdio and neither --sort nor --parent option was given.

Thanks, applied to perf/urgent.

- Arnaldo

#2 lore raw

[tip:perf/urgent] perf report: Fix -T/ --threads option to work again

In reply to Namhyung Kim
perf report: Fix -T/--threads option to work again
Commit-ID:  e944ec2ca00fb0170ba9d7f2aeec32c22dc0d4ec
Gitweb:     http://git.kernel.org/tip/e944ec2ca00fb0170ba9d7f2aeec32c22dc0d4ec
Author:     Namhyung Kim <[email protected]>
AuthorDate: Wed, 29 Apr 2015 21:08:48 +0900
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Fri, 1 May 2015 10:13:30 -0300

perf report: Fix -T/--threads option to work again

The commit 512ae1bd6acb ("perf tools: Consolidate management of default sort orders") changed default value of the 'sort_order' variable to NULL indicating that users don't set any sort keys on the command line.

However it missed to update a check in perf_evlist__tty_browse_hists() so that 'perf report -T' cannot show the per-thread values after the normal output. This patch fixes it to work again.

Note that the -T option only works on --stdio and neither --sort nor --parent option was given.

---
 tools/perf/builtin-report.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/builtin-report.c +1 -1
index 476cdf7..b63aeda 100644
@@ -329,7 +329,7 @@ static int perf_evlist__tty_browse_hists(struct perf_evlist *evlist,
 		fprintf(stdout, "\n\n");
 	}
 
-	if (sort_order == default_sort_order &&
+	if (sort_order == NULL &&
 	    parent_pattern == default_parent_pattern) {
 		fprintf(stdout, "#\n# (%s)\n#\n", help);