On Mon, Jun 29, 2015 at 11:44 PM, Benjamin King <[email protected]> wrote: > > On Mon, Jun 29, 2015 at 12:00:38PM -0300, Arnaldo Carvalho de Melo wrote: >> >> Em Sun, Jun 28, 2015 at 05:46:51PM +0200, Benjamin King escreveu: >>> >>> >Is there a trick to getting perf to probe a user-level address without >>> >debuginfo? Eg (on Linux 4.0): >>> >[...] >>> >I can do this using ftrace ok, eg, "p:tick_0x583 /root/tick:0x583" >>> >works. Thanks, >>> >>> Not quite what you have asked for, but you can add the probe via ftrace and >>> then use it from perf. Probes from /sys/kernel/debug/tracing/uprobe_events >>> will show up in 'perf list' as well. >> >> >> Masami, >> >> Is this already possible? > > > Hi Arnaldo, > > for me this works in 3.19.0. I'm using the attached script to help me add > probes to /sys/kernel/debug/tracing/uprobe_events which I can then see with > 'sudo perf list' and use from the other perf subcommands. Tracing arguments is > also working fine: > > --- snip --- > $ uprobe /lib/x86_64-linux-gnu/libc.so.6 malloc %di
Nice - and I'd been thinking along the same lines, that it wouldn't be hard to write a helper, and published something to do it all from ftrace: http://www.brendangregg.com/blog/2015-06-28/linux-ftrace-uprobe.html But I was thinking about doing this from perf as well, or instead. [...] > > I failed to manage placing proper probes in C++-Code with perf probe, so I > hacked the script together after reading Brendans ftrace article on LWN. > > Cheers, > Benjamin -- To unsubscribe from this list: send the line "unsubscribe linux-perf-users" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
