tracing: Allow stacktraces to be saved as histogram variables
authorSteven Rostedt (Google) <rostedt@goodmis.org>
Tue, 17 Jan 2023 15:21:27 +0000 (10:21 -0500)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Wed, 25 Jan 2023 15:31:24 +0000 (10:31 -0500)
commit288709c9f3b0236000754824bcabc9a9ffaa3738
tree5b6d7b473cee961923e74875103c57e4487e58ea
parent19ff80496450f58a148effa2551350f3b89e4990
tracing: Allow stacktraces to be saved as histogram variables

Allow to save stacktraces into a histogram variable. This will be used by
synthetic events to allow a stacktrace from one event to be passed and
displayed by another event.

The special keyword "stacktrace" is to be used to trigger a stack
trace for the event that the histogram trigger is attached to.

  echo 'hist:keys=pid:st=stacktrace" > events/sched/sched_waking/trigger

Currently nothing can get access to the "$st" variable above that contains
the stack trace, but that will soon change.

Link: https://lkml.kernel.org/r/20230117152235.856323729@goodmis.org
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Tom Zanussi <zanussi@kernel.org>
Cc: Ross Zwisler <zwisler@google.com>
Cc: Ching-lin Yu <chinglinyu@google.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
kernel/trace/trace_events_hist.c