All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
To: Andi Kleen <andi@firstfloor.org>
Cc: Jiri Olsa <jolsa@redhat.com>,
	linux-kernel@vger.kernel.org,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Ingo Molnar <mingo@elte.hu>, Paul Mackerras <paulus@samba.org>,
	Corey Ashford <cjashfor@linux.vnet.ibm.com>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
	David Ahern <dsahern@gmail.com>,
	Namhyung Kim <namhyung@kernel.org>
Subject: Re: [PATCHv2 00/14] perf diff: Factor diff command
Date: Wed, 3 Oct 2012 06:47:57 -0700	[thread overview]
Message-ID: <20121003134757.GA18700@ghostprotocols.net> (raw)
In-Reply-To: <20121002163002.GD16230@one.firstfloor.org>

Em Tue, Oct 02, 2012 at 06:30:02PM +0200, Andi Kleen escreveu:
> The other problem I ran into is that perf archive doesn't seem to work very
> well with kernels, so it's hard to move profiles from different kernels
> around to diff them (e.g. for a performance regression) One way around this
> would be options to diff to specify the vmlinux etc.  manually

Can you describe more precisely what is not working well with 'archive'
and build ids?

When you do a 'perf record', at the end of the session, it traverses the
samples looking for DSOs with hits, and then stashes a copy (or a
hardlink, if possible) of these DSOs in your ~/.cache/, keyed by its
build id.

Later, when you do a perf archive, it will look again at your perf.data
files, look again for DSOs with hits and pass them on a tar command
line, you transfer those tarballs to your analysis machine and it should
just work.

To debug you may follow some of these steps:

[root@sandy linux]# perf record -a usleep 1
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.447 MB perf.data (~19534 samples) ]
[root@sandy linux]# perf buildid-list 
62b97af6897371571caef35fd5ae88e29bde5e89 [kernel.kallsyms]
[root@sandy linux]# ls -la ~/.debug/.build-id/62/b97af6897371571caef35fd5ae88e29bde5e89 
lrwxrwxrwx. 1 root root 64 Oct  3 10:41 /root/.debug/.build-id/62/b97af6897371571caef35fd5ae88e29bde5e89 -> ../../[kernel.kallsyms]/62b97af6897371571caef35fd5ae88e29bde5e89
[root@sandy linux]# perf buildid-list --hell
  Error: unknown option `hell'

 usage: perf buildid-list [<options>]

    -H, --with-hits       Show only DSOs with hits
    -i, --input <file>    input file name
    -f, --force           don't complain, do it
    -k, --kernel          Show current kernel build id
    -v, --verbose         be more verbose

[root@sandy linux]# perf buildid-list -k
62b97af6897371571caef35fd5ae88e29bde5e89
[root@sandy linux]# perf archive
Now please run:

$ tar xvf perf.data.tar.bz2 -C ~/.debug

wherever you need to run 'perf report' on.
[root@sandy linux]# tar tvf perf.data.tar.bz2
lrwxrwxrwx root/root         0 2012-10-03 10:41 .build-id/62/b97af6897371571caef35fd5ae88e29bde5e89 -> ../../[kernel.kallsyms]/62b97af6897371571caef35fd5ae88e29bde5e89
-rw-r--r-- root/root   4115683 2012-10-03 10:41 [kernel.kallsyms]/62b97af6897371571caef35fd5ae88e29bde5e89
[root@sandy linux]# 

[root@sandy linux]# sha256sum /root/.debug/.build-id/62/b97af6897371571caef35fd5ae88e29bde5e89 /proc/kallsyms 
43724edebe7f144d43a8664e237fa14df96bb79943002f1f17f45379a16418bf  /root/.debug/.build-id/62/b97af6897371571caef35fd5ae88e29bde5e89
43724edebe7f144d43a8664e237fa14df96bb79943002f1f17f45379a16418bf  /proc/kallsyms
[root@sandy linux]# 

- Arnaldo

  reply	other threads:[~2012-10-03 13:48 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-27 11:09 [PATCHv2 00/14] perf diff: Factor diff command Jiri Olsa
2012-09-27 11:09 ` [PATCH 01/14] perf hists: Add struct hists pointer to struct hist_entry Jiri Olsa
2012-09-27 11:09 ` [PATCH 02/14] perf diff: Refactor diff displacement possition info Jiri Olsa
2012-09-27 11:09 ` [PATCH 03/14] perf hists: Separate overhead and baseline columns Jiri Olsa
2012-09-28  5:56   ` Namhyung Kim
2012-10-02 13:32     ` Jiri Olsa
2012-09-27 11:09 ` [PATCH 04/14] perf tools: Removing hists pair argument from output path Jiri Olsa
2012-09-27 11:09 ` [PATCH 05/14] perf diff: Add -b option for perf diff to display paired entries only Jiri Olsa
2012-09-27 11:09 ` [PATCH 06/14] perf tool: Add hpp interface to enable/disable hpp column Jiri Olsa
2012-09-28  6:02   ` Namhyung Kim
2012-09-27 11:09 ` [PATCH 07/14] perf diff: Add ratio computation way to compare hist entries Jiri Olsa
2012-09-27 11:09 ` [PATCH 08/14] perf diff: Removing the total_period argument from output code Jiri Olsa
2012-09-27 11:09 ` [PATCH 09/14] perf diff: Add option to sort entries based on diff computation Jiri Olsa
2012-09-27 11:09 ` [PATCH 10/14] perf diff: Add weighted diff computation way to compare hist entries Jiri Olsa
2012-09-27 11:09 ` [PATCH 11/14] perf diff: Add -p option to display period values for " Jiri Olsa
2012-09-27 11:09 ` [PATCH 12/14] perf diff: Add -F option to display formula for computation Jiri Olsa
2012-09-27 11:09 ` [PATCH 13/14] perf diff: Include samples without symbol in overall stats Jiri Olsa
2012-09-27 11:09 ` [PATCH 14/14] perf diff: Display empty space for non paired samples Jiri Olsa
2012-10-04  6:06   ` Namhyung Kim
2012-09-27 21:31 ` [PATCHv2 00/14] perf diff: Factor diff command Andi Kleen
2012-10-01  8:16   ` Jiri Olsa
2012-10-02 16:30     ` Andi Kleen
2012-10-03 13:47       ` Arnaldo Carvalho de Melo [this message]
2012-10-03 16:18         ` Andi Kleen
2012-10-03 16:53           ` Andi Kleen
2012-10-03 18:06             ` Arnaldo Carvalho de Melo
2012-10-03 16:55       ` Andi Kleen
2012-10-03 17:01         ` Jiri Olsa

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=20121003134757.GA18700@ghostprotocols.net \
    --to=acme@ghostprotocols.net \
    --cc=a.p.zijlstra@chello.nl \
    --cc=andi@firstfloor.org \
    --cc=cjashfor@linux.vnet.ibm.com \
    --cc=dsahern@gmail.com \
    --cc=fweisbec@gmail.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=namhyung@kernel.org \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=paulus@samba.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.