tracing/boot: Add per-event settings
authorMasami Hiramatsu <mhiramat@kernel.org>
Fri, 10 Jan 2020 16:06:29 +0000 (01:06 +0900)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Mon, 13 Jan 2020 18:19:41 +0000 (13:19 -0500)
commit81a59555ff1593642824414267e1859024bd0162
tree690ba5b7eca5e7d86c9839c31069d81dab62fa94
parent9c5b9d3d65e485826fb935453f01171b1a337aa8
tracing/boot: Add per-event settings

Add per-event settings for boottime tracing. User can set filter,
actions and enable on each event on boot. The event entries are
under ftrace.event.GROUP.EVENT node (note that the option key
includes event's group name and event name.) This supports below
configs.

 - ftrace.event.GROUP.EVENT.enable
   Enables GROUP:EVENT tracing.

 - ftrace.event.GROUP.EVENT.filter = FILTER
   Set FILTER rule to the GROUP:EVENT.

 - ftrace.event.GROUP.EVENT.actions = ACTION[, ACTION2...]
   Set ACTIONs to the GROUP:EVENT.

For example,

  ftrace.event.sched.sched_process_exec {
                filter = "pid < 128"
enable
  }

this will enable tracing "sched:sched_process_exec" event
with "pid < 128" filter.

Link: http://lkml.kernel.org/r/157867238942.17873.11177628789184546198.stgit@devnote2
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
kernel/trace/trace_boot.c
kernel/trace/trace_events_trigger.c