conditional probes

Frank Ch. Eigler fche@redhat.com
Fri Jun 13 18:48:00 GMT 2008


Hi -

> I think the problem is that from within the utrace .report_signal 
> handler I want to call the function that corresponds to "if (condition) 
> { ... }" which is represented as say probe_1064(struct context *), but I 
> don't know where I would find the "struct context *" argument that the 
> probe_1064() requires. [...]

Look at the "stap -p3" code generated from

    probe begin { println("hello") }
or  probe kernel.function("sys_open") { println("hello") }
or  probe process("bash").begin { println("hello") }

You'll see that context allocation is done by the systemtap-generated
function that receives the callback from the kernel facility that
represents the event source.  That function -- usually just one per
derived_probe_group -- then invokes the appropriate probe handler
function ("probe_NNNN (struct context *)") through a function pointer.


- FChE



More information about the Systemtap mailing list