G'Day Masami-san, On Wed, Jul 1, 2015 at 4:05 AM, Masami Hiramatsu <[email protected]> wrote: > On 2015/07/01 3:40, Brendan Gregg wrote: >> G'Day Masami, >> >> On Tue, Jun 30, 2015 at 12:37 AM, Masami Hiramatsu >> <[email protected]> wrote: >>> On 2015/06/30 0:00, Arnaldo Carvalho de Melo wrote: >>>> Em Sun, Jun 28, 2015 at 05:46:51PM +0200, Benjamin King escreveu: >>>>> Hi Brendan >>>>> >>>>>> 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? >>> >>> Yes, it should be possible. However, I don't recommend you to >>> probe the address inside a function without debuginfo. You must >>> check the instruction boundary in that case. >> >> Ah, because otherwise I could accidentally trace at a non-zero offsite >> inside an instruction? That probably explains the only failure I saw >> on uprobes on linux 4.0. >> >> Here's the original use case: >> >> # readelf -n /root/node/node >> [...] >> stapsdt 0x00000082 NT_STAPSDT (SystemTap probe descriptors) >> Provider: node >> Name: http__client__request >> Location: 0x0000000000bf48ff, Base: 0x0000000000f22464, Semaphore: >> 0x0000000001243024 >> Arguments: 8@%rax 8@%rdx 8@-136(%rbp) -4@-140(%rbp) 8@-72(%rbp) >> 8@-80(%rbp) -4@-144(%rbp) >> [...] >> >> These user SDT probes (or "USDT probes") can't currently be traced >> using perf (although Hemant Kumar was working on a patch). > > Yes, and I'm working on it.
Oh, can't wait! :) If it's helpful, I did some USDT hacking with ftrace: http://www.brendangregg.com/blog/2015-07-03/hacking-linux-usdt-ftrace.html , although this is really a place-holder until we have a proper implementation. Brendan -- 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
