提交 1d81c7fc 编写于 作者: J Jiri Olsa 提交者: Arnaldo Carvalho de Melo

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: NJiri Olsa <jolsa@redhat.com>
Reviewed-by: NNamhyung 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.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
上级 e0af43d2
......@@ -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);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册