From: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
To: Namhyung Kim <namhyung@kernel.org>
Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>,
Srikar Dronamraju <srikar@linux.vnet.ibm.com>,
David Ahern <dsahern@gmail.com>,
linux-kernel@vger.kernel.org,
"Steven Rostedt (Red Hat)" <rostedt@goodmis.org>,
Oleg Nesterov <oleg@redhat.com>, Ingo Molnar <mingo@redhat.com>,
"David A. Long" <dave.long@linaro.org>,
yrl.pp-manager.tt@hitachi.com
Subject: Re: Re: Re: [PATCH -tip v2 4/8] perf-probe: Use _stext based address instead of the symbol name
Date: Tue, 04 Feb 2014 19:05:20 +0900 [thread overview]
Message-ID: <52F0BB60.8020402@hitachi.com> (raw)
In-Reply-To: <52F0B7C5.8080609@hitachi.com>
(2014/02/04 18:49), Masami Hiramatsu wrote:
>>> Couldn't we just use kmap->ref_reloc_sym instead of the hard-coded
>>> "_stext"? You might want to check the Adrian's recent kaslr fixes (now
>>> in tip/perf/urgent).
>>
>> Yeah, I just found Adrian's work and this series must be updated for that,
>> because symbol's address is now based on the real (relocated) address.
>> OK, I'll try to use a symbol in ref_reloc_sym. ;) Thank you for pointed it out!
>
> Hmm, I've tested using ref_reloc_sym for new version, setting probes was OK,
> but getting the address of "_text" always failed. It seems that the kmaps
> doesn't make a symbol for "_text", on the other hand, "_stext" seems always
> available. So I think there are two ways to fix this, use "_stext" as this
> version, or use "_text" and fix dso__load_sym to load "_text" as a function
> symbol if exist.
> I'm not sure why the "_text" is not loaded, is that a policy?
Ah, I see. "_text" is not a function, just a label. That is why it
is not found in function map. Hmm, in that case, maybe I should use
a special case for checking reference symbol is a ref_reloc_sym and
if so, use ref_reloc_sym->unrelocated_addr.
Thank you,
--
Masami HIRAMATSU
IT Management Research Dept. Linux Technology Center
Hitachi, Ltd., Yokohama Research Laboratory
E-mail: masami.hiramatsu.pt@hitachi.com
next prev parent reply other threads:[~2014-02-04 10:05 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-29 9:14 [PATCH -tip v2 0/8] perf-probe: Updates for handling local functions correctly Masami Hiramatsu
2014-01-29 9:14 ` [PATCH -tip v2 1/8] [BUGFIX] perf-probe: Fix to do exit call for symbol maps Masami Hiramatsu
2014-02-03 7:41 ` Namhyung Kim
2014-02-03 8:19 ` Masami Hiramatsu
2014-01-29 9:14 ` [PATCH -tip v2 2/8] perf-probe: Remove incorrect symbol check for --list Masami Hiramatsu
2014-01-29 9:14 ` [PATCH -tip v2 3/8] perf-probe: Show in what binaries/modules probes are set Masami Hiramatsu
2014-01-29 9:14 ` [PATCH -tip v2 4/8] perf-probe: Use _stext based address instead of the symbol name Masami Hiramatsu
2014-02-03 7:49 ` Namhyung Kim
2014-02-03 8:32 ` Masami Hiramatsu
2014-02-04 9:49 ` Masami Hiramatsu
2014-02-04 10:05 ` Masami Hiramatsu [this message]
2014-01-29 9:15 ` [PATCH -tip v2 5/8] perf-probe: Retry to find given address from offline dwarf Masami Hiramatsu
2014-01-29 9:15 ` [PATCH -tip v2 6/8] perf-probe: Show appropriate symbol for _stext based kprobes Masami Hiramatsu
2014-01-29 9:15 ` [PATCH -tip v2 7/8] perf-probe: Show source-level or symbol-level info for uprobes Masami Hiramatsu
2014-01-29 9:15 ` [PATCH -tip v2 8/8] perf-probe: Allow to add events on the local functions 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=52F0BB60.8020402@hitachi.com \
--to=masami.hiramatsu.pt@hitachi.com \
--cc=acme@ghostprotocols.net \
--cc=dave.long@linaro.org \
--cc=dsahern@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=oleg@redhat.com \
--cc=rostedt@goodmis.org \
--cc=srikar@linux.vnet.ibm.com \
--cc=yrl.pp-manager.tt@hitachi.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 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.