You've already forked linux-rockchip
mirror of
https://github.com/armbian/linux-rockchip.git
synced 2026-01-06 11:08:10 -08:00
tracing/kprobes: 'nmissed' not showed correctly for kretprobe
commitdfea08a211upstream. The 'nmissed' column of the 'kprobe_profile' file for kretprobe is not showed correctly, kretprobe can be skipped by two reasons, shortage of kretprobe_instance which is counted by tk->rp.nmissed, and kprobe itself is missed by some reason, so to show the sum. Link: https://lkml.kernel.org/r/20220107150242.5019-1-xyz.sun.ok@gmail.com Cc: stable@vger.kernel.org Fixes:4a846b443b("tracing/kprobes: Cleanup kprobe tracer code") Acked-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Xiangyang Zhang <xyz.sun.ok@gmail.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
b72075e395
commit
c524f4cfb3
@@ -1183,15 +1183,18 @@ static int probes_profile_seq_show(struct seq_file *m, void *v)
|
||||
{
|
||||
struct dyn_event *ev = v;
|
||||
struct trace_kprobe *tk;
|
||||
unsigned long nmissed;
|
||||
|
||||
if (!is_trace_kprobe(ev))
|
||||
return 0;
|
||||
|
||||
tk = to_trace_kprobe(ev);
|
||||
nmissed = trace_kprobe_is_return(tk) ?
|
||||
tk->rp.kp.nmissed + tk->rp.nmissed : tk->rp.kp.nmissed;
|
||||
seq_printf(m, " %-44s %15lu %15lu\n",
|
||||
trace_probe_name(&tk->tp),
|
||||
trace_kprobe_nhit(tk),
|
||||
tk->rp.kp.nmissed);
|
||||
nmissed);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user