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

Signed-off-by: Arun Sharma <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: Mike Galbraith <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Stephane Eranian <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Tom Zanussi <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
---
 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
_______________________________________________
perfmon2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/perfmon2-devel

Reply via email to