Skip to content

Commit

Permalink
user_events: Add minimal support for trace_event into ftrace
Browse files Browse the repository at this point in the history
Minimal support for interacting with dynamic events, trace_event and
ftrace. Core outline of flow between user process, ioctl and trace_event
APIs.

Signed-off-by: Beau Belgrave <beaub@linux.microsoft.com>
  • Loading branch information
Beau Belgrave authored and intel-lab-lkp committed Nov 4, 2021
1 parent 220ebd2 commit da0961a
Show file tree
Hide file tree
Showing 3 changed files with 1,156 additions and 0 deletions.
15 changes: 15 additions & 0 deletions kernel/trace/Kconfig
Expand Up @@ -724,6 +724,21 @@ config SYNTH_EVENTS

If in doubt, say N.

config USER_EVENTS
bool "User trace events"
select TRACING
select DYNAMIC_EVENTS
default n
help
User trace events are user-defined trace events that
can be used like an existing kernel trace event. User trace
events are generated by writing to a tracefs file. User
processes can determine if their tracing events should be
generated by memory mapping a tracefs file and checking for
an associated byte being non-zero.

If in doubt, say N.

config HIST_TRIGGERS
bool "Histogram triggers"
depends on ARCH_HAVE_NMI_SAFE_CMPXCHG
Expand Down
1 change: 1 addition & 0 deletions kernel/trace/Makefile
Expand Up @@ -82,6 +82,7 @@ obj-$(CONFIG_PROBE_EVENTS) += trace_eprobe.o
obj-$(CONFIG_TRACE_EVENT_INJECT) += trace_events_inject.o
obj-$(CONFIG_SYNTH_EVENTS) += trace_events_synth.o
obj-$(CONFIG_HIST_TRIGGERS) += trace_events_hist.o
obj-$(CONFIG_USER_EVENTS) += trace_events_user.o
obj-$(CONFIG_BPF_EVENTS) += bpf_trace.o
obj-$(CONFIG_KPROBE_EVENTS) += trace_kprobe.o
obj-$(CONFIG_TRACEPOINTS) += error_report-traces.o
Expand Down

0 comments on commit da0961a

Please sign in to comment.