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


Groups > linux.kernel > #1346524

Re: [RFC] perf: probe_finder: continue if atleast one probe point found

From Joel Fernandes <agnel.joel@gmail.com>
Newsgroups linux.kernel
Subject Re: [RFC] perf: probe_finder: continue if atleast one probe point found
Date 2016-03-01 11:40 +0100
Message-ID <r7PSF-7T6-5@gated-at.bofh.it> (permalink)
References (1 earlier) <r77RD-1De-7@gated-at.bofh.it> <r7wQ2-483-9@gated-at.bofh.it> <r7wQ2-483-7@gated-at.bofh.it> <r7J0R-3vn-1@gated-at.bofh.it> <r7K6B-4aZ-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi Hiramatu,

On Mon, Feb 29, 2016 at 8:29 PM, 平松雅巳 / HIRAMATU,MASAMI
<masami.hiramatsu.pt@hitachi.com> wrote:
> BTW,
>
> ./perf probe  \
>   -k ./vmlinux -s ./ -x /lib/x86_64-linux-gnu/libc.so.6 -a 'malloc $params'
>
> might help your case. $params is expanded to function parameters automatically
> and if there is no parameters, it is just ignored :)

Thanks, I agree this is a better approach.

How about an informative error letting the user know about it? Is the
below Ok? I can send a patch.

----x8--------
diff --git a/tools/perf/util/probe-finder.c b/tools/perf/util/probe-finder.c
index 4ce5c5e..21f282a 100644
--- a/tools/perf/util/probe-finder.c
+++ b/tools/perf/util/probe-finder.c
@@ -1247,8 +1247,12 @@ static int add_probe_trace_event(Dwarf_Die
*sc_die, struct probe_finder *pf)
                pf->tvar = &tev->args[i];
                /* Variable should be found from scope DIE */
                ret = find_variable(sc_die, pf);
-               if (ret != 0)
+               if (ret != 0) {
+                       pr_err("Variable couldn't be found, if probe
is on inline function,"
+                              "try '%s' or '%s' instead.\n",
+                              PROBE_ARG_PARAMS, PROBE_ARG_VARS);
                        break;
+               }
        }

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[RFC] perf: probe_finder: continue if atleast one probe point found Joel Fernandes <joel.opensrc@gmail.com> - 2016-02-28 12:20 +0100
  Re: [RFC] perf: probe_finder: continue if atleast one probe point  found Taeung Song <treeze.taeung@gmail.com> - 2016-02-28 12:40 +0100
    Re: [RFC] perf: probe_finder: continue if atleast one probe point  found Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-02-29 15:20 +0100
      RE: [RFC] perf: probe_finder: continue if atleast one probe point  found 平松雅巳 / HIRAMATU,MASAMI   <masami.hiramatsu.pt@hitachi.com> - 2016-03-01 04:20 +0100
        RE: [RFC] perf: probe_finder: continue if atleast one probe point  found 平松雅巳 / HIRAMATU,MASAMI   <masami.hiramatsu.pt@hitachi.com> - 2016-03-01 05:30 +0100
          Re: [RFC] perf: probe_finder: continue if atleast one probe point found Joel Fernandes <agnel.joel@gmail.com> - 2016-03-01 11:40 +0100
          Re: [RFC] perf: probe_finder: continue if atleast one probe point found Joel Fernandes <agnel.joel@gmail.com> - 2016-03-01 11:40 +0100

csiph-web