[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210615144737.087d11e9f901e68cadcb91c5@kernel.org>
Date: Tue, 15 Jun 2021 14:47:37 +0900
From: Masami Hiramatsu <mhiramat@...nel.org>
To: "Naveen N. Rao" <naveen.n.rao@...ux.vnet.ibm.com>
Cc: <linux-kernel@...r.kernel.org>,
Masami Hiramatsu <mhiramat@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
Steven Rostedt <rostedt@...dmis.org>,
Anton Blanchard <anton@...abs.org>
Subject: Re: [PATCH 1/2] trace/kprobe: Fix count of missed kretprobes in
kprobe_profile
On Mon, 14 Jun 2021 23:33:28 +0530
"Naveen N. Rao" <naveen.n.rao@...ux.vnet.ibm.com> wrote:
> For a kretprobe, the miss count includes the number of times the probe
> on function entry was missed, as well as the number of times we ran out
> of kretprobe_instance structures due to maxactive being too low.
>
> Fixes: cd7e7bd5e44718 ("tracing: Add kprobes event profiling interface")
> Signed-off-by: Naveen N. Rao <naveen.n.rao@...ux.vnet.ibm.com>
Good catch!
> ---
> kernel/trace/trace_kprobe.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/kernel/trace/trace_kprobe.c b/kernel/trace/trace_kprobe.c
> index ea6178cb5e334d..0475e2a6d0825e 100644
> --- a/kernel/trace/trace_kprobe.c
> +++ b/kernel/trace/trace_kprobe.c
> @@ -1192,7 +1192,8 @@ static int probes_profile_seq_show(struct seq_file *m, void *v)
> seq_printf(m, " %-44s %15lu %15lu\n",
> trace_probe_name(&tk->tp),
> trace_kprobe_nhit(tk),
> - tk->rp.kp.nmissed);
> + trace_kprobe_is_return(tk) ? tk->rp.kp.nmissed + tk->rp.nmissed
> + : tk->rp.kp.nmissed);
Can you add a static trace_kprobe_nmissed(tk) for wrapping this ?
Thank you,
>
> return 0;
> }
> --
> 2.31.1
>
--
Masami Hiramatsu <mhiramat@...nel.org>
Powered by blists - more mailing lists