* perf probe Argument list too long
@ 2015-11-03 0:50 Alex Bagehot
2015-11-03 1:00 ` Arnaldo Carvalho de Melo
0 siblings, 1 reply; 6+ messages in thread
From: Alex Bagehot @ 2015-11-03 0:50 UTC (permalink / raw)
To: linux-perf-users
Hello,
I get this error with perf probe, :
perf probe -vvv -x /opt/jdk1.8.0_60/jre/lib/amd64/server/libjvm.so
'_ZN13CollectedHeap24common_mem_allocate_initE11KlassHandlemP6Thread'
probe-definition(0):
_ZN13CollectedHeap24common_mem_allocate_initE11KlassHandlemP6Thread
symbol:_ZN13CollectedHeap24common_mem_allocate_initE11KlassHandlemP6Thread
file:(null) line:0 offset:0 return:0 lazy:(null)
0 arguments
Opening /sys/kernel/debug/tracing/uprobe_events write=1
Added new event:
snprintf() failed: -7
Error: Failed to add events. Reason: Argument list too long (Code: -7)
it looks like it's failing here: ./util/probe-event.c
probe_trace_event__set_name
/* Get an unused new event name */
ret = get_new_event_name(buf, 64, event,
namelist, allow_suffix);
It works with a function 63 chars long not 64.
Knowing it is the event name erroring, It also works if I give the
event a short name eg. 'a'. I don't understand why it creates 3 probes
though?
objdump -t /opt/jdk1.8.0_60/jre/lib/amd64/server/libjvm.so|grep
\.text|awk 'length($NF) == 63 {print length($NF)" "$NF}'|head -1
63 _ZL34bulk_revoke_or_rebias_at_safepointP7oopDescbbP10JavaThread
perf probe -vvv -x /opt/jdk1.8.0_60/jre/lib/amd64/server/libjvm.so
'_ZL34bulk_revoke_or_rebias_at_safepointP7oopDescbbP10JavaThread'
probe-definition(0):
_ZL34bulk_revoke_or_rebias_at_safepointP7oopDescbbP10JavaThread
symbol:_ZL34bulk_revoke_or_rebias_at_safepointP7oopDescbbP10JavaThread
file:(null) line:0 offset:0 return:0 lazy:(null)
0 arguments
Opening /sys/kernel/debug/tracing/uprobe_events write=1
Added new event:
Writing event: p:probe_libjvm/_ZL34bulk_revoke_or_rebias_at_safepointP7oopDescbbP10JavaThread
/opt/jdk1.8.0_60/jre/lib/amd64/server/libjvm.so:0x325a20
probe_libjvm:_ZL34bulk_revoke_or_rebias_at_safepointP7oopDescbbP10JavaThread
(on _ZL34bulk_revoke_or_rebias_at_safepointP7oopDescbbP10JavaThread in
/opt/jdk1.8.0_60/jre/lib/amd64/server/libjvm.so)
You can now use it in all perf tools, such as:
perf record -e probe_libjvm:_ZL34bulk_revoke_or_rebias_at_safepointP7oopDescbbP10JavaThread
-aR sleep 1
perf probe -vvv -x /opt/jdk1.8.0_60/jre/lib/amd64/server/libjvm.so
'a=_Z17do_write_prologueIP17GlobalTraceBufferEvR15JfrBufferWriterT_'
probe-definition(0):
a=_Z17do_write_prologueIP17GlobalTraceBufferEvR15JfrBufferWriterT_
symbol:_Z17do_write_prologueIP17GlobalTraceBufferEvR15JfrBufferWriterT_
file:(null) line:0 offset:0 return:0 lazy:(null)
0 arguments
Opening /sys/kernel/debug/tracing/uprobe_events write=1
Added new events:
Writing event: p:probe_libjvm/a
/opt/jdk1.8.0_60/jre/lib/amd64/server/libjvm.so:0x8ca940
probe_libjvm:a (on
_Z17do_write_prologueIP17GlobalTraceBufferEvR15JfrBufferWriterT_ in
/opt/jdk1.8.0_60/jre/lib/amd64/server/libjvm.so)
Writing event: p:probe_libjvm/a_1
/opt/jdk1.8.0_60/jre/lib/amd64/server/libjvm.so:0x9c07fe
probe_libjvm:a_1 (on
_Z17do_write_prologueIP17GlobalTraceBufferEvR15JfrBufferWriterT_ in
/opt/jdk1.8.0_60/jre/lib/amd64/server/libjvm.so)
Writing event: p:probe_libjvm/a_2
/opt/jdk1.8.0_60/jre/lib/amd64/server/libjvm.so:0x9c25c1
probe_libjvm:a_2 (on
_Z17do_write_prologueIP17GlobalTraceBufferEvR15JfrBufferWriterT_ in
/opt/jdk1.8.0_60/jre/lib/amd64/server/libjvm.so)
You can now use it in all perf tools, such as:
perf record -e probe_libjvm:a_2 -aR sleep 1
perf probe -l
probe_libjvm:a (on
_Z17do_write_prologueIP17GlobalTraceBufferEvR15JfrBufferWriterT_ in
/opt/jdk1.8.0_60/jre/lib/amd64/server/libjvm.so)
probe_libjvm:a_1 (on
_Z17do_write_prologueIP17GlobalTraceBufferEvR15JfrBufferWriterT_ in
/opt/jdk1.8.0_60/jre/lib/amd64/server/libjvm.so)
probe_libjvm:a_2 (on
_Z17do_write_prologueIP17GlobalTraceBufferEvR15JfrBufferWriterT_ in
/opt/jdk1.8.0_60/jre/lib/amd64/server/libjvm.so)
uname -a
Linux vagrant-ubuntu-trusty-64 4.3.0-999-generic #201510112200 SMP Mon
Oct 12 02:01:41 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
Thanks,
Alex
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: perf probe Argument list too long 2015-11-03 0:50 perf probe Argument list too long Alex Bagehot @ 2015-11-03 1:00 ` Arnaldo Carvalho de Melo 2015-11-03 3:20 ` 平松雅巳 / HIRAMATU,MASAMI 0 siblings, 1 reply; 6+ messages in thread From: Arnaldo Carvalho de Melo @ 2015-11-03 1:00 UTC (permalink / raw) To: Masami Hiramatsu; +Cc: Alex Bagehot, linux-perf-users Em Tue, Nov 03, 2015 at 12:50:46AM +0000, Alex Bagehot escreveu: > Hello, > > I get this error with perf probe, : > > perf probe -vvv -x /opt/jdk1.8.0_60/jre/lib/amd64/server/libjvm.so > '_ZN13CollectedHeap24common_mem_allocate_initE11KlassHandlemP6Thread' > > probe-definition(0): > _ZN13CollectedHeap24common_mem_allocate_initE11KlassHandlemP6Thread > symbol:_ZN13CollectedHeap24common_mem_allocate_initE11KlassHandlemP6Thread > file:(null) line:0 offset:0 return:0 lazy:(null) > 0 arguments > Opening /sys/kernel/debug/tracing/uprobe_events write=1 > Added new event: > snprintf() failed: -7 > Error: Failed to add events. Reason: Argument list too long (Code: -7) > > > it looks like it's failing here: ./util/probe-event.c > probe_trace_event__set_name > > /* Get an unused new event name */ > ret = get_new_event_name(buf, 64, event, > namelist, allow_suffix); Masami, do we really need to cap it at 64 bytes? And would it be possible to improve that error reporting? I.e. this isn't an "argument list", right? > It works with a function 63 chars long not 64. > Knowing it is the event name erroring, It also works if I give the > event a short name eg. 'a'. I don't understand why it creates 3 probes > though? Masami? You gave this explanation at some point, but I forgot, aliases? Inlining? Would be interesting to warn the user why multiple probes are being created, no? Alex, you can try using wildcards in this case, i.e.: perf record -e probe_libjvm:a* your-workload That if you don't have other probes in place starting with the same prefix :-\ - Arnaldo > objdump -t /opt/jdk1.8.0_60/jre/lib/amd64/server/libjvm.so|grep > \.text|awk 'length($NF) == 63 {print length($NF)" "$NF}'|head -1 > > 63 _ZL34bulk_revoke_or_rebias_at_safepointP7oopDescbbP10JavaThread > > > > perf probe -vvv -x /opt/jdk1.8.0_60/jre/lib/amd64/server/libjvm.so > '_ZL34bulk_revoke_or_rebias_at_safepointP7oopDescbbP10JavaThread' > > probe-definition(0): > _ZL34bulk_revoke_or_rebias_at_safepointP7oopDescbbP10JavaThread > symbol:_ZL34bulk_revoke_or_rebias_at_safepointP7oopDescbbP10JavaThread > file:(null) line:0 offset:0 return:0 lazy:(null) > 0 arguments > Opening /sys/kernel/debug/tracing/uprobe_events write=1 > Added new event: > Writing event: p:probe_libjvm/_ZL34bulk_revoke_or_rebias_at_safepointP7oopDescbbP10JavaThread > /opt/jdk1.8.0_60/jre/lib/amd64/server/libjvm.so:0x325a20 > probe_libjvm:_ZL34bulk_revoke_or_rebias_at_safepointP7oopDescbbP10JavaThread > (on _ZL34bulk_revoke_or_rebias_at_safepointP7oopDescbbP10JavaThread in > /opt/jdk1.8.0_60/jre/lib/amd64/server/libjvm.so) > > You can now use it in all perf tools, such as: > > perf record -e probe_libjvm:_ZL34bulk_revoke_or_rebias_at_safepointP7oopDescbbP10JavaThread > -aR sleep 1 > > > > perf probe -vvv -x /opt/jdk1.8.0_60/jre/lib/amd64/server/libjvm.so > 'a=_Z17do_write_prologueIP17GlobalTraceBufferEvR15JfrBufferWriterT_' > > probe-definition(0): > a=_Z17do_write_prologueIP17GlobalTraceBufferEvR15JfrBufferWriterT_ > symbol:_Z17do_write_prologueIP17GlobalTraceBufferEvR15JfrBufferWriterT_ > file:(null) line:0 offset:0 return:0 lazy:(null) > 0 arguments > Opening /sys/kernel/debug/tracing/uprobe_events write=1 > Added new events: > Writing event: p:probe_libjvm/a > /opt/jdk1.8.0_60/jre/lib/amd64/server/libjvm.so:0x8ca940 > probe_libjvm:a (on > _Z17do_write_prologueIP17GlobalTraceBufferEvR15JfrBufferWriterT_ in > /opt/jdk1.8.0_60/jre/lib/amd64/server/libjvm.so) > Writing event: p:probe_libjvm/a_1 > /opt/jdk1.8.0_60/jre/lib/amd64/server/libjvm.so:0x9c07fe > probe_libjvm:a_1 (on > _Z17do_write_prologueIP17GlobalTraceBufferEvR15JfrBufferWriterT_ in > /opt/jdk1.8.0_60/jre/lib/amd64/server/libjvm.so) > Writing event: p:probe_libjvm/a_2 > /opt/jdk1.8.0_60/jre/lib/amd64/server/libjvm.so:0x9c25c1 > probe_libjvm:a_2 (on > _Z17do_write_prologueIP17GlobalTraceBufferEvR15JfrBufferWriterT_ in > /opt/jdk1.8.0_60/jre/lib/amd64/server/libjvm.so) > > You can now use it in all perf tools, such as: > > perf record -e probe_libjvm:a_2 -aR sleep 1 > > > perf probe -l > > probe_libjvm:a (on > _Z17do_write_prologueIP17GlobalTraceBufferEvR15JfrBufferWriterT_ in > /opt/jdk1.8.0_60/jre/lib/amd64/server/libjvm.so) > probe_libjvm:a_1 (on > _Z17do_write_prologueIP17GlobalTraceBufferEvR15JfrBufferWriterT_ in > /opt/jdk1.8.0_60/jre/lib/amd64/server/libjvm.so) > probe_libjvm:a_2 (on > _Z17do_write_prologueIP17GlobalTraceBufferEvR15JfrBufferWriterT_ in > /opt/jdk1.8.0_60/jre/lib/amd64/server/libjvm.so) > > > > uname -a > > Linux vagrant-ubuntu-trusty-64 4.3.0-999-generic #201510112200 SMP Mon > Oct 12 02:01:41 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux > > > Thanks, > > Alex > -- > To unsubscribe from this list: send the line "unsubscribe linux-perf-users" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: Re: perf probe Argument list too long 2015-11-03 1:00 ` Arnaldo Carvalho de Melo @ 2015-11-03 3:20 ` 平松雅巳 / HIRAMATU,MASAMI 2015-11-03 11:22 ` Alex Bagehot 2015-11-03 11:30 ` Milian Wolff 0 siblings, 2 replies; 6+ messages in thread From: 平松雅巳 / HIRAMATU,MASAMI @ 2015-11-03 3:20 UTC (permalink / raw) To: Arnaldo Carvalho de Melo; +Cc: Alex Bagehot, linux-perf-users@vger.kernel.org From: Arnaldo Carvalho de Melo [mailto:acme@kernel.org] >Em Tue, Nov 03, 2015 at 12:50:46AM +0000, Alex Bagehot escreveu: >> Hello, >> >> I get this error with perf probe, : >> >> perf probe -vvv -x /opt/jdk1.8.0_60/jre/lib/amd64/server/libjvm.so >> '_ZN13CollectedHeap24common_mem_allocate_initE11KlassHandlemP6Thread' Ah, I've never thought that the symbol name gets so long :( BTW, is that oracle's jdk package? I'd like to reproduce the bug. >> >> probe-definition(0): >> _ZN13CollectedHeap24common_mem_allocate_initE11KlassHandlemP6Thread >> symbol:_ZN13CollectedHeap24common_mem_allocate_initE11KlassHandlemP6Thread >> file:(null) line:0 offset:0 return:0 lazy:(null) >> 0 arguments >> Opening /sys/kernel/debug/tracing/uprobe_events write=1 >> Added new event: >> snprintf() failed: -7 >> Error: Failed to add events. Reason: Argument list too long (Code: -7) >> >> >> it looks like it's failing here: ./util/probe-event.c >> probe_trace_event__set_name >> >> /* Get an unused new event name */ >> ret = get_new_event_name(buf, 64, event, >> namelist, allow_suffix); > >Masami, do we really need to cap it at 64 bytes? And would it be >possible to improve that error reporting? I.e. this isn't an "argument >list", right? No, but it is used for event name whose maximum length is 63+\0. There is actually no reason for 64, but we need a limitation for event name. And, yeah, the error message comes from E2BIG. #define E2BIG 7 /* Argument list too long */ So, the "argument" means argument of snprintf. >> It works with a function 63 chars long not 64. >> Knowing it is the event name erroring, It also works if I give the >> event a short name eg. 'a'. I don't understand why it creates 3 probes >> though? > >Masami? You gave this explanation at some point, but I forgot, aliases? >Inlining? Yes, I guess it is because of inlined function. If there are several different instances at different addresses, perf probe tries to define probes for each address. > >Would be interesting to warn the user why multiple probes are being >created, no? Hmm, ok. it is usually done by probing inlined function, or the target line has multiple instructions. It may be better to show the reason why. >Alex, you can try using wildcards in this case, i.e.: > > perf record -e probe_libjvm:a* your-workload > >That if you don't have other probes in place starting with the same >prefix :-\ > >- Arnaldo > > >> objdump -t /opt/jdk1.8.0_60/jre/lib/amd64/server/libjvm.so|grep >> \.text|awk 'length($NF) == 63 {print length($NF)" "$NF}'|head -1 >> >> 63 _ZL34bulk_revoke_or_rebias_at_safepointP7oopDescbbP10JavaThread >> >> >> >> perf probe -vvv -x /opt/jdk1.8.0_60/jre/lib/amd64/server/libjvm.so >> '_ZL34bulk_revoke_or_rebias_at_safepointP7oopDescbbP10JavaThread' >> >> probe-definition(0): >> _ZL34bulk_revoke_or_rebias_at_safepointP7oopDescbbP10JavaThread >> symbol:_ZL34bulk_revoke_or_rebias_at_safepointP7oopDescbbP10JavaThread >> file:(null) line:0 offset:0 return:0 lazy:(null) >> 0 arguments >> Opening /sys/kernel/debug/tracing/uprobe_events write=1 >> Added new event: >> Writing event: p:probe_libjvm/_ZL34bulk_revoke_or_rebias_at_safepointP7oopDescbbP10JavaThread >> /opt/jdk1.8.0_60/jre/lib/amd64/server/libjvm.so:0x325a20 >> probe_libjvm:_ZL34bulk_revoke_or_rebias_at_safepointP7oopDescbbP10JavaThread >> (on _ZL34bulk_revoke_or_rebias_at_safepointP7oopDescbbP10JavaThread in >> /opt/jdk1.8.0_60/jre/lib/amd64/server/libjvm.so) >> >> You can now use it in all perf tools, such as: >> >> perf record -e probe_libjvm:_ZL34bulk_revoke_or_rebias_at_safepointP7oopDescbbP10JavaThread >> -aR sleep 1 >> >> >> >> perf probe -vvv -x /opt/jdk1.8.0_60/jre/lib/amd64/server/libjvm.so >> 'a=_Z17do_write_prologueIP17GlobalTraceBufferEvR15JfrBufferWriterT_' >> >> probe-definition(0): >> a=_Z17do_write_prologueIP17GlobalTraceBufferEvR15JfrBufferWriterT_ >> symbol:_Z17do_write_prologueIP17GlobalTraceBufferEvR15JfrBufferWriterT_ >> file:(null) line:0 offset:0 return:0 lazy:(null) >> 0 arguments >> Opening /sys/kernel/debug/tracing/uprobe_events write=1 >> Added new events: >> Writing event: p:probe_libjvm/a >> /opt/jdk1.8.0_60/jre/lib/amd64/server/libjvm.so:0x8ca940 >> probe_libjvm:a (on >> _Z17do_write_prologueIP17GlobalTraceBufferEvR15JfrBufferWriterT_ in >> /opt/jdk1.8.0_60/jre/lib/amd64/server/libjvm.so) >> Writing event: p:probe_libjvm/a_1 >> /opt/jdk1.8.0_60/jre/lib/amd64/server/libjvm.so:0x9c07fe >> probe_libjvm:a_1 (on >> _Z17do_write_prologueIP17GlobalTraceBufferEvR15JfrBufferWriterT_ in >> /opt/jdk1.8.0_60/jre/lib/amd64/server/libjvm.so) >> Writing event: p:probe_libjvm/a_2 >> /opt/jdk1.8.0_60/jre/lib/amd64/server/libjvm.so:0x9c25c1 >> probe_libjvm:a_2 (on >> _Z17do_write_prologueIP17GlobalTraceBufferEvR15JfrBufferWriterT_ in >> /opt/jdk1.8.0_60/jre/lib/amd64/server/libjvm.so) >> >> You can now use it in all perf tools, such as: >> >> perf record -e probe_libjvm:a_2 -aR sleep 1 >> >> >> perf probe -l >> >> probe_libjvm:a (on >> _Z17do_write_prologueIP17GlobalTraceBufferEvR15JfrBufferWriterT_ in >> /opt/jdk1.8.0_60/jre/lib/amd64/server/libjvm.so) >> probe_libjvm:a_1 (on >> _Z17do_write_prologueIP17GlobalTraceBufferEvR15JfrBufferWriterT_ in >> /opt/jdk1.8.0_60/jre/lib/amd64/server/libjvm.so) >> probe_libjvm:a_2 (on >> _Z17do_write_prologueIP17GlobalTraceBufferEvR15JfrBufferWriterT_ in >> /opt/jdk1.8.0_60/jre/lib/amd64/server/libjvm.so) >> >> >> >> uname -a >> >> Linux vagrant-ubuntu-trusty-64 4.3.0-999-generic #201510112200 SMP Mon >> Oct 12 02:01:41 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux >> >> >> Thanks, >> >> Alex >> -- >> To unsubscribe from this list: send the line "unsubscribe linux-perf-users" in >> the body of a message to majordomo@vger.kernel.org >> More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Re: perf probe Argument list too long 2015-11-03 3:20 ` 平松雅巳 / HIRAMATU,MASAMI @ 2015-11-03 11:22 ` Alex Bagehot 2015-11-03 11:30 ` Milian Wolff 1 sibling, 0 replies; 6+ messages in thread From: Alex Bagehot @ 2015-11-03 11:22 UTC (permalink / raw) To: 平松雅巳 / HIRAMATU,MASAMI Cc: Arnaldo Carvalho de Melo, linux-perf-users@vger.kernel.org On Tue, Nov 3, 2015 at 3:20 AM, 平松雅巳 / HIRAMATU,MASAMI <masami.hiramatsu.pt@hitachi.com> wrote: > From: Arnaldo Carvalho de Melo [mailto:acme@kernel.org] >>Em Tue, Nov 03, 2015 at 12:50:46AM +0000, Alex Bagehot escreveu: >>> Hello, >>> >>> I get this error with perf probe, : >>> >>> perf probe -vvv -x /opt/jdk1.8.0_60/jre/lib/amd64/server/libjvm.so >>> '_ZN13CollectedHeap24common_mem_allocate_initE11KlassHandlemP6Thread' > > Ah, I've never thought that the symbol name gets so long :( no problem. thanks for looking at this. > BTW, is that oracle's jdk package? I'd like to reproduce the bug. yes, openjdk should be the same/similar > >>> >>> probe-definition(0): >>> _ZN13CollectedHeap24common_mem_allocate_initE11KlassHandlemP6Thread >>> symbol:_ZN13CollectedHeap24common_mem_allocate_initE11KlassHandlemP6Thread >>> file:(null) line:0 offset:0 return:0 lazy:(null) >>> 0 arguments >>> Opening /sys/kernel/debug/tracing/uprobe_events write=1 >>> Added new event: >>> snprintf() failed: -7 >>> Error: Failed to add events. Reason: Argument list too long (Code: -7) >>> >>> >>> it looks like it's failing here: ./util/probe-event.c >>> probe_trace_event__set_name >>> >>> /* Get an unused new event name */ >>> ret = get_new_event_name(buf, 64, event, >>> namelist, allow_suffix); >> >>Masami, do we really need to cap it at 64 bytes? And would it be >>possible to improve that error reporting? I.e. this isn't an "argument >>list", right? > > No, but it is used for event name whose maximum length is 63+\0. > There is actually no reason for 64, but we need a limitation for event name. > > And, yeah, the error message comes from E2BIG. > > #define E2BIG 7 /* Argument list too long */ > > So, the "argument" means argument of snprintf. > >>> It works with a function 63 chars long not 64. >>> Knowing it is the event name erroring, It also works if I give the >>> event a short name eg. 'a'. I don't understand why it creates 3 probes >>> though? >> >>Masami? You gave this explanation at some point, but I forgot, aliases? >>Inlining? > > Yes, I guess it is because of inlined function. If there are several different > instances at different addresses, perf probe tries to define probes for each > address. > >> >>Would be interesting to warn the user why multiple probes are being >>created, no? > > Hmm, ok. it is usually done by probing inlined function, or the target line > has multiple instructions. It may be better to show the reason why. If the information is there yes that would be useful to the user. > > >>Alex, you can try using wildcards in this case, i.e.: >> >> perf record -e probe_libjvm:a* your-workload >> >>That if you don't have other probes in place starting with the same >>prefix :-\ Thanks >> >>- Arnaldo >> >> >>> objdump -t /opt/jdk1.8.0_60/jre/lib/amd64/server/libjvm.so|grep >>> \.text|awk 'length($NF) == 63 {print length($NF)" "$NF}'|head -1 >>> >>> 63 _ZL34bulk_revoke_or_rebias_at_safepointP7oopDescbbP10JavaThread >>> >>> >>> >>> perf probe -vvv -x /opt/jdk1.8.0_60/jre/lib/amd64/server/libjvm.so >>> '_ZL34bulk_revoke_or_rebias_at_safepointP7oopDescbbP10JavaThread' >>> >>> probe-definition(0): >>> _ZL34bulk_revoke_or_rebias_at_safepointP7oopDescbbP10JavaThread >>> symbol:_ZL34bulk_revoke_or_rebias_at_safepointP7oopDescbbP10JavaThread >>> file:(null) line:0 offset:0 return:0 lazy:(null) >>> 0 arguments >>> Opening /sys/kernel/debug/tracing/uprobe_events write=1 >>> Added new event: >>> Writing event: p:probe_libjvm/_ZL34bulk_revoke_or_rebias_at_safepointP7oopDescbbP10JavaThread >>> /opt/jdk1.8.0_60/jre/lib/amd64/server/libjvm.so:0x325a20 >>> probe_libjvm:_ZL34bulk_revoke_or_rebias_at_safepointP7oopDescbbP10JavaThread >>> (on _ZL34bulk_revoke_or_rebias_at_safepointP7oopDescbbP10JavaThread in >>> /opt/jdk1.8.0_60/jre/lib/amd64/server/libjvm.so) >>> >>> You can now use it in all perf tools, such as: >>> >>> perf record -e probe_libjvm:_ZL34bulk_revoke_or_rebias_at_safepointP7oopDescbbP10JavaThread >>> -aR sleep 1 >>> >>> >>> >>> perf probe -vvv -x /opt/jdk1.8.0_60/jre/lib/amd64/server/libjvm.so >>> 'a=_Z17do_write_prologueIP17GlobalTraceBufferEvR15JfrBufferWriterT_' >>> >>> probe-definition(0): >>> a=_Z17do_write_prologueIP17GlobalTraceBufferEvR15JfrBufferWriterT_ >>> symbol:_Z17do_write_prologueIP17GlobalTraceBufferEvR15JfrBufferWriterT_ >>> file:(null) line:0 offset:0 return:0 lazy:(null) >>> 0 arguments >>> Opening /sys/kernel/debug/tracing/uprobe_events write=1 >>> Added new events: >>> Writing event: p:probe_libjvm/a >>> /opt/jdk1.8.0_60/jre/lib/amd64/server/libjvm.so:0x8ca940 >>> probe_libjvm:a (on >>> _Z17do_write_prologueIP17GlobalTraceBufferEvR15JfrBufferWriterT_ in >>> /opt/jdk1.8.0_60/jre/lib/amd64/server/libjvm.so) >>> Writing event: p:probe_libjvm/a_1 >>> /opt/jdk1.8.0_60/jre/lib/amd64/server/libjvm.so:0x9c07fe >>> probe_libjvm:a_1 (on >>> _Z17do_write_prologueIP17GlobalTraceBufferEvR15JfrBufferWriterT_ in >>> /opt/jdk1.8.0_60/jre/lib/amd64/server/libjvm.so) >>> Writing event: p:probe_libjvm/a_2 >>> /opt/jdk1.8.0_60/jre/lib/amd64/server/libjvm.so:0x9c25c1 >>> probe_libjvm:a_2 (on >>> _Z17do_write_prologueIP17GlobalTraceBufferEvR15JfrBufferWriterT_ in >>> /opt/jdk1.8.0_60/jre/lib/amd64/server/libjvm.so) >>> >>> You can now use it in all perf tools, such as: >>> >>> perf record -e probe_libjvm:a_2 -aR sleep 1 >>> >>> >>> perf probe -l >>> >>> probe_libjvm:a (on >>> _Z17do_write_prologueIP17GlobalTraceBufferEvR15JfrBufferWriterT_ in >>> /opt/jdk1.8.0_60/jre/lib/amd64/server/libjvm.so) >>> probe_libjvm:a_1 (on >>> _Z17do_write_prologueIP17GlobalTraceBufferEvR15JfrBufferWriterT_ in >>> /opt/jdk1.8.0_60/jre/lib/amd64/server/libjvm.so) >>> probe_libjvm:a_2 (on >>> _Z17do_write_prologueIP17GlobalTraceBufferEvR15JfrBufferWriterT_ in >>> /opt/jdk1.8.0_60/jre/lib/amd64/server/libjvm.so) >>> >>> >>> >>> uname -a >>> >>> Linux vagrant-ubuntu-trusty-64 4.3.0-999-generic #201510112200 SMP Mon >>> Oct 12 02:01:41 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux >>> >>> >>> Thanks, >>> >>> Alex >>> -- >>> To unsubscribe from this list: send the line "unsubscribe linux-perf-users" in >>> the body of a message to majordomo@vger.kernel.org >>> More majordomo info at http://vger.kernel.org/majordomo-info.html > -- > To unsubscribe from this list: send the line "unsubscribe linux-perf-users" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: perf probe Argument list too long 2015-11-03 3:20 ` 平松雅巳 / HIRAMATU,MASAMI 2015-11-03 11:22 ` Alex Bagehot @ 2015-11-03 11:30 ` Milian Wolff 2015-11-03 15:38 ` 平松雅巳 / HIRAMATU,MASAMI 1 sibling, 1 reply; 6+ messages in thread From: Milian Wolff @ 2015-11-03 11:30 UTC (permalink / raw) To: 平松雅巳 / HIRAMATU,MASAMI Cc: Arnaldo Carvalho de Melo, Alex Bagehot, linux-perf-users@vger.kernel.org [-- Attachment #1: Type: text/plain, Size: 1555 bytes --] On Tuesday, November 3, 2015 3:20:42 AM CET 平松雅巳 / HIRAMATU,MASAMI wrote: > From: Arnaldo Carvalho de Melo [mailto:acme@kernel.org] > > >Em Tue, Nov 03, 2015 at 12:50:46AM +0000, Alex Bagehot escreveu: > >> Hello, > >> > >> I get this error with perf probe, : > >> > >> perf probe -vvv -x /opt/jdk1.8.0_60/jre/lib/amd64/server/libjvm.so > >> '_ZN13CollectedHeap24common_mem_allocate_initE11KlassHandlemP6Thread' > > Ah, I've never thought that the symbol name gets so long :( > BTW, is that oracle's jdk package? I'd like to reproduce the bug. Just want to chime in: Don't assume _anything_ about symbol names - they are extremely complicated and with C++ templates can be extremely long: nm -a libQt5WebKit.so.5.6.0 | cut -d' ' -f 3 | awk '{ if (length($0) > max) {max = length($0); maxline = $0} } END { print maxline; print length(maxline) }' _ZZN3WTF9HashTableINS_12AtomicStringENS_12KeyValuePairIS1_PFvPN7WebCore17NetworkingContextERKNS3_15ResourceRequestENS3_17StoredCredentialsERNS3_13ResourceErrorERNS3_16ResourceResponseERNS_6VectorIcLm0ENS_15CrashOnOverflowEEEEEENS_24KeyValuePairKeyExtractorISK_EENS_16AtomicStringHashENS_18HashMapValueTraitsINS_10HashTraitsIS1_EENSP_ISJ_EEEESQ_E3addINS_17HashMapTranslatorISS_SN_EES1_SJ_EENS_18HashTableAddResultINS_17HashTableIteratorIS1_SK_SM_SN_SS_SQ_EEEERKT0_RKT1_E19__PRETTY_FUNCTION__ 490 Cheers -- Milian Wolff | milian.wolff@kdab.com | Software Engineer KDAB (Deutschland) GmbH&Co KG, a KDAB Group company Tel: +49-30-521325470 KDAB - The Qt Experts [-- Attachment #2: smime.p7s --] [-- Type: application/pkcs7-signature, Size: 5903 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: Re: perf probe Argument list too long 2015-11-03 11:30 ` Milian Wolff @ 2015-11-03 15:38 ` 平松雅巳 / HIRAMATU,MASAMI 0 siblings, 0 replies; 6+ messages in thread From: 平松雅巳 / HIRAMATU,MASAMI @ 2015-11-03 15:38 UTC (permalink / raw) To: 'Milian Wolff' Cc: Arnaldo Carvalho de Melo, Alex Bagehot, linux-perf-users@vger.kernel.org From: milian@asfs2.hitachi.co.jp [mailto:milian@asfs2.hitachi.co.jp] On Behalf Of Milian Wolff > >On Tuesday, November 3, 2015 3:20:42 AM CET 平松雅巳 / HIRAMATU,MASAMI wrote: >> From: Arnaldo Carvalho de Melo [mailto:acme@kernel.org] >> >> >Em Tue, Nov 03, 2015 at 12:50:46AM +0000, Alex Bagehot escreveu: >> >> Hello, >> >> >> >> I get this error with perf probe, : >> >> >> >> perf probe -vvv -x /opt/jdk1.8.0_60/jre/lib/amd64/server/libjvm.so >> >> '_ZN13CollectedHeap24common_mem_allocate_initE11KlassHandlemP6Thread' >> >> Ah, I've never thought that the symbol name gets so long :( >> BTW, is that oracle's jdk package? I'd like to reproduce the bug. > >Just want to chime in: Don't assume _anything_ about symbol names - they are >extremely complicated and with C++ templates can be extremely long: > >nm -a libQt5WebKit.so.5.6.0 | cut -d' ' -f 3 | awk '{ if (length($0) > max) >{max = length($0); maxline = $0} } END { print maxline; print length(maxline) >}' >_ZZN3WTF9HashTableINS_12AtomicStringENS_12KeyValuePairIS1_PFvPN7WebCore17NetworkingContextERKNS3_15ResourceRequestEN >S3_17StoredCredentialsERNS3_13ResourceErrorERNS3_16ResourceResponseERNS_6VectorIcLm0ENS_15CrashOnOverflowEEEEEENS_24Ke >yValuePairKeyExtractorISK_EENS_16AtomicStringHashENS_18HashMapValueTraitsINS_10HashTraitsIS1_EENSP_ISJ_EEEESQ_E3addINS_1 >7HashMapTranslatorISS_SN_EES1_SJ_EENS_18HashTableAddResultINS_17HashTableIteratorIS1_SK_SM_SN_SS_SQ_EEEERKT0_RKT1_E1 >9__PRETTY_FUNCTION__ >490 > Oops ... OK, so perf-probe should warn user to give a new event name for the probes on such long-name function. Thanks! >Cheers >-- >Milian Wolff | milian.wolff@kdab.com | Software Engineer >KDAB (Deutschland) GmbH&Co KG, a KDAB Group company >Tel: +49-30-521325470 >KDAB - The Qt Experts ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-11-03 15:38 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-11-03 0:50 perf probe Argument list too long Alex Bagehot 2015-11-03 1:00 ` Arnaldo Carvalho de Melo 2015-11-03 3:20 ` 平松雅巳 / HIRAMATU,MASAMI 2015-11-03 11:22 ` Alex Bagehot 2015-11-03 11:30 ` Milian Wolff 2015-11-03 15:38 ` 平松雅巳 / HIRAMATU,MASAMI
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).