From: Alban Crequy <alban@kinvolk.io>
To: Masami Hiramatsu <mhiramat@kernel.org>
Cc: "Steven Rostedt" <rostedt@goodmis.org>,
"Ingo Molnar" <mingo@redhat.com>,
"Alban Crequy" <alban.crequy@gmail.com>,
"Alexei Starovoitov" <ast@kernel.org>,
"Jonathan Corbet" <corbet@lwn.net>,
"Arnaldo Carvalho de Melo" <acme@redhat.com>,
"Omar Sandoval" <osandov@fb.com>,
linux-doc@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org,
"Iago López Galeiras" <iago@kinvolk.io>,
"Michael Schubert" <michael@kinvolk.io>,
"Dorau Lukasz" <lukasz.dorau@intel.com>,
systemtap@sourceware.org
Subject: Re: [RFC PATCH tip/master 1/3] trace: kprobes: Show sum of probe/retprobe nmissed count
Date: Fri, 31 Mar 2017 09:45:00 -0000 [thread overview]
Message-ID: <CADZs7q4k9YLgRuxccy7vuOns53GcPXG4D6HosRjfAeKm=RrL2A@mail.gmail.com> (raw)
In-Reply-To: <149076491191.24574.9187877160820798843.stgit@devbox>
On Wed, Mar 29, 2017 at 7:22 AM, Masami Hiramatsu <mhiramat@kernel.org> wrote:
> Show sum of probe and retprobe nmissed count in
> kprobe_profile, since retprobe can be missed even
> if the kprobe itself succeeeded.
> This explains user why their return probe didn't hit
> sometimes.
>
> Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
I tested this patch with my kretprobe on "inet_csk_accept" when there
are many processes waiting in the accept() syscall. I can now
successfully see the nmissed counter in
/sys/kernel/debug/tracing/kprobe_profile being incremented when the
kretprobe is missed.
Tested-by: Alban Crequy <alban@kinvolk.io>
> ---
> kernel/trace/trace_kprobe.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/trace/trace_kprobe.c b/kernel/trace/trace_kprobe.c
> index 013f4e7..bbdc3de 100644
> --- a/kernel/trace/trace_kprobe.c
> +++ b/kernel/trace/trace_kprobe.c
> @@ -896,7 +896,7 @@ static int probes_profile_seq_show(struct seq_file *m, void *v)
> seq_printf(m, " %-44s %15lu %15lu\n",
> trace_event_name(&tk->tp.call),
> trace_kprobe_nhit(tk),
> - tk->rp.kp.nmissed);
> + tk->rp.kp.nmissed + tk->rp.nmissed);
>
> return 0;
> }
>
next prev parent reply other threads:[~2017-03-31 9:45 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-29 5:21 [RFC PATCH tip/master 0/3] kprobes: tracing: kretprobe_instance dynamic allocation Masami Hiramatsu
2017-03-29 5:23 ` [RFC PATCH tip/master 1/3] trace: kprobes: Show sum of probe/retprobe nmissed count Masami Hiramatsu
2017-03-31 9:45 ` Alban Crequy [this message]
2017-03-29 5:24 ` [RFC PATCH tip/master 2/3] kprobes: Allocate kretprobe instance if its free list is empty Masami Hiramatsu
2017-03-29 6:30 ` Ingo Molnar
2017-03-29 8:25 ` Masami Hiramatsu
2017-03-29 17:18 ` Josh Stone
2017-03-30 0:39 ` Masami Hiramatsu
2017-03-30 6:53 ` Ingo Molnar
2017-03-30 13:01 ` Masami Hiramatsu
2017-04-12 6:42 ` Ingo Molnar
2017-03-30 13:03 ` Alban Crequy
2017-03-29 5:25 ` [RFC PATCH tip/master 3/3] kprobes: Limit kretprobe maximum instances Masami Hiramatsu
2017-03-29 13:27 ` [RFC PATCH tip/master 0/3] kprobes: tracing: kretprobe_instance dynamic allocation Frank Ch. Eigler
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='CADZs7q4k9YLgRuxccy7vuOns53GcPXG4D6HosRjfAeKm=RrL2A@mail.gmail.com' \
--to=alban@kinvolk.io \
--cc=acme@redhat.com \
--cc=alban.crequy@gmail.com \
--cc=ast@kernel.org \
--cc=corbet@lwn.net \
--cc=iago@kinvolk.io \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lukasz.dorau@intel.com \
--cc=mhiramat@kernel.org \
--cc=michael@kinvolk.io \
--cc=mingo@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=osandov@fb.com \
--cc=rostedt@goodmis.org \
--cc=systemtap@sourceware.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).