tracing: kprobes: Output kprobe event to printk buffer

Since kprobe-events use event_trigger_unlock_commit_regs() directly,
that events doesn't show up in printk buffer if "tp_printk" is set.

Use trace_event_buffer_commit() in kprobe events so that it can
invoke output_printk() as same as other trace events.

Link: http://lkml.kernel.org/r/157867233085.17873.5210928676787339604.stgit@devnote2

Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
[ Adjusted data var declaration placement in __kretprobe_trace_func() ]
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
This commit is contained in:
Masami Hiramatsu
2020-01-11 01:05:31 +09:00
committed by Steven Rostedt (VMware)
parent d8d0c245a7
commit 8cfcf15503
4 changed files with 32 additions and 31 deletions

View File

@@ -216,6 +216,7 @@ struct trace_event_buffer {
void *entry;
unsigned long flags;
int pc;
struct pt_regs *regs;
};
void *trace_event_buffer_reserve(struct trace_event_buffer *fbuffer,