linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] perf sort: only insert overhead && overhead_children when no overhead* field given
@ 2017-06-01  9:03 changbin.du
  2017-06-01 10:21 ` Jiri Olsa
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: changbin.du @ 2017-06-01  9:03 UTC (permalink / raw)
  To: peterz, mingo, alexander.shishkin, jolsa; +Cc: linux-kernel, Changbin Du

From: Changbin Du <changbin.du@intel.com>

If we always insert 'overhead' and 'overhead_children' as sort keys,
this make it impossible to sort as overhead (which displayed as Self)
first.Ths will be a problem if the data is collected with call-graph
enabled. Then we never can sort the result as self-overhead on this
data. And sometimes the data is hard to collect.

This patch fix this by only insert overhead && overhead_children
when no overhead* field given.

Signed-off-by: Changbin Du <changbin.du@intel.com>
---
 tools/perf/util/sort.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c
index 5762ae4..69eea3a 100644
--- a/tools/perf/util/sort.c
+++ b/tools/perf/util/sort.c
@@ -2635,6 +2635,9 @@ static char *setup_overhead(char *keys)
 	if (sort__mode == SORT_MODE__DIFF)
 		return keys;
 
+	if (strstr(keys, "overhead"))
+		return keys;
+
 	keys = prefix_if_not_in("overhead", keys);
 
 	if (symbol_conf.cumulate_callchain)
-- 
2.7.4

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

end of thread, other threads:[~2017-07-06 16:04 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-01  9:03 [PATCH] perf sort: only insert overhead && overhead_children when no overhead* field given changbin.du
2017-06-01 10:21 ` Jiri Olsa
2017-06-02  2:52   ` Du, Changbin
2017-06-02  3:22     ` Du, Changbin
2017-06-02  4:22 ` [PATCH v2] " changbin.du
2017-06-26  8:06   ` Du, Changbin
2017-06-29 15:22     ` Jiri Olsa
2017-07-05  3:02       ` Du, Changbin
2017-07-05  3:35 ` [PATCH v3] " changbin.du
2017-07-06 16:04   ` Jiri Olsa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).