summaryrefslogtreecommitdiffstats
path: root/tapsets.cxx
diff options
context:
space:
mode:
authorfche <fche>2006-02-22 15:05:50 +0000
committerfche <fche>2006-02-22 15:05:50 +0000
commit03d569d3e8ee6f405b8e8489eaaf325c774b822d (patch)
tree91dea097c656f0208c3bc481cc57a2cd97092880 /tapsets.cxx
parent7934b76a4ce7cdcdd9de054db154e3da9dab7047 (diff)
downloadsystemtap-steved-03d569d3e8ee6f405b8e8489eaaf325c774b822d.tar.gz
systemtap-steved-03d569d3e8ee6f405b8e8489eaaf325c774b822d.tar.xz
systemtap-steved-03d569d3e8ee6f405b8e8489eaaf325c774b822d.zip
2006-02-22 Frank Ch. Eigler <fche@elastic.org>
PR 2293. * tapsets.cxx (emit_probe_epilogue): Emit early local_irq_save(). (emit_probe_epilogue): ... and matching _restore(). * main.cxx (main): Emit a "hello, I'm starting" message before pass 5 in verbose mode.
Diffstat (limited to 'tapsets.cxx')
-rw-r--r--tapsets.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/tapsets.cxx b/tapsets.cxx
index 5919d241..31b2515a 100644
--- a/tapsets.cxx
+++ b/tapsets.cxx
@@ -91,8 +91,10 @@ void
derived_probe::emit_probe_prologue (translator_output* o,
const std::string& statereq)
{
- o->newline() << "struct context* c = per_cpu_ptr "
- << "(contexts, smp_processor_id());";
+ o->newline() << "struct context* c;";
+ o->newline() << "unsigned long flags;";
+ o->newline() << "local_irq_save (flags);";
+ o->newline() << "c = per_cpu_ptr (contexts, smp_processor_id());";
o->newline() << "if (atomic_read (&session_state) != " << statereq << ")";
o->newline(1) << "goto probe_epilogue;";
@@ -136,7 +138,7 @@ derived_probe::emit_probe_epilogue (translator_output* o)
o->newline() << "atomic_dec (&c->busy);";
o->newline(-1) << "probe_epilogue: ;";
- o->indent(1);
+ o->newline(1) << "local_irq_restore (flags);";
}