* How to translate from user space symbol name to address?
@ 2022-11-09 9:58 Yibin Zhao
2022-11-18 15:41 ` Frank Ch. Eigler
0 siblings, 1 reply; 3+ messages in thread
From: Yibin Zhao @ 2022-11-09 9:58 UTC (permalink / raw)
To: systemtap
[-- Attachment #1: Type: text/plain, Size: 591 bytes --]
Hi,
usymname can be used to translate address to symbol name, but I can't find
an easy way to translate symbol name to address.
I can get the ubacktrace and translate the addresses to symbols one by one,
and try to find the relationship between the symbol and the address, but
it's a bit tricky I think.
In systemtap source code, tapset.cxx do get address for probed symbols, is
it possible to get symbol address during runtime?
The reason why I want to translate a symbol to an address is , I want to
strip part of the stack for readability.
Any clue is appreciated
Thanks
Yibin
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: How to translate from user space symbol name to address?
2022-11-09 9:58 How to translate from user space symbol name to address? Yibin Zhao
@ 2022-11-18 15:41 ` Frank Ch. Eigler
2022-11-21 6:44 ` Yibin Zhao
0 siblings, 1 reply; 3+ messages in thread
From: Frank Ch. Eigler @ 2022-11-18 15:41 UTC (permalink / raw)
To: Yibin Zhao; +Cc: systemtap
Yibin Zhao via Systemtap <systemtap@sourceware.org> writes:
> I can get the ubacktrace and translate the addresses to symbols one by
> one, and try to find the relationship between the symbol and the
> address, but it's a bit tricky I think.
We don't have a runtime tapset function for that direction of mapping,
but a new one could be written, whether slowish/linear, or sorted/binary
like the address-to-symbol table.
- FChE
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: How to translate from user space symbol name to address?
2022-11-18 15:41 ` Frank Ch. Eigler
@ 2022-11-21 6:44 ` Yibin Zhao
0 siblings, 0 replies; 3+ messages in thread
From: Yibin Zhao @ 2022-11-21 6:44 UTC (permalink / raw)
To: Frank Ch. Eigler; +Cc: systemtap
[-- Attachment #1: Type: text/plain, Size: 727 bytes --]
Understood. I'm not sure if this kind of usage is common.
Finally I translated those addresses to symbols and stripped them by a post
processing script, the performance is acceptable.
Thanks
Yibin
On Fri, Nov 18, 2022 at 11:41 PM Frank Ch. Eigler <fche@redhat.com> wrote:
> Yibin Zhao via Systemtap <systemtap@sourceware.org> writes:
>
> > I can get the ubacktrace and translate the addresses to symbols one by
> > one, and try to find the relationship between the symbol and the
> > address, but it's a bit tricky I think.
>
> We don't have a runtime tapset function for that direction of mapping,
> but a new one could be written, whether slowish/linear, or sorted/binary
> like the address-to-symbol table.
>
> - FChE
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-11-21 6:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-09 9:58 How to translate from user space symbol name to address? Yibin Zhao
2022-11-18 15:41 ` Frank Ch. Eigler
2022-11-21 6:44 ` Yibin Zhao
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).