linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* perf: 'archive' is not a perf-command
@ 2012-11-07 21:23 Florin Trofin
  2012-11-08  0:52 ` perf: generating a report from another machine doesn't show symbols for my binaries Florin Trofin
  2012-11-09 23:37 ` perf: 'archive' is not a perf-command Florin
  0 siblings, 2 replies; 4+ messages in thread
From: Florin Trofin @ 2012-11-07 21:23 UTC (permalink / raw)
  To: linux-perf-users@vger.kernel.org

Hello,

I am experimenting with the performance tools on Ubuntu 12.04 and I am
getting this weird error. Here is the environment:

$ perf --version
perf version 3.2.30

$perf archive
perf: 'archive' is not a perf-command. See 'perf --help'.

$perf --help

 usage: perf [--version] [--help] COMMAND [ARGS]

 The most commonly used perf commands are:
   annotate        Read perf.data (created by perf record) and display
annotated code
   archive         Create archive with object files with build-ids found
in perf.data file
   bench           General framework for benchmark suites
   ...

Is this a known bug in this version? Older versions seem to recognize the
archive command.

Thanks!

Florin

^ permalink raw reply	[flat|nested] 4+ messages in thread

* perf: generating a report from another machine doesn't show symbols for my binaries
  2012-11-07 21:23 perf: 'archive' is not a perf-command Florin Trofin
@ 2012-11-08  0:52 ` Florin Trofin
  2012-11-09 23:08   ` Florin
  2012-11-09 23:37 ` perf: 'archive' is not a perf-command Florin
  1 sibling, 1 reply; 4+ messages in thread
From: Florin Trofin @ 2012-11-08  0:52 UTC (permalink / raw)
  To: linux-perf-users@vger.kernel.org

Hello,

I am having difficulties while trying to archive the performance
information from one machine so I can parse it on another. Here is my
setup:

I have two machines, say m1 and m2 and I want to profile my executable on
m1 and see the report on m2. Both m1 and m2 run the same OS: CentOS 6:

$uname -a
Linux florin-vm-cent6 2.6.32-279.el6.x86_64 #1 SMP Fri Jun 22 12:19:21 UTC
2012 x86_64 x86_64 x86_64 GNU/Linux

I run my perf record this way:

$sudo perf record -g -a mytest

After the recording is done when I check the build-ids collected in the
report I see only the system modules in there:

$ sudo perf buildid-list -i perf.data

3dfb468e07d40879575e016e8999a25ee2694792 [kernel.kallsyms]
caea6ee6167bf7c214c1008179879ff8ac2447b6
/lib/modules/2.6.32-279.el6.x86_64/kernel/fs/ext4/ext4.ko
2eba2e1710dd909986d1a5f5b27720f476fc6a74
/lib/modules/2.6.32-279.el6.x86_64/kernel/fs/jbd2/jbd2.ko
4c37e276cd23f0877af7587ed1f699aadb741ec9 /lib64/libc-2.12.so
48a9f8600f0a15f6418ede25846c324ec8891dd4 /lib64/libpthread-2.12.so
42aefafc23375dc250c49c420c37edc4515b9c02 /lib64/ld-2.12.so
bf14593d7915402aa62c2573fccdb252aeebf754 /lib64/libm-2.12.so
ee85ac5f03ac14df9dcc93b6b57cb65a208f1933 /lib64/libgobject-2.0.so.0.2200.5
545c98f5fd1fb2c21bf35c621d9760e698dce1f8 /usr/lib64/libXrender.so.1.3.0
b88f3388cedb5fd906faccbb3febd81cf541273c /usr/bin/Xorg
2b40e6807e9482617b35b1c4a7e6e908a0e1bfc6 /usr/lib64/libpixman-1.so.0.18.4
91fd6a6700be179c5679b23ea0908f0b10e82537 /usr/lib64/xorg/modules/libfb.so
bfaebdeecb20d4e8a842a4b3daeab93bbd3caaf3 /usr/lib64/libcairo.so.2.10800.8
8f5f1b5e9d1b4ca655c88c84704b3b9b705c245f /usr/lib64/libvte.so.9.2501.0
534663464360e8d2157395f397352d28742ba45e /usr/bin/perf
d578a8e6cf05018d25168822e4cdfd780abf4a4e /usr/sbin/lsof


The funny thing is that "perf report -g" gives me symbols for mytest
binary and all its shared libs like it is reading it from someplace else.

I compiled my code with -fno-omit-frame-pointer and "-Wl,--build-id".

If I issue a "sudo perf archive" and then expand the archive file that was
generated I see the same files as above in the archive (i.e. none of my
binaries). After moving the perf file and the symbol archive to m2 and use
perf report on it I see symbols only for the kernel and system libraries.

So it seems that "perf archive" doesn't store all the information that
"perf report" is able to read on m1 so when I try to generate a report on
m2 from the samples collected on m1 I miss the symbols for my binaries.

Thanks in advance for shedding any light on this issue. The new perf tools
seems very cool - I just wish there would be more information online for
it.

Florin

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: perf: generating a report from another machine doesn't show symbols for my binaries
  2012-11-08  0:52 ` perf: generating a report from another machine doesn't show symbols for my binaries Florin Trofin
@ 2012-11-09 23:08   ` Florin
  0 siblings, 0 replies; 4+ messages in thread
From: Florin @ 2012-11-09 23:08 UTC (permalink / raw)
  To: linux-perf-users

For other poor souls out there searching for answers: the fix was to add
"-Wl,--build-id" to my linker flags.

If your binaries are not compiled with this option,
they will not be archived by perf archive command.

(Oh, and you should also be using the -fno-omit-frame-pointer
compile flag as well on x64).

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: perf: 'archive' is not a perf-command
  2012-11-07 21:23 perf: 'archive' is not a perf-command Florin Trofin
  2012-11-08  0:52 ` perf: generating a report from another machine doesn't show symbols for my binaries Florin Trofin
@ 2012-11-09 23:37 ` Florin
  1 sibling, 0 replies; 4+ messages in thread
From: Florin @ 2012-11-09 23:37 UTC (permalink / raw)
  To: linux-perf-users

Hello? Anybody?

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-11-09 23:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-07 21:23 perf: 'archive' is not a perf-command Florin Trofin
2012-11-08  0:52 ` perf: generating a report from another machine doesn't show symbols for my binaries Florin Trofin
2012-11-09 23:08   ` Florin
2012-11-09 23:37 ` perf: 'archive' is not a perf-command Florin

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).