aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf
diff options
context:
space:
mode:
authorFrederic Weisbecker <fweisbec@gmail.com>2013-09-11 11:18:09 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2013-11-04 10:14:59 -0500
commitfedd63d3cdc9004df43b02df5c874b8957992fe8 (patch)
tree5de83afc26e66cae4e613514ea2bc476553b8f24 /tools/perf
parent1902efe7f626fdebe1520f5ff11f1309ec506708 (diff)
perf tools: Compare hists comm by addresses
Now that comm strings are allocated only once and refcounted to be shared among threads, these can now be safely compared by addresses. This should remove most hists collapses on post processing. Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Tested-by: Jiri Olsa <jolsa@redhat.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: David Ahern <dsahern@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/r/1381468543-25334-8-git-send-email-namhyung@kernel.org Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Diffstat (limited to 'tools/perf')
-rw-r--r--tools/perf/util/sort.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c
index 835e8bdd869f..bf91d0e5c16e 100644
--- a/tools/perf/util/sort.c
+++ b/tools/perf/util/sort.c
@@ -80,7 +80,8 @@ struct sort_entry sort_thread = {
80static int64_t 80static int64_t
81sort__comm_cmp(struct hist_entry *left, struct hist_entry *right) 81sort__comm_cmp(struct hist_entry *left, struct hist_entry *right)
82{ 82{
83 return right->thread->tid - left->thread->tid; 83 /* Compare the addr that should be unique among comm */
84 return thread__comm_str(right->thread) - thread__comm_str(left->thread);
84} 85}
85 86
86static int64_t 87static int64_t