tracing/boot: Add per-event histogram action options
authorMasami Hiramatsu <mhiramat@kernel.org>
Tue, 10 Aug 2021 02:07:21 +0000 (11:07 +0900)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Mon, 16 Aug 2021 15:37:21 +0000 (11:37 -0400)
commite66ed86ca6c52488249e95f7b3a6a3d7d6ab5e1e
tree618d38d44688c3995818516142734c13b31cf102
parentc3b1c377f0102e88dea6354d9cdb34a9d1c90971
tracing/boot: Add per-event histogram action options

Add a hist-trigger action syntax support to boot-time tracing.
Currently, boot-time tracing supports per-event actions as option
strings. However, for the histogram action, it has a special syntax
and usually needs a long action definition.
To make it readable and fit to the bootconfig syntax, this introduces
a new options for histogram.

Here are the histogram action options for boot-time tracing.

ftrace.[instance.INSTANCE.]event.GROUP.EVENT.hist {
     keys = <KEY>[,...]
     values = <VAL>[,...]
     sort = <SORT-KEY>[,...]
     size = <ENTRIES>
     name = <HISTNAME>
     var { <VAR> = <EXPR> ... }
     pause|continue|clear
     onmax|onchange { var = <VAR>; <ACTION> [= <PARAM>] }
     onmatch { event = <EVENT>; <ACTION> [= <PARAM>] }
     filter = <FILTER>
}

Where <ACTION> is one of below;

     trace = <EVENT>, <ARG1>[, ...]
     save = <ARG1>[, ...]
     snapshot

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