linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: William Cohen <wcohen@redhat.com>
To: linux-perf-users@vger.kernel.org
Cc: Arnaldo de Melo <acme@redhat.com>
Subject: Unsing perf BTS support
Date: Fri, 04 Jan 2013 11:48:09 -0500	[thread overview]
Message-ID: <50E707C9.4030102@redhat.com> (raw)


Hi All,

I have been playing around with the Intel BTS support available in
perf and I have a number of questions about it.  I read through the
information on:

http://lwn.net/Articles/478047/

I only care about recording calls in the BTS.  Is there some way to
limit the BTS data collection to just calls?

I have been using the perf-3.6.10-2.fc17.x86_64 on Fedora 17, but seem
to get the same results with perf built from the linux mainline git
tree.  It seems to be missing much of the file and function
information in the perf report information. I attempt to collect some
trace data with a simple example like:


$ perf record -e branches:u -c 1 -d ls
..listing of directory ...
[ perf record: Woken up 8 times to write data ]
[ perf record: Captured and wrote 1.916 MB perf.data (~83705 samples) ]

However, sometimes it appears that the BTS data collection cause
segmentation faults like the following:

$ perf record -e branches:u -c 1 -d ls
..listing of directory ...
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.100 MB perf.data (~4384 samples) ]
ls: Segmentation fault

With a successful run the data should be analyzed with, but it doesn't
provide symbol mapping information:


$ perf script -f ip,addr,sym,dso,symoff --show-kernel-path
# ========
# captured on: Fri Jan  4 11:26:07 2013
# hostname : santana
# os release : 3.6.10-2.fc17.x86_64
# perf version : 3.6.10-2.fc17.x86_64
# arch : x86_64
# nrcpus online : 8
# nrcpus avail : 8
# cpudesc : Intel(R) Core(TM) i7-3610QM CPU @ 2.30GHz
# cpuid : GenuineIntel,6,58,9
# total memory : 3612396 kB
# cmdline : /usr/bin/perf record -e branches:u -c 1 -d ls 
# event : name = branches:u, type = 0, config = 0x4, config1 = 0x0, config2 = 0x0, excl_usr = 0, excl_kern = 1, excl_host = 0, excl_guest = 0, precise_ip = 0, id = { 335, 336, 337, 338, 339, 340, 341,
# HEADER_CPU_TOPOLOGY info available, use -I to display
# HEADER_NUMA_TOPOLOGY info available, use -I to display
# ========
#
 ffffffff8162713e sysret_check+0x4b (/usr/lib/debug/lib/modules/3.6.10-2.fc17.x86_64/vmlinux) =>       3439a0e090 [unknown] ([unknown])
       3439a0e098 [unknown] ([unknown]) =>           43c6cf [unknown] ([unknown])
           43c6dc [unknown] ([unknown]) =>           4121c0 [unknown] ([unknown])
           4121c0 [unknown] ([unknown]) =>       34392baec0 [unknown] ([unknown])
       34392baeca [unknown] ([unknown]) =>       34392bb080 [unknown] ([unknown])
       34392bb0af [unknown] ([unknown]) =>       3439283ba0 [unknown] ([unknown])
 ffffffff8161f429 irq_return+0x0 (/usr/lib/debug/lib/modules/3.6.10-2.fc17.x86_64/vmlinux) =>       3439283ba0 [unknown] ([unknown])
 ffffffff8161f429 irq_return+0x0 (/usr/lib/debug/lib/modules/3.6.10-2.fc17.x86_64/vmlinux) =>       3439283ba0 [unknown] ([unknown])
       3439283be6 [unknown] ([unknown]) =>       3439283c08 [unknown] ([unknown])
       3439283c0b [unknown] ([unknown]) =>       3439283c19 [unknown] ([unknown])
       3439283c1b [unknown] ([unknown]) =>       34392bb0b4 [unknown] ([unknown])
       34392bb0b7 [unknown] ([unknown]) =>       34392bb1d0 [unknown] ([unknown])
       34392bb1d7 [unknown] ([unknown]) =>       3439238170 [unknown] ([unknown])
 ffffffff8161f429 irq_return+0x0 (/usr/lib/debug/lib/modules/3.6.10-2.fc17.x86_64/vmlinux) =>       3439238170 [unknown] ([unknown])


