This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
RE: [RFC][Patch 1/4] kprobe fast unregistration
- From: "Stone, Joshua I" <joshua dot i dot stone at intel dot com>
- To: "Keshavamurthy, Anil S" <anil dot s dot keshavamurthy at intel dot com>, "Masami Hiramatsu" <masami dot hiramatsu dot pt at hitachi dot com>
- Cc: "Ananth N Mavinakayanahalli" <ananth at in dot ibm dot com>, "Prasanna S Panchamukhi" <prasanna at in dot ibm dot com>, "linux-kernel" <linux-kernel at vger dot kernel dot org>, "SystemTAP" <systemtap at sources dot redhat dot com>, "Satoshi Oshima" <soshima at redhat dot com>, "Hideo Aoki" <haoki at redhat dot com>, "Yumiko Sugita" <yumiko dot sugita dot yf at hitachi dot com>, "Frank Ch. Eigler" <fche at redhat dot com>, <hch at infradead dot org>
- Date: Fri, 23 Mar 2007 11:12:22 -0700
- Subject: RE: [RFC][Patch 1/4] kprobe fast unregistration
Keshavamurthy, Anil S wrote:
> I agree with Christop that the interface is horrible and error prone.
> However, I see the use case where people want to disable the probes
> quickly and would like to reenable them again. Looking closely at
> your patch,
> I think this can be acheived.
> Here is my suggestion.
>
>> Here is an example code.
>> --
>> struct kprobes *p;
>> for_each_probe(p) {
>> unregister_kprobe_fast(p);
> ^^^^^^^^^^^^^^^^^^^^^^
> Change this to disable_kprobe(p), which is essentially the same as
> what you have implemented. And also provide an opposite function
> to reenable_kprobe(p) which enables the disabled probe again.
>> }
>> commit_kprobes();
> ^^^^^^^^^^^^^^
> Change this to unregister_disabled_kprobes(), which essentially
> unregisters all the disabled probes.
The ability to disable/reenable kprobes would be an interesting
enhancement. However, unregister_disabled_kprobes() shouldn't have a
global effect, because there might be a concurrent kprobes user that
disabled a probe with the intention of reenabling it later.
Josh Stone