lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1354110769-2998-13-git-send-email-jolsa@redhat.com>
Date:	Wed, 28 Nov 2012 14:52:47 +0100
From:	Jiri Olsa <jolsa@...hat.com>
To:	linux-kernel@...r.kernel.org
Cc:	Jiri Olsa <jolsa@...hat.com>,
	Arnaldo Carvalho de Melo <acme@...stprotocols.net>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Ingo Molnar <mingo@...e.hu>, Paul Mackerras <paulus@...ba.org>,
	Corey Ashford <cjashfor@...ux.vnet.ibm.com>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Namhyung Kim <namhyung@...nel.org>
Subject: [PATCH 12/14] 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.

Signed-off-by: Jiri Olsa <jolsa@...hat.com>
Cc: Arnaldo Carvalho de Melo <acme@...stprotocols.net>
Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc: Ingo Molnar <mingo@...e.hu>
Cc: Paul Mackerras <paulus@...ba.org>
Cc: Corey Ashford <cjashfor@...ux.vnet.ibm.com>
Cc: Frederic Weisbecker <fweisbec@...il.com>
Cc: Namhyung Kim <namhyung@...nel.org>
---
 tools/perf/builtin-diff.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/tools/perf/builtin-diff.c b/tools/perf/builtin-diff.c
index 81f7529..50e1ea3 100644
--- a/tools/perf/builtin-diff.c
+++ b/tools/perf/builtin-diff.c
@@ -632,6 +632,19 @@ static void hists__process(struct hists *hists)
 	hists__fprintf(hists, true, 0, 0, stdout);
 }
 
+static void data_fprintf(void)
+{
+	struct diff_data *d;
+	int i;
+
+	fprintf(stdout, "# Data files:\n");
+
+	for_each_data(i, d)
+		fprintf(stdout, "#  [%d] %s\n", d->idx, d->file);
+
+	fprintf(stdout, "#\n");
+}
+
 static int data_process(void)
 {
 	struct perf_evlist *evlist_base = data[0].session->evlist;
@@ -662,6 +675,9 @@ static int data_process(void)
 		fprintf(stdout, "%s# Event '%s'\n#\n", first ? "" : "\n",
 			perf_evsel__name(evsel_base));
 
+		if (data_cnt > 2)
+			data_fprintf();
+
 		hists__process(&evsel_base->hists);
 
 		first = false;
-- 
1.7.11.7

--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