[RFC] Design + prototype: Multiple handler sets per probe address

Roland McGrath roland@redhat.com
Fri Apr 8 06:43:00 GMT 2005


It seems to me you could handle multiple kprobes along with multiple
jprobes.  You just need to maintain some state about the probes in progress
rather than relying on normal control structures like calling all the
routines in a for loop.  When jprobes_return causes longjmp_break_handler
to run, kprobes then pick up where it left off and run the next probe.

This seems like it might be a better way to go about things for multiple
kprobes anyway.  You don't really want to run the break_handler for all the
probes in the aggregate because there was a breakpoint in one.  You should
just run the break_handler for the one that was running.  If you maintain
that state (i.e. current_kprobe), then that's all you need to pick up the
list walk there after a break_handler returns for some probe.  If you do
that in the general case of kprobes with a break_handler, then jprobes
falls out.


Thanks,
Roland



More information about the Systemtap mailing list