summaryrefslogtreecommitdiff
path: root/tools/perf/util/probe-event.h
diff options
context:
space:
mode:
authorMasami Hiramatsu <mhiramat@kernel.org>2021-06-05 01:28:43 +0900
committerArnaldo Carvalho de Melo <acme@redhat.com>2021-06-18 13:50:05 -0300
commit45237f9898fce54a8cc6d40f7455291e0e6c4277 (patch)
tree9ac52e5d202e74e177450d3e448a582cc3dbeb7a /tools/perf/util/probe-event.h
parentd26ea4814476841f806509745dcd398bf0598314 (diff)
perf probe: Add --bootconfig to output definition in bootconfig format
Now the boot-time tracing supports kprobes events and that must be written in bootconfig file in the following format. ftrace.event.kprobes.<EVENT_NAME>.probes = <PROBE-DEF> 'perf probe' already supports --definition (-D) action to show probe definitions, but the format is for tracefs: [p|r][:EVENT_NAME] <PROBE-DEF> This patch adds the --bootconfig option for -D action so that it outputs the probe definitions in bootconfig format. E.g. $ perf probe --bootconfig -D "path_lookupat:7 err:s32 s:string" ftrace.event.kprobes.path_lookupat_L7.probe = 'path_lookupat.isra.0+309 err_s32=%ax:s32 s_string=+0(%r13):string' Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lore.kernel.org/lkml/162282412351.452340.14871995440005640114.stgit@devnote2 Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/probe-event.h')
-rw-r--r--tools/perf/util/probe-event.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/perf/util/probe-event.h b/tools/perf/util/probe-event.h
index 4f0eb3a20c36..65769d7949a3 100644
--- a/tools/perf/util/probe-event.h
+++ b/tools/perf/util/probe-event.h
@@ -15,6 +15,7 @@ struct probe_conf {
bool force_add;
bool no_inlines;
bool cache;
+ bool bootconfig;
int max_probes;
unsigned long magic_num;
};
@@ -163,6 +164,7 @@ int add_perf_probe_events(struct perf_probe_event *pevs, int npevs);
int convert_perf_probe_events(struct perf_probe_event *pevs, int npevs);
int apply_perf_probe_events(struct perf_probe_event *pevs, int npevs);
int show_probe_trace_events(struct perf_probe_event *pevs, int npevs);
+int show_bootconfig_events(struct perf_probe_event *pevs, int npevs);
void cleanup_perf_probe_events(struct perf_probe_event *pevs, int npevs);
struct strfilter;