linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC] perf probe: -x option position issue
@ 2015-03-30 17:46 Jiri Olsa
  2015-03-30 19:48 ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 12+ messages in thread
From: Jiri Olsa @ 2015-03-30 17:46 UTC (permalink / raw)
  To: Masami Hiramatsu
  Cc: Ingo Molnar, Namhyung Kim, Arnaldo Carvalho de Melo,
	Peter Zijlstra, David Ahern, linux-kernel, Martin Cermak

hi,
Martin found out following issue.. having following ex binary:

---
int main(void)
{
        return 0;
}
---

following will create uprobe on main:

  [root@dell-per510-01 perf]# gcc -g -o ex ex.c
  [root@dell-per510-01 perf]# ./perf probe -x ./ex -a main
  Added new event:
    probe_ex:main        (on main in /root/linux/tools/perf/ex)

  You can now use it in all perf tools, such as:

          perf record -e probe_ex:main -aR sleep 1

  [root@dell-per510-01 perf]# cat /sys/kernel/debug/tracing/uprobe_events 
  p:probe_ex/main /root/linux/tools/perf/ex:0x00000000000004f6


while following will create (?) kprobe with complain in dmesg:

  [root@dell-per510-01 perf]# gcc -g -o ex ex.c
  [root@dell-per510-01 perf]# ./perf probe -a main -x ./ex
  Added new event:
    probe:main           (on main in ex)

  You can now use it in all perf tools, such as:

          perf record -e probe:main -aR sleep 1

  [root@dell-per510-01 perf]# dmesg | tail -2
  [16986.182159] Could not insert probe at ex:main+0: -2
  [16986.187030] This probe might be able to register aftertarget module is loaded. Continue.


that does not seem as an expected behaviour, or am I missing something?

thanks,
jirka

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2015-04-11  6:39 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-30 17:46 [RFC] perf probe: -x option position issue Jiri Olsa
2015-03-30 19:48 ` Arnaldo Carvalho de Melo
2015-03-31  8:04   ` Masami Hiramatsu
2015-03-31 13:33     ` Arnaldo Carvalho de Melo
2015-04-01  8:37       ` Masami Hiramatsu
2015-04-01 10:25       ` [PATCH perf/core 1/2] perf-probe: Support multiple probes on different binaries Masami Hiramatsu
2015-04-11  6:37         ` [tip:perf/core] perf probe: " tip-bot for Masami Hiramatsu
2015-04-01 10:25       ` [PATCH perf/core 2/2] perf-probe: Check the orphaned -x option Masami Hiramatsu
2015-04-01 11:11         ` Jiri Olsa
2015-04-10  6:51         ` Masami Hiramatsu
2015-04-10 13:22           ` Arnaldo Carvalho de Melo
2015-04-11  6:38         ` [tip:perf/core] perf probe: " tip-bot for Masami Hiramatsu

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 NNTP newsgroup(s).