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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Fri,  7 Jan 2011 11:29:48 +0100
From:	Thomas Renninger <trenn@...e.de>
To:	unlisted-recipients:; (no To-header on input)
Cc:	linux-perf-users@...r.kernel.org, mingo@...e.hu,
	arjan@...ux.intel.com, lenb@...nel.org, j-pihet@...com,
	Thomas Renninger <trenn@...e.de>, linux-kernel@...r.kernel.org
Subject: [PATCH 7/9] perf (userspace): Introduce --verbose param for perf timechart

by making use of the already available global verbose variable
from util/debug.h (similar to perf diff or perf top).

Some already introduced if (verbose) condtitions in util/svnhelper.c
will also be activated with that one.

Signed-off-by: Thomas Renninger <trenn@...e.de>
CC: Arjan van de Ven <arjan@...ux.intel.com>
CC: Ingo Molnar <mingo@...e.hu>
CC: linux-kernel@...r.kernel.org
CC: linux-perf-users@...r.kernel.org
---
 tools/perf/builtin-timechart.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/tools/perf/builtin-timechart.c b/tools/perf/builtin-timechart.c
index 746cf03..54e9c37 100644
--- a/tools/perf/builtin-timechart.c
+++ b/tools/perf/builtin-timechart.c
@@ -31,6 +31,7 @@
 #include "util/event.h"
 #include "util/session.h"
 #include "util/svghelper.h"
+#include "util/debug.h"
 
 #define SUPPORT_OLD_POWER_EVENTS 1
 #define PWR_EVENT_EXIT -1
@@ -382,6 +383,10 @@ static void c_state_end(int cpu, u64 timestamp)
 	pwr->next = power_events;
 
 	power_events = pwr;
+	if (verbose)
+		printf("CPU: %d - start_time: %llu - end_time: %llu\n",
+		       power_events->cpu, power_events->start_time,
+		       power_events->end_time);
 }
 
 static void p_state_change(int cpu, u64 timestamp, u64 new_freq)
@@ -1069,6 +1074,8 @@ parse_process(const struct option *opt __used, const char *arg, int __used unset
 }
 
 static const struct option options[] = {
+	OPT_INCR('v', "verbose", &verbose,
+		    "print extended debug info to stdout"),
 	OPT_STRING('i', "input", &input_name, "file",
 		    "input file name"),
 	OPT_STRING('o', "output", &output_name, "file",
-- 
1.7.3.1

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