linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alex Bagehot <ceeaspb@gmail.com>
To: linux-perf-users@vger.kernel.org
Subject: perf probe Argument list too long
Date: Tue, 3 Nov 2015 00:50:46 +0000	[thread overview]
Message-ID: <CAHeneC-iMpy4tx35UXdSkLz7WYKx8epajgEpnS=NbfxvnxewTg@mail.gmail.com> (raw)

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

             reply	other threads:[~2015-11-03  0:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-03  0:50 Alex Bagehot [this message]
2015-11-03  1:00 ` perf probe Argument list too long 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAHeneC-iMpy4tx35UXdSkLz7WYKx8epajgEpnS=NbfxvnxewTg@mail.gmail.com' \
    --to=ceeaspb@gmail.com \
    --cc=linux-perf-users@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).