Skip to contentSkip to conversation

ftrace/kprobe: Show the maxactive number on kprobe_events

PATCH New Masami Hiramatsu 1 participant 1 message Mar 24, 2020 Tracing

lore
Share & tools
lore

Masami Hiramatsu

author maintainer
#0 lore raw

PATCH 1/1 ftrace/kprobe: Show the maxactive number on kprobe_events

Show maxactive parameter on kprobe_events. This allows user to save the current configuration and restore it without losing maxactive parameter.

---
 kernel/trace/trace_kprobe.c |    2 ++
 1 file changed, 2 insertions(+)
kernel/trace/trace_kprobe.c +2 -0
index 362cca52f5de..d0568af4a0ef 100644
@@ -1078,6 +1078,8 @@ static int trace_kprobe_show(struct seq_file *m, struct dyn_event *ev)
 	int i;
 
 	seq_putc(m, trace_kprobe_is_return(tk) ? 'r' : 'p');
+	if (trace_kprobe_is_return(tk) && tk->rp.maxactive)
+		seq_printf(m, "%d", tk->rp.maxactive);
 	seq_printf(m, ":%s/%s", trace_probe_group_name(&tk->tp),
 				trace_probe_name(&tk->tp));