Skip to content

Commit

Permalink
tracing: Add synth event generation test module
Browse files Browse the repository at this point in the history
Add a test module that checks the basic functionality of the in-kernel
synthetic event generation API by generating and tracing synthetic
events from a module.

Link: http://lkml.kernel.org/r/fcb4dd9eb9eefb70ab20538d3529d51642389664.1580323897.git.zanussi@kernel.org

Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Tom Zanussi <zanussi@kernel.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
  • Loading branch information
Tom Zanussi authored and rostedt committed Jan 30, 2020
1 parent 8dcc53a commit 9fe41ef
Show file tree
Hide file tree
Showing 3 changed files with 537 additions and 0 deletions.
13 changes: 13 additions & 0 deletions kernel/trace/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -774,6 +774,19 @@ config PREEMPTIRQ_DELAY_TEST

If unsure, say N

config SYNTH_EVENT_GEN_TEST
tristate "Test module for in-kernel synthetic event generation"
depends on HIST_TRIGGERS
help
This option creates a test module to check the base
functionality of in-kernel synthetic event definition and
generation.

To test, insert the module, and then check the trace buffer
for the generated sample events.

If unsure, say N.

config TRACE_EVAL_MAP_FILE
bool "Show eval mappings for trace events"
depends on TRACING
Expand Down
1 change: 1 addition & 0 deletions kernel/trace/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ obj-$(CONFIG_TRACING) += trace_stat.o
obj-$(CONFIG_TRACING) += trace_printk.o
obj-$(CONFIG_TRACING_MAP) += tracing_map.o
obj-$(CONFIG_PREEMPTIRQ_DELAY_TEST) += preemptirq_delay_test.o
obj-$(CONFIG_SYNTH_EVENT_GEN_TEST) += synth_event_gen_test.o
obj-$(CONFIG_CONTEXT_SWITCH_TRACER) += trace_sched_switch.o
obj-$(CONFIG_FUNCTION_TRACER) += trace_functions.o
obj-$(CONFIG_PREEMPTIRQ_TRACEPOINTS) += trace_preemptirq.o
Expand Down
Loading

0 comments on commit 9fe41ef

Please sign in to comment.