Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1611582 > unrolled thread

[RFC PATCH tip/master 1/3] trace: kprobes: Show sum of probe/retprobe nmissed count

Started byMasami Hiramatsu <mhiramat@kernel.org>
First post2017-03-29 07:30 +0200
Last post2017-03-31 11:50 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [RFC PATCH tip/master 1/3] trace: kprobes: Show sum of probe/retprobe nmissed count Masami Hiramatsu <mhiramat@kernel.org> - 2017-03-29 07:30 +0200
    Re: [RFC PATCH tip/master 1/3] trace: kprobes: Show sum of  probe/retprobe nmissed count Alban Crequy <alban@kinvolk.io> - 2017-03-31 11:50 +0200

#1611582 — [RFC PATCH tip/master 1/3] trace: kprobes: Show sum of probe/retprobe nmissed count

FromMasami Hiramatsu <mhiramat@kernel.org>
Date2017-03-29 07:30 +0200
Subject[RFC PATCH tip/master 1/3] trace: kprobes: Show sum of probe/retprobe nmissed count
Message-ID<tqelb-2ha-1@gated-at.bofh.it>
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>
---
 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;
 }

[toc] | [next] | [standalone]


#1613818 — Re: [RFC PATCH tip/master 1/3] trace: kprobes: Show sum of probe/retprobe nmissed count

FromAlban Crequy <alban@kinvolk.io>
Date2017-03-31 11:50 +0200
SubjectRe: [RFC PATCH tip/master 1/3] trace: kprobes: Show sum of probe/retprobe nmissed count
Message-ID<tr1lU-2QW-33@gated-at.bofh.it>
In reply to#1611582
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;
>  }
>

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web