diff options
Diffstat (limited to 'tools/perf/builtin-script.c')
-rw-r--r-- | tools/perf/builtin-script.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c index 6cf811acc41b..b3012c4fff19 100644 --- a/tools/perf/builtin-script.c +++ b/tools/perf/builtin-script.c | |||
@@ -82,6 +82,16 @@ static struct { | |||
82 | PERF_OUTPUT_CPU | PERF_OUTPUT_TIME | | 82 | PERF_OUTPUT_CPU | PERF_OUTPUT_TIME | |
83 | PERF_OUTPUT_EVNAME | PERF_OUTPUT_TRACE, | 83 | PERF_OUTPUT_EVNAME | PERF_OUTPUT_TRACE, |
84 | }, | 84 | }, |
85 | |||
86 | [PERF_TYPE_RAW] = { | ||
87 | .user_set = false, | ||
88 | |||
89 | .fields = PERF_OUTPUT_COMM | PERF_OUTPUT_TID | | ||
90 | PERF_OUTPUT_CPU | PERF_OUTPUT_TIME | | ||
91 | PERF_OUTPUT_EVNAME | PERF_OUTPUT_SYM, | ||
92 | |||
93 | .invalid_fields = PERF_OUTPUT_TRACE, | ||
94 | }, | ||
85 | }; | 95 | }; |
86 | 96 | ||
87 | static bool output_set_by_user(void) | 97 | static bool output_set_by_user(void) |
@@ -502,6 +512,8 @@ static int parse_output_fields(const struct option *opt __used, | |||
502 | type = PERF_TYPE_SOFTWARE; | 512 | type = PERF_TYPE_SOFTWARE; |
503 | else if (!strcmp(str, "trace")) | 513 | else if (!strcmp(str, "trace")) |
504 | type = PERF_TYPE_TRACEPOINT; | 514 | type = PERF_TYPE_TRACEPOINT; |
515 | else if (!strcmp(str, "raw")) | ||
516 | type = PERF_TYPE_RAW; | ||
505 | else { | 517 | else { |
506 | fprintf(stderr, "Invalid event type in field string.\n"); | 518 | fprintf(stderr, "Invalid event type in field string.\n"); |
507 | return -EINVAL; | 519 | return -EINVAL; |
@@ -902,7 +914,7 @@ static const struct option options[] = { | |||
902 | OPT_STRING(0, "symfs", &symbol_conf.symfs, "directory", | 914 | OPT_STRING(0, "symfs", &symbol_conf.symfs, "directory", |
903 | "Look for files with symbols relative to this directory"), | 915 | "Look for files with symbols relative to this directory"), |
904 | OPT_CALLBACK('f', "fields", NULL, "str", | 916 | OPT_CALLBACK('f', "fields", NULL, "str", |
905 | "comma separated output fields prepend with 'type:'. Valid types: hw,sw,trace. Fields: comm,tid,pid,time,cpu,event,trace,sym", | 917 | "comma separated output fields prepend with 'type:'. Valid types: hw,sw,trace,raw. Fields: comm,tid,pid,time,cpu,event,trace,sym", |
906 | parse_output_fields), | 918 | parse_output_fields), |
907 | 919 | ||
908 | OPT_END() | 920 | OPT_END() |