[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1416235939-29565-3-git-send-email-kan.liang@intel.com>
Date: Mon, 17 Nov 2014 09:52:18 -0500
From: kan.liang@...el.com
To: acme@...nel.org, jolsa@...hat.com, namhyung@...nel.org
Cc: linux-kernel@...r.kernel.org, ak@...ux.intel.com,
Kan Liang <kan.liang@...el.com>
Subject: [PATCH V3 2/3] perf tool:perf diff support for different binaries
From: Kan Liang <kan.liang@...el.com>
Currently, the perf diff only works with same binaries. That's because
it compares the symbol start address. It doesn't work if the perf.data
comes from different binaries. This patch matches the function names.
Signed-off-by: Kan Liang <kan.liang@...el.com>
Acked-by: Namhyung Kim <namhyung@...nel.org>
---
tools/perf/util/sort.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c
index 9402885..5b6c57d 100644
--- a/tools/perf/util/sort.c
+++ b/tools/perf/util/sort.c
@@ -1430,6 +1430,15 @@ int sort_dimension__add(const char *tok)
sort__has_parent = 1;
} else if (sd->entry == &sort_sym) {
sort__has_sym = 1;
+ /*
+ * perf diff displays the performance difference amongst
+ * two or more perf.data files. Those files could come
+ * from different binaries. So we should not compare
+ * their ips, but the name of symble.
+ */
+ if (sort__mode == SORT_MODE__DIFF)
+ sd->entry->se_collapse = sort__sym_sort;
+
} else if (sd->entry == &sort_dso) {
sort__has_dso = 1;
}
--
1.8.3.2
--
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