* [tip:perf/core] perf diff: Display data file info ahead of the diff output
@ 2013-07-19 7:51 tip-bot for Jiri Olsa
0 siblings, 0 replies; only message in thread
From: tip-bot for Jiri Olsa @ 2013-07-19 7:51 UTC (permalink / raw)
To: linux-tip-commits
Cc: acme, linux-kernel, paulus, hpa, mingo, a.p.zijlstra, namhyung,
jolsa, fweisbec, tglx, cjashfor
Commit-ID: 1d81c7fc25c0f0559e3306fc73ecfe78b740c9e8
Gitweb: http://git.kernel.org/tip/1d81c7fc25c0f0559e3306fc73ecfe78b740c9e8
Author: Jiri Olsa <jolsa@redhat.com>
AuthorDate: Sat, 1 Dec 2012 21:56:03 +0100
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Fri, 12 Jul 2013 13:54:06 -0300
perf diff: Display data file info ahead of the diff output
Data files are referenced through the index of the file on the command
line. Adding list of data files for each index to ease up navigation for
user.
It's displayed only if in verbose mode.
Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Reviewed-by: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: http://lkml.kernel.org/n/tip-dfjxa6n116ughjjxohpkuvi8@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/builtin-diff.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/tools/perf/builtin-diff.c b/tools/perf/builtin-diff.c
index 0cfe99e..9574ba1 100644
--- a/tools/perf/builtin-diff.c
+++ b/tools/perf/builtin-diff.c
@@ -481,6 +481,21 @@ static void hists__process(struct hists *base, struct hists *new)
hists__fprintf(base, true, 0, 0, 0, stdout);
}
+static void data__fprintf(void)
+{
+ struct data__file *d;
+ int i;
+
+ fprintf(stdout, "# Data files:\n");
+
+ data__for_each_file(i, d)
+ fprintf(stdout, "# [%d] %s %s\n",
+ d->idx, d->file,
+ !d->idx ? "(Baseline)" : "");
+
+ fprintf(stdout, "#\n");
+}
+
static void data_process(void)
{
struct perf_evlist *evlist_old = data__files[0].session->evlist;
@@ -500,6 +515,9 @@ static void data_process(void)
first = false;
+ if (verbose)
+ data__fprintf();
+
hists__process(&evsel_old->hists, &evsel_new->hists);
}
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2013-07-19 7:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-19 7:51 [tip:perf/core] perf diff: Display data file info ahead of the diff output tip-bot for Jiri Olsa
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome