This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: conditional probes


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]