public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@infradead.org>
To: Stephane Eranian <eranian@google.com>
Cc: linux-kernel@vger.kernel.org, peterz@infradead.org,
	mingo@elte.hu, paulus@samba.org, davem@davemloft.net,
	fweisbec@gmail.com, perfmon2-devel@lists.sf.net,
	eranian@gmail.com, Tom Zanussi <tzanussi@gmail.com>
Subject: Re: [BUG] perf: buildid not managed properly when cmd path is relative
Date: Sat, 29 May 2010 19:57:54 -0300	[thread overview]
Message-ID: <20100529225754.GC28009@ghostprotocols.net> (raw)
In-Reply-To: <AANLkTimTMDjP3fgcOv2kIUPYYONAiMYPdhDb1VsLrTE_@mail.gmail.com>

Em Thu, May 27, 2010 at 03:46:16PM +0200, Stephane Eranian escreveu:
> I ran into another problem while running more tests with
> perf record, perf buildid-list.
> 
> I do the following:
> 
> $ perf record foo/noploop 5
> $ perf buildid-list
> 54b1e7cc3cf52e0db255aab44ce7538eb62655b8 [kernel.kallsyms]
> 875ae61623e89f408b425ca0486a9ec99e3ac73e
> /home/eranian/perfmon/official/tip/build/tools/perf/foo/noploop
> 
> I know I have samples in noploop:
> $ perf report -D
> ...
> 0x10a0 [0x20]: PERF_RECORD_SAMPLE(IP, 2): 14721/14721: 0x4006d6 period: 2351576
>  ... thread: noploop:14721
>  ...... dso: ./foo/noploop
> 
> But if I ask with buildid-list (like per-archive is doing) then I get:
> 
> $ perf buildid-list --with-hits
> 54b1e7cc3cf52e0db255aab44ce7538eb62655b8 [kernel.kallsyms]
> 0000000000000000000000000000000000000000 ./foo/noploop
> 
> The builid is bogus for noploop and it is relative path not full anymore.
> 
> I instrumented __dsos__fprintf_buildid() and I get:
> hit=0 name=/home/eranian/perfmon/official/tip/build/tools/perf/foo/noploop
> hit=1 name=./foo/noploop
> 0000000000000000000000000000000000000000 ./foo/noploop
> 
> So it looks like when cmd is relative there are two entries but the one
> that counts the hits is the one with relative path. But is does not have
> the buildid, the full path entry does.
> 
> This is an issue because perf-archive only packages the
> content of .debug with hits.
> 
> The problem does not exists when cmd are found from PATH.

I reproduced the problem, and yeah, annoying, will work on it, thanks
for the report.

- Arnaldo

  reply	other threads:[~2010-05-29 22:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-27 13:46 [BUG] perf: buildid not managed properly when cmd path is relative Stephane Eranian
2010-05-29 22:57 ` Arnaldo Carvalho de Melo [this message]
2010-06-01 18:38 ` Arnaldo Carvalho de Melo
2010-06-01 20:05   ` Stephane Eranian
2010-06-01 20:23     ` Arnaldo Carvalho de Melo

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=20100529225754.GC28009@ghostprotocols.net \
    --to=acme@infradead.org \
    --cc=davem@davemloft.net \
    --cc=eranian@gmail.com \
    --cc=eranian@google.com \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=paulus@samba.org \
    --cc=perfmon2-devel@lists.sf.net \
    --cc=peterz@infradead.org \
    --cc=tzanussi@gmail.com \
    /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