All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
To: Chase Douglas <chase.douglas@canonical.com>
Cc: linux-kernel@vger.kernel.org,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Paul Mackerras <paulus@samba.org>, Ingo Molnar <mingo@elte.hu>
Subject: Re: perf: relative path to source for perf probe?
Date: Thu, 13 May 2010 11:58:26 -0300	[thread overview]
Message-ID: <20100513145826.GJ30926@ghostprotocols.net> (raw)
In-Reply-To: <AANLkTins2yCK-rvmdaaSQoBum4haHLhPx34EeJDg21Gg@mail.gmail.com>

Em Thu, May 13, 2010 at 04:13:41PM +0200, Chase Douglas escreveu:
> I'm trying to play with perf probe to insert trace events into a
> running kernel, but I haven't found a way to specify relative
> pathnames. For example, our build machines for Ubuntu build the kernel
> inside /build/buildd/linux-2.6.34. If I want to use perf probe, it
> seems I need to ensure the source exists in exactly the same location
> on my machine.
> 
> Compare this to gdb, where I can put the source at
> /home/cndougla/perf/build/buildd/linux-2.6.34 and specify a relative
> path for sources of /home/cndougla/perf using the dir command. I have
> read the perf code and I have not found any way to do this. I would be
> interested in adding support for this as a cmd line option, but I'm
> not very familiar with the rest of perf. Is this functionality
> specific to perf-probe? Should this be in some logic in util/ or in
> builtin-probe.c?

Look in tools/perf/util/symbol.c, these variables are the ones tools use
to govern how the symbol system work wrt finding vmlinux:

symbol_conf.use_vmlinux_path
symbol_conf.vmlinux_name

In addition to this it will use what is in ~/.debug/ if it has a
build-id in the perf.data header.

The changes for support kvm also touched this and allow for some
prefixing to look for guest symbols, generalizing that to make guest
kernel vmlinux + modules relative location be reused to look for
relative location for host kernel vmlinux + modules seems the way to go.

Probably you won't find this if you look at the old 2.6.34 codebase
(yay, for tools/perf it is already hundreds of patches behind :-)), so
I recomend you look at what we have in linux-2.6-tip, branch
tip/perf/core, what is in 2.6.34 is in tip/perf/urgent and right now,
IIRC, just a one patch that is not in 2.6.34 proper, a cherry-pick from
tip/perf/core, no less :-)

- Arnaldo

  reply	other threads:[~2010-05-13 14:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-13 14:13 perf: relative path to source for perf probe? Chase Douglas
2010-05-13 14:58 ` Arnaldo Carvalho de Melo [this message]
2010-05-13 15:51   ` Chase Douglas
2010-05-13 17:36     ` Arnaldo Carvalho de Melo
2010-05-13 16:01   ` Chase Douglas
2010-05-13 17:34     ` Arnaldo Carvalho de Melo
2010-05-13 21:23       ` Masami Hiramatsu
2010-05-13 21:46         ` Arnaldo Carvalho de Melo
2010-05-13 22:10           ` Chase Douglas
2010-05-13 22:11           ` Masami Hiramatsu
2010-05-13 21:00 ` Masami Hiramatsu

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=20100513145826.GJ30926@ghostprotocols.net \
    --to=acme@ghostprotocols.net \
    --cc=a.p.zijlstra@chello.nl \
    --cc=chase.douglas@canonical.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --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.