aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/trace_events.h
diff options
context:
space:
mode:
authorSong Liu <songliubraving@fb.com>2017-12-06 14:45:15 -0800
committerIngo Molnar <mingo@kernel.org>2018-02-06 11:29:26 +0100
commite12f03d7031a977356e3d7b75a68c2185ff8d155 (patch)
tree737fee559c7bd0167b2f65567ec005ed2349dc4a /include/linux/trace_events.h
parentperf/headers: Sync new perf_event.h with the tools/include/uapi version (diff)
downloadlinux-dev-e12f03d7031a977356e3d7b75a68c2185ff8d155.tar.xz
linux-dev-e12f03d7031a977356e3d7b75a68c2185ff8d155.zip
perf/core: Implement the 'perf_kprobe' PMU
A new PMU type, perf_kprobe is added. Based on attr from perf_event_open(), perf_kprobe creates a kprobe (or kretprobe) for the perf_event. This kprobe is private to this perf_event, and thus not added to global lists, and not available in tracefs. Two functions, create_local_trace_kprobe() and destroy_local_trace_kprobe() are added to created and destroy these local trace_kprobe. Signed-off-by: Song Liu <songliubraving@fb.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Yonghong Song <yhs@fb.com> Reviewed-by: Josef Bacik <jbacik@fb.com> Cc: <daniel@iogearbox.net> Cc: <davem@davemloft.net> Cc: <kernel-team@fb.com> Cc: <rostedt@goodmis.org> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Link: http://lkml.kernel.org/r/20171206224518.3598254-6-songliubraving@fb.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'include/linux/trace_events.h')
-rw-r--r--include/linux/trace_events.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/trace_events.h b/include/linux/trace_events.h
index af44e7c2d577..21c5d43a21af 100644
--- a/include/linux/trace_events.h
+++ b/include/linux/trace_events.h
@@ -533,6 +533,10 @@ extern int perf_trace_init(struct perf_event *event);
extern void perf_trace_destroy(struct perf_event *event);
extern int perf_trace_add(struct perf_event *event, int flags);
extern void perf_trace_del(struct perf_event *event, int flags);
+#ifdef CONFIG_KPROBE_EVENTS
+extern int perf_kprobe_init(struct perf_event *event, bool is_retprobe);
+extern void perf_kprobe_destroy(struct perf_event *event);
+#endif
extern int ftrace_profile_set_filter(struct perf_event *event, int event_id,
char *filter_str);
extern void ftrace_profile_free_filter(struct perf_event *event);