public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Masami Hiramatsu <mhiramat@redhat.com>
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>,
	Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: Re: perf: relative path to source for perf probe?
Date: Thu, 13 May 2010 17:00:51 -0400	[thread overview]
Message-ID: <4BEC6883.4090205@redhat.com> (raw)
In-Reply-To: <AANLkTins2yCK-rvmdaaSQoBum4haHLhPx34EeJDg21Gg@mail.gmail.com>

Chase Douglas wrote:
> 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.

Right, perf-probe currently doesn't support relative *source* path option.
It just uses a source code path information in dwarf. I need to dig it more
into dwarf, especially kernel debuginfo has those information.

That could be a good improvement idea for perf probe (adding -s option?).

> 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?

Both of it. Adding -s option handling code to builtin-probe.c and
actual path modifying code in show_line_range()@util/probe-event.c.
(I assume you'd like to use -L option)

Thank you,

-- 
Masami Hiramatsu
e-mail: mhiramat@redhat.com

      parent reply	other threads:[~2010-05-13 21:01 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
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 [this message]

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=4BEC6883.4090205@redhat.com \
    --to=mhiramat@redhat.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@redhat.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox