[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-fedd63d3cdc9004df43b02df5c874b8957992fe8@git.kernel.org>
Date: Mon, 4 Nov 2013 12:19:56 -0800
From: tip-bot for Frederic Weisbecker <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, eranian@...gle.com, acme@...hat.com,
hpa@...or.com, mingo@...nel.org, a.p.zijlstra@...llo.nl,
namhyung@...nel.org, jolsa@...hat.com, fweisbec@...il.com,
dsahern@...il.com, tglx@...utronix.de, mingo@...e.hu
Subject: [tip:perf/core] perf tools: Compare hists comm by addresses
Commit-ID: fedd63d3cdc9004df43b02df5c874b8957992fe8
Gitweb: http://git.kernel.org/tip/fedd63d3cdc9004df43b02df5c874b8957992fe8
Author: Frederic Weisbecker <fweisbec@...il.com>
AuthorDate: Wed, 11 Sep 2013 17:18:09 +0200
Committer: Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Mon, 4 Nov 2013 12:14:59 -0300
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@...il.com>
Tested-by: Jiri Olsa <jolsa@...hat.com>
Cc: Jiri Olsa <jolsa@...hat.com>
Cc: David Ahern <dsahern@...il.com>
Cc: Ingo Molnar <mingo@...e.hu>
Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc: Arnaldo Carvalho de Melo <acme@...hat.com>
Cc: Stephane Eranian <eranian@...gle.com>
Link: http://lkml.kernel.org/r/1381468543-25334-8-git-send-email-namhyung@kernel.org
Signed-off-by: Namhyung Kim <namhyung@...nel.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 835e8bd..bf91d0e 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists