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. --- tapsets.cxx | 1 + 1 file changed, 1 insertion(+) (limited to 'tapsets.cxx') diff --git a/tapsets.cxx b/tapsets.cxx index 7835b39a..071f92db 100644 --- a/tapsets.cxx +++ b/tapsets.cxx @@ -4632,6 +4632,7 @@ uprobe_derived_probe_group::emit_module_decls (systemtap_session& s) s.op->line() << " .procname=\"" << p->path << "\", "; s.op->line() << " .mmap_callback=&stap_uprobe_mmap_found, "; s.op->line() << " .munmap_callback=&stap_uprobe_munmap_found, "; + s.op->line() << " .callback=&stap_uprobe_process_munmap,"; } s.op->line() << " },"; -- cgit