diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c index 8e395a5..e3093a1 100644 --- a/tools/perf/builtin-script.c +++ b/tools/perf/builtin-script.c @@ -109,6 +109,17 @@ static struct { .invalid_fields = PERF_OUTPUT_TRACE, }, + + [PERF_TYPE_BREAKPOINT] = { + .user_set = false, + + .fields = PERF_OUTPUT_COMM | PERF_OUTPUT_TID | + PERF_OUTPUT_CPU | PERF_OUTPUT_TIME | + PERF_OUTPUT_IP | PERF_OUTPUT_ADDR | + PERF_OUTPUT_SYM | PERF_OUTPUT_DSO, + + .invalid_fields = PERF_OUTPUT_TRACE, + }, }; static bool output_set_by_user(void) @@ -727,6 +738,8 @@ static int parse_output_fields(const struct option *opt __used, type = PERF_TYPE_TRACEPOINT; else if (!strcmp(str, "raw")) type = PERF_TYPE_RAW; + else if (!strcmp(str, "bp")) + type = PERF_TYPE_BREAKPOINT; else { fprintf(stderr, "Invalid event type in field string.\n"); rc = -EINVAL; @@ -1144,7 +1157,7 @@ static const struct option options[] = { "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,raw. " + "Valid types: hw,sw,trace,raw,bp. " "Fields: comm,tid,pid,time,cpu,event,trace,ip,sym,dso," "addr,symoff", parse_output_fields),