systemtap cannot probe function defined in assemble language

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

systemtap cannot probe function defined in assemble language

bibo,mao-2
Currently there is no switch_to() function in IA64 kernel version,
similar there is function ia64_switch_to() which is defined in assemble
language, but systemtap can not probe this function, and systemtap is
defined as follows:

        kernel.function("ia64_switch_to"){
        }
And in my x86_64 box, it also can not probe kernel_thread() function.


bibo,mao
Reply | Threaded
Open this post in threaded view
|

Re: systemtap cannot probe function defined in assemble language

Frank Ch. Eigler

"Mao, Bibo" <[hidden email]> writes:

> [...]
> kernel.function("ia64_switch_to"){}
> And in my x86_64 box, it also can not probe kernel_thread() function.

What does "stap -v ..." tell you?

We may need a new probe point type name that is suitable for assembly
language probing, even in the absence of DWARF debugging information.
It would of course expose no normal $target variables, though could
perhaps expose registers.

A related question.  When building *.S assembly files in the kernel,
is the assembler being told to emit debugging information for them?
On some compiler versions, it's automatic (it turns "gcc -g foo.s"
into "as -g foo.s"), but others require an explicit "-Wa,--gdwarf-2"
CFLAGS.

- FChE
Reply | Threaded
Open this post in threaded view
|

Re: systemtap cannot probe function defined in assemble language

Roland McGrath
> We may need a new probe point type name that is suitable for assembly
> language probing, even in the absence of DWARF debugging information.

I'll leave the systemtap language choices to you, but I'm not sure this
necessarily needs a different flavor of probe syntax.  We could just make
it search for ELF symbol names as well as DWARF names.

> It would of course expose no normal $target variables, though could
> perhaps expose registers.

I just recently added to elfutils the library support for supplying target
register names, so this should be easy to wire up whenever you want to do
the translator work.

> A related question.  When building *.S assembly files in the kernel,
> is the assembler being told to emit debugging information for them?

It's not.  I could look into getting this turned on.  For systemtap
purposes, this is only worthwhile if people want to write probes using
specific source locations.  


Thanks,
Roland