It looks like the instructions don't mention the "-m" option for the
perf record the results look better with it:

$ perf record -e branches:u -m 128 -c 1 -d ls
...listing....
[ perf record: Woken up 8 times to write data ]
[ perf record: Captured and wrote 1.964 MB perf.data (~85807 samples) ]

$ perf script -f ip,addr,sym,dso,symoff --show-kernel-path
# ========
# captured on: Fri Jan  4 11:33:07 2013
# hostname : santana
# os release : 3.6.10-2.fc17.x86_64
# perf version : 3.6.10-2.fc17.x86_64
# arch : x86_64
# nrcpus online : 8
# nrcpus avail : 8
# cpudesc : Intel(R) Core(TM) i7-3610QM CPU @ 2.30GHz
# cpuid : GenuineIntel,6,58,9
# total memory : 3612396 kB
# cmdline : /usr/bin/perf record -e branches:u -m 128 -c 1 -d ls 
# event : name = branches:u, type = 0, config = 0x4, config1 = 0x0, config2 = 0x0, excl_usr = 0, excl_kern = 1, excl_host = 0, excl_guest = 0, precise_ip = 0, id = { 399, 400, 401, 402, 403, 404, 405,
# HEADER_CPU_TOPOLOGY info available, use -I to display
# HEADER_NUMA_TOPOLOGY info available, use -I to display
# ========
#
 ffffffff8162713e sysret_check+0x4b (/usr/lib/debug/lib/modules/3.6.10-2.fc17.x86_64/vmlinux) =>       3439a0e090 __read_nocancel+0x7 (/usr/lib64/libpthread-2.15.so)
       3439a0e098 __read_nocancel+0xf (/usr/lib64/libpthread-2.15.so) =>           43c6cf perf_evlist__prepare_workload+0x1af (/usr/bin/perf)
           43c6dc perf_evlist__prepare_workload+0x1bc (/usr/bin/perf) =>           4121c0 execvp@plt+0x0 (/usr/bin/perf)
           4121c0 execvp@plt+0x0 (/usr/bin/perf) =>       34392baec0 execvp+0x0 (/usr/lib64/libc-2.15.so)
       34392baeca execvp+0xa (/usr/lib64/libc-2.15.so) =>       34392bb080 __execvpe+0x0 (/usr/lib64/libc-2.15.so)
       34392bb0af __execvpe+0x2f (/usr/lib64/libc-2.15.so) =>       3439283ba0 __strchr_sse2+0x0 (/usr/lib64/libc-2.15.so)


However, a little ways into the output start seeing many [unknown] again:


ffffffff8161f429 irq_return+0x0 (/usr/lib/debug/lib/modules/3.6.10-2.fc17.x86_64/vmlinux) =>       343928f580 [unknown] ([unknown])
       343928f5ee [unknown] ([unknown]) =>       34392bb296 [unknown] ([unknown])
       34392bb2b2 [unknown] ([unknown]) =>       343928dee0 [unknown] ([unknown])
       343928deec [unknown] ([unknown]) =>       343928def9 [unknown] ([unknown])
       343928df24 [unknown] ([unknown]) =>       343928df34 [unknown] ([unknown])
       343928df5b [unknown] ([unknown]) =>       34392bb2b7 [unknown] ([unknown])
       34392bb2c3 [unknown] ([unknown]) =>       34392baa50 [unknown] ([unknown])


Are there some other combination of arguments that need to be passed
to "perf record" or "perf report" to get appropriate BTS data mapped
back to files and function?

-Will

             reply	other threads:[~2013-01-04 16:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-04 16:48 William Cohen [this message]
     [not found] ` <20130105090249.3253fd1858c5e1d05341c7ba@lavabit.com>
2013-01-07  3:14   ` Unsing perf BTS support David Ahern

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=50E707C9.4030102@redhat.com \
    --to=wcohen@redhat.com \
    --cc=acme@redhat.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).