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


Groups > linux.kernel > #1206379

Re: [BUGFIX PATCH perf/core ] perf-probe: Fix to show lines of sys_ functions correctly

From 平松雅巳 / HIRAMATU,MASAMI <masami.hiramatsu.pt@hitachi.com>
Newsgroups linux.kernel
Subject Re: [BUGFIX PATCH perf/core ] perf-probe: Fix to show lines of sys_ functions correctly
Date 2015-08-12 23:40 +0200
Message-ID <pWLUD-8bf-33@gated-at.bofh.it> (permalink)
References <pWsoW-4OY-5@gated-at.bofh.it> <pWt1E-5Oa-1@gated-at.bofh.it> <pWEgq-5DF-7@gated-at.bofh.it> <pWEzO-61F-65@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


> From: Arnaldo Carvalho de Melo [mailto:acme@kernel.org]
> 
> Em Wed, Aug 12, 2015 at 10:23:55AM -0300, Arnaldo Carvalho de Melo escreveu:
> > Em Wed, Aug 12, 2015 at 10:24:07AM +0900, Masami Hiramatsu escreveu:
> > > "perf probe --lines sys_poll" shows only the first line of
> > > sys_poll, because the SYSCALL_DEFINE macro
> > > ----
> 
> > Thanks! Just try prefixing those ---- lines one space so that git-am
> > works on your messages :-)
> 
> > Now to build and test, will report here the results.
> 
> Ok, now -L works:
> 
>   [root@zoo ~]# perf probe -L sys_select
>   <SyS_select@/home/git/linux/fs/select.c:0>
>       0  SYSCALL_DEFINE5(select, int, n, fd_set __user *, inp, fd_set __user *, outp,
>                         fd_set __user *, exp, struct timeval __user *, tvp)
>          {
>       3         struct timespec end_time, *to = NULL;
>                 struct timeval tv;
>                 int ret;
> 
>       7         if (tvp) {
>       8                 if (copy_from_user(&tv, tvp, sizeof(tv)))
>       9                         return -EFAULT;
> 
>      11                 to = &end_time;
>      12                 if (poll_select_set_timeout(to,
>                                         tv.tv_sec + (tv.tv_usec / USEC_PER_SEC),
>      14                                 (tv.tv_usec % USEC_PER_SEC) * NSEC_PER_USEC))
>      15                         return -EINVAL;
>                 }
> 
>      18         ret = core_sys_select(n, inp, outp, exp, to);
>      19         ret = poll_select_copy_remaining(&end_time, tvp, 1, ret);
> 
>      21         return ret;
>          }
> 
>          static long do_pselect(int n, fd_set __user *inp, fd_set __user *outp,
> 
> But then adding a probe doesn't work on sys_select, even with -L stating that I
> can add a probe at that line, maybe the code you added to make -L work needs to
> be shared with the other operations in 'perf probe'?

Oops, I missed a {} around new if statement...
I'll update the patch asap.

Thanks!

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

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


Thread

perf probe -L sys_select or sys_poll Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-08-11 16:20 +0200
  RE: perf probe -L sys_select or sys_poll 平松雅巳 / HIRAMATU,MASAMI   <masami.hiramatsu.pt@hitachi.com> - 2015-08-12 01:00 +0200
  RE: perf probe -L sys_select or sys_poll 平松雅巳 / HIRAMATU,MASAMI   <masami.hiramatsu.pt@hitachi.com> - 2015-08-12 02:50 +0200
    [BUGFIX PATCH perf/core ] perf-probe: Fix to show lines of sys_  functions correctly Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> - 2015-08-12 03:30 +0200
      Re: [BUGFIX PATCH perf/core ] perf-probe: Fix to show lines of sys_  functions correctly Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-08-12 15:30 +0200
        Re: [BUGFIX PATCH perf/core ] perf-probe: Fix to show lines of sys_  functions correctly Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-08-12 15:50 +0200
          Re: [BUGFIX PATCH perf/core ] perf-probe: Fix to show lines of sys_  functions correctly 平松雅巳 / HIRAMATU,MASAMI   <masami.hiramatsu.pt@hitachi.com> - 2015-08-12 23:40 +0200
      [tip:perf/core] perf probe:   Fix to show lines of sys_ functions correctly tip-bot for Masami Hiramatsu <tipbot@zytor.com> - 2015-08-13 10:10 +0200

csiph-web