diff options
author | Frederic Weisbecker <[email protected]> | 2013-09-11 17:18:09 +0200 |
---|---|---|
committer | Arnaldo Carvalho de Melo <[email protected]> | 2013-11-04 12:14:59 -0300 |
commit | fedd63d3cdc9004df43b02df5c874b8957992fe8 (patch) | |
tree | 5de83afc26e66cae4e613514ea2bc476553b8f24 | |
parent | 1902efe7f626fdebe1520f5ff11f1309ec506708 (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 <[email protected]>
Tested-by: Jiri Olsa <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: David Ahern <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Arnaldo Carvalho de Melo <[email protected]>
Cc: Stephane Eranian <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Namhyung Kim <[email protected]>
-rw-r--r-- | tools/perf/util/sort.c | 3 |
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 = { static int64_t sort__comm_cmp(struct hist_entry *left, struct hist_entry *right) { - return right->thread->tid - left->thread->tid; + /* Compare the addr that should be unique among comm */ + return thread__comm_str(right->thread) - thread__comm_str(left->thread); } static int64_t |