How to know address of invoked function
domenico.dileo@unina.it
domenico.dileo@unina.it
Tue Aug 7 13:48:00 GMT 2012
Thank you Mark, you were very helpful
Just to know a bit more on systemtap, does it make sense what I was
trying to do?
I will also take a look at addr() implementation...
Quoting Mark Wielaard <mjw@redhat.com>:
> On Tue, 2012-08-07 at 13:10 +0200, domenico.dileo@unina.it wrote:
>> With the following code
>> probe kernel.function("*mm/*.c").call{
>> printf ("%s %s",thread_indent(1), probefunc())
>>
>> }
>> I can trace all the functions called by mm.
>> The resulting output is something like:
>> ->do_obj_copy
>> ->kmalloc
>> ...
>> I would like to have for each called function also it is address (
>> the address stored in the PC) for instance,
>> -> do_obj_copy c091379
>
> The addr() function will give you the PC address of the probe point (in
> kernel space, use uaddr() for the user address):
> http://sourceware.org/systemtap/tapsets/API-addr.html
>
> So try something like:
>
> probe kernel.function("*@mm/*.c").call {
> printf ("%s %s@%p",thread_indent(1), probefunc(), addr())
> }
>
> Cheers,
>
> Mark
>
>
Domenico Di Leo, PhD student, Universit� degli Studi di Napoli Federico II
Ph: +39 081 676770
Fax: +39 081 676574
Web: http://wpage.unina.it/domenico.dileo
More information about the Systemtap
mailing list