From: Masami Hiramatsu <mhiramat@kernel.org>
To: "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com>
Cc: <linux-kernel@vger.kernel.org>,
Masami Hiramatsu <mhiramat@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Steven Rostedt <rostedt@goodmis.org>,
Anton Blanchard <anton@ozlabs.org>
Subject: Re: [PATCH 1/2] trace/kprobe: Fix count of missed kretprobes in kprobe_profile
Date: Tue, 15 Jun 2021 14:47:37 +0900 [thread overview]
Message-ID: <20210615144737.087d11e9f901e68cadcb91c5@kernel.org> (raw)
In-Reply-To: <2905f923966229953e6dc162b0a036853a420172.1623693448.git.naveen.n.rao@linux.vnet.ibm.com>
On Mon, 14 Jun 2021 23:33:28 +0530
"Naveen N. Rao" <naveen.n.rao@linux.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@linux.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@kernel.org>
next prev parent reply other threads:[~2021-06-15 5:47 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-14 18:03 [PATCH 0/2] trace/kprobe: Two fixes for kretprobes Naveen N. Rao
2021-06-14 18:03 ` [PATCH 1/2] trace/kprobe: Fix count of missed kretprobes in kprobe_profile Naveen N. Rao
2021-06-15 5:47 ` Masami Hiramatsu [this message]
2021-06-14 18:03 ` [PATCH 2/2] trace/kprobe: Remove limit on kretprobe maxactive Naveen N. Rao
2021-06-15 9:35 ` Masami Hiramatsu
2021-06-15 17:41 ` Naveen N. Rao
2021-06-16 0:46 ` Masami Hiramatsu
2021-06-16 1:03 ` Steven Rostedt
2021-06-16 2:27 ` Masami Hiramatsu
2021-06-16 15:10 ` Masami Hiramatsu
2021-06-17 16:34 ` Naveen N. Rao
2021-06-17 17:07 ` Steven Rostedt
2021-06-18 4:26 ` Masami Hiramatsu
2021-06-18 8:41 ` Naveen N. Rao
2021-06-17 16:19 ` Naveen N. Rao
2021-06-18 6:17 ` Masami Hiramatsu
2021-06-18 13:19 ` Naveen N. Rao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210615144737.087d11e9f901e68cadcb91c5@kernel.org \
--to=mhiramat@kernel.org \
--cc=anton@ozlabs.org \
--cc=linux-kernel@vger.kernel.org \
--cc=naveen.n.rao@linux.vnet.ibm.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox