Messages in this thread Patch in this message | | | From | Namhyung Kim <> | Subject | [PATCH 7/8] perf tools: Compare hists comm by addresses | Date | Fri, 11 Oct 2013 14:15:42 +0900 |
| |
From: Frederic Weisbecker <fweisbec@gmail.com>
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> 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> Signed-off-by: Namhyung Kim <namhyung@kernel.org> --- tools/perf/util/sort.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c index 519a3dde7466..e68833f3932d 100644 --- a/tools/perf/util/sort.c +++ b/tools/perf/util/sort.c @@ -79,7 +79,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 -- 1.7.11.7
| |