From e0a17418b9d12e2a95dc345e95080ba31a41677f Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Mon, 9 Mar 2009 19:12:02 -0700 Subject: Let -DINTERRUPTIBLE=0 mask interrupts in probes Some time ago we loosened up the code for all probe types to allow interrupts during the handler. However, when probing something like kernel.trace("*"), you get a mix of probes in and out of the interrupt path, and it becomes much more common to have probes skipped due to interrupt reentrancy. The common_probe_entryfn_prologue and common_probe_entryfn_epilogue functions had an interruptible flag, but this was no longer used anywhere. I removed this flag, but then reused the logic to check an INTERRUPTIBLE macro instead. Now users can use -DINTERRUPTIBLE=0 to prevent interrupt reentrancy in their script, at the cost of a bit more overhead to toggle the interrupt mask. --- translate.cxx | 3 +++ 1 file changed, 3 insertions(+) (limited to 'translate.cxx') diff --git a/translate.cxx b/translate.cxx index b2ba5c72..17c37dc3 100644 --- a/translate.cxx +++ b/translate.cxx @@ -4908,6 +4908,9 @@ translate_pass (systemtap_session& s) s.op->newline() << "#ifndef MINSTACKSPACE"; s.op->newline() << "#define MINSTACKSPACE 1024"; s.op->newline() << "#endif"; + s.op->newline() << "#ifndef INTERRUPTIBLE"; + s.op->newline() << "#define INTERRUPTIBLE 1"; + s.op->newline() << "#endif"; // Overload processing s.op->newline() << "#ifndef STP_OVERLOAD_INTERVAL"; -- cgit