This is the mail archive of the
systemtap@sources.redhat.com
mailing list for the systemtap project.
Re: [RFC] Design + prototype: Multiple handler sets per probe address
- From: Roland McGrath <roland at redhat dot com>
- To: Ananth N Mavinakayanahalli <amavin at redhat dot com>
- Cc: systemtap at sources dot redhat dot com
- Date: Thu, 7 Apr 2005 23:43:42 -0700
- Subject: Re: [RFC] Design + prototype: Multiple handler sets per probe address
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