public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [RFC][Patch 0/2] New Probe family : probe kprobe.function()
@ 2009-04-16 12:27 Prerna Saxena
  2009-04-16 12:29 ` [RFC][Patch 1/2] " Prerna Saxena
  2009-04-16 16:48 ` [RFC][Patch 0/2] " Frank Ch. Eigler
  0 siblings, 2 replies; 7+ messages in thread
From: Prerna Saxena @ 2009-04-16 12:27 UTC (permalink / raw)
  To: systemtap

Hi all,
Here's a prototype of a new language feature in systemtap : probe 
kprobe, which bypasses all dwarf lookup for function names & utilizes 
kernel symbol table at runtime. Such probes are therefore agnostic to 
kernel version with no dependency on debuginfo.

This can be invoked using " probe 
kprobe.function("kernel_function_name"){.......} "

Limitations :
1. Does not support statement probing
2. Does not support wildcards.
3. Does not support probing the local variables of a function.

TODOs:
1. Support function argument probing.
2. Extend this to probe function returns.
3. Allow demoting  kernel.function (...) probes to kprobe.function (..) 
probes if debuginfo is missing.
4. Use /proc/kallsyms to validate function names in pass 2

Not tested too extensively, I'm looking fwd to comments :-)

Regards,

-- 
Prerna Saxena

Linux Technology Centre,
IBM Systems and Technology Lab,
Bangalore, India 

^ permalink raw reply	[flat|nested] 7+ messages in thread
* Re: [RFC][Revised Patch 0/5] New Probe family : probe kprobe.function()
@ 2009-04-19 17:37 Prerna Saxena
  0 siblings, 0 replies; 7+ messages in thread
From: Prerna Saxena @ 2009-04-19 17:37 UTC (permalink / raw)
  To: systemtap

Here's the revised set of patches.

Frank Ch. Eigler wrote:
> Prerna Saxena <prerna@linux.vnet.ibm.com> writes:
>
>   
>> Here's a prototype of a new language feature in systemtap : probe
>> kprobe [...]
>>     
>
> Looks good.  I suggest a few changes:
>
> - removal of ".inline"-related logic/variables, since they are inherently
>   unavailable
>   
Done.
> - removal of registration/unregistration code that was added for symbolic
>   kprobes only to optimize the thousands-of-probes case, such as the
>   char*/char[] automagic selector
>   
Changed code to implement "stap_dwarfless_probe->pp" & 
"stap_dwarfless_probe->symbol_name" as a char[] only , instead of 
allowing a choice between char* & char[]  implementation.
> - initialization of the new systemtap_session field
>   
Thanks.....dunno how I'd missed this one :-)
> - adding test cases, documentation, NEWS blurb
>   
I've added one testcase in systemtap.base for probe kprobe.function().
> To what extent does the kernel's symbolic kprobe logic allow probes to
> be placed within modules? 
As pointed by Ananth, a kprobe.function("") construct can be used to 
probe module functions too, since it searches modules if the said symbol 
wasnt found in the kernel. However, in the event the probed function 
name is present in more than one modules, the probe point gets 
registered for first instance of the function.  ( which may or may not 
be the desired probe point) .

Probing module functions can be accomplished using this separate construct :
    probe kprobe.module("module_name").function("function_name")
>  Would it be worthwhile to allow numeric
> probe addresses (as in kernel.statement(0xaddr).absolute)?
>
>   
Thanks for the suggestion :-)
This is implemented as :
    probe kprobe.statement(ADDRESS).absolute
This needs to be run in privileged mode , just like kernel.statement() 
probes  

> - FChE
>   
Regards,

-- 
Prerna Saxena

Linux Technology Centre,
IBM Systems and Technology Lab,
Bangalore, India 


-- 
Prerna Saxena

Linux Technology Centre,
IBM Systems and Technology Lab,
Bangalore, India 

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-04-19 18:25 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-16 12:27 [RFC][Patch 0/2] New Probe family : probe kprobe.function() Prerna Saxena
2009-04-16 12:29 ` [RFC][Patch 1/2] " Prerna Saxena
2009-04-16 12:30   ` [RFC][Patch 2/2] " Prerna Saxena
2009-04-16 16:48 ` [RFC][Patch 0/2] " Frank Ch. Eigler
2009-04-16 16:58   ` Ananth N Mavinakayanahalli
     [not found]   ` <49EB6076.4050905@linux.vnet.ibm.com>
2009-04-19 18:25     ` [RFC][Revised Patch 0/5] " Frank Ch. Eigler
2009-04-19 17:37 Prerna Saxena

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).