linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Teach perf script about PERF_TYPE_RAW
@ 2011-03-22 22:49 Arun Sharma
  0 siblings, 0 replies; only message in thread
From: Arun Sharma @ 2011-03-22 22:49 UTC (permalink / raw)
  To: acme
  Cc: Peter Zijlstra, Frederic Weisbecker, Mike Galbraith, linux-kernel,
	Stephane Eranian, linux-perf-users, Tom Zanussi, Paul Mackerras,
	perfmon2-devel, Ingo Molnar, Thomas Gleixner, Arun Sharma

Useful for getting stack traces for hardware events not handled
by PERF_TYPE_HARDWARE.

Signed-off-by: Arun Sharma <asharma@fb.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Tom Zanussi <tzanussi@gmail.com>
Cc: linux-kernel@vger.kernel.org
Cc: linux-perf-users@vger.kernel.org
Cc: perfmon2-devel@lists.sourceforge.net
---
 tools/perf/builtin-script.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c
index 9f5fc54..97c66df 100644
--- a/tools/perf/builtin-script.c
+++ b/tools/perf/builtin-script.c
@@ -61,6 +61,10 @@ static u64 output_fields[PERF_TYPE_MAX] = {
 	[PERF_TYPE_TRACEPOINT] = PERF_OUTPUT_COMM | PERF_OUTPUT_TID | \
 				 PERF_OUTPUT_CPU | PERF_OUTPUT_TIME | \
 				 PERF_OUTPUT_EVNAME | PERF_OUTPUT_TRACE,
+
+	[PERF_TYPE_RAW] = PERF_OUTPUT_COMM | PERF_OUTPUT_TID | \
+			  PERF_OUTPUT_CPU | PERF_OUTPUT_TIME | \
+			  PERF_OUTPUT_EVNAME | PERF_OUTPUT_SYM,
 };
 
 static bool output_set_by_user;
@@ -481,6 +485,8 @@ static int parse_output_fields(const struct option *opt __used,
 		type = PERF_TYPE_SOFTWARE;
 	else if (!strcmp(tok, "trace"))
 		type = PERF_TYPE_TRACEPOINT;
+	else if (!strcmp(tok, "raw"))
+		type = PERF_TYPE_RAW;
 	else {
 		fprintf(stderr, "Invalid event type in field string.");
 		return -EINVAL;
@@ -836,7 +842,7 @@ static const struct option options[] = {
 	OPT_STRING(0, "symfs", &symbol_conf.symfs, "directory",
 		    "Look for files with symbols relative to this directory"),
 	OPT_CALLBACK('f', "fields", NULL, "str",
-		     "comma separated output fields prepend with 'type:'. Valid types: hw,sw,trace. Fields: comm,tid,pid,time,cpu,event,trace,sym",
+		     "comma separated output fields prepend with 'type:'. Valid types: hw,sw,trace,raw. Fields: comm,tid,pid,time,cpu,event,trace,sym",
 		     parse_output_fields),
 
 	OPT_END()
-- 
1.7.4


------------------------------------------------------------------------------
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software 
be a part of the solution? Download the Intel(R) Manageability Checker 
today! http://p.sf.net/sfu/intel-dev2devmar

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2011-03-22 22:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-22 22:49 [PATCH] Teach perf script about PERF_TYPE_RAW Arun Sharma

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).