From 19d91f6c2fcc4dea3b86e05721275cf0f8117e74 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Thu, 14 Jan 2010 16:40:45 -0800 Subject: PR11151: Recover stap_uprobes slots on process exit When a process exits, it won't necessarily bother to munmap all of its shared libraries. This patch makes sure that with uprobes in libraries, we still grab an exit notification and clear everything out. * runtime/uprobes-common.c (stap_uprobe_process_munmap): New. * tapsets.cxx (uprobe_derived_probe_group::emit_module_decls): Use above callback so that we can recover our resources on process exit. --- runtime/uprobes-common.h | 1 + 1 file changed, 1 insertion(+) (limited to 'runtime/uprobes-common.h') diff --git a/runtime/uprobes-common.h b/runtime/uprobes-common.h index 68741f4d..990b473a 100644 --- a/runtime/uprobes-common.h +++ b/runtime/uprobes-common.h @@ -33,5 +33,6 @@ struct stap_uprobe_spec { static int stap_uprobe_process_found (struct stap_task_finder_target *tgt, struct task_struct *tsk, int register_p, int process_p); static int stap_uprobe_mmap_found (struct stap_task_finder_target *tgt, struct task_struct *tsk, char *path, unsigned long addr, unsigned long length, unsigned long offset, unsigned long vm_flags); static int stap_uprobe_munmap_found (struct stap_task_finder_target *tgt, struct task_struct *tsk, unsigned long addr, unsigned long length); +static int stap_uprobe_process_munmap (struct stap_task_finder_target *tgt, struct task_struct *tsk, int register_p, int process_p); #endif /* _UPROBE_COMMON_H_ */ -- cgit