Re: [PATCH] tracing/probe: Test nr_args match in looking for same probe events

From: Masami Hiramatsu
Date: Sat Sep 28 2019 - 05:57:21 EST


On Sat, 28 Sep 2019 01:17:48 -0700
Masami Hiramatsu <mhiramat@xxxxxxxxxx> wrote:

> If we found that 2 probes have different number of argument should not be
> folded at all.
> Also, we have to adjust error log position. Attached patch will fix those
> errors correctly as bellow.

Oops, missed the fixed tag. Anyway I'll send it as a patch mail.

Thank you,


>
> /sys/kernel/debug/tracing # echo p:myevent kernel_read %ax %bx >> kprobe_events
> /sys/kernel/debug/tracing # echo p:myevent kernel_read %ax %bx >> kprobe_events
> sh: write error: File exists
> /sys/kernel/debug/tracing # echo p:myevent kernel_read %ax >> kprobe_events
> sh: write error: File exists
> /sys/kernel/debug/tracing # echo p:myevent kernel_read %ax %bx %cx >> kprobe_eve
> nts
> sh: write error: File exists
> /sys/kernel/debug/tracing # cat error_log
> [ 15.917727] trace_kprobe: error: There is already the exact same probe event
> Command: p:myevent kernel_read %ax %bx
> ^
> [ 24.890638] trace_kprobe: error: Argument type or name is different from existing probe
> Command: p:myevent kernel_read %ax
> ^
> [ 31.480521] trace_kprobe: error: Argument type or name is different from existing probe
> Command: p:myevent kernel_read %ax %bx %cx
> ^
>
> Thank you,
>
> --
> Masami Hiramatsu


--
Masami Hiramatsu <mhiramat@xxxxxxxxxx>