From 03d569d3e8ee6f405b8e8489eaaf325c774b822d Mon Sep 17 00:00:00 2001 From: fche Date: Wed, 22 Feb 2006 15:05:50 +0000 Subject: 2006-02-22 Frank Ch. Eigler 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. --- ChangeLog | 9 +++++++++ main.cxx | 4 ++++ tapsets.cxx | 8 +++++--- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1f5f790f..31edfa56 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2006-02-22 Frank Ch. Eigler + + 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. + 2006-02-17 Frank Ch. Eigler * stapfuncs.5.in (cpu): Document contextinfo function. diff --git a/main.cxx b/main.cxx index 7a32a778..127e667d 100644 --- a/main.cxx +++ b/main.cxx @@ -545,6 +545,10 @@ main (int argc, char * const argv []) // PASS 5: RUN times (& tms_before); gettimeofday (&tv_before, NULL); + // NB: this message is a judgement call. The other passes don't emit + // a "hello, I'm starting" message, but then the others aren't interactive + // and don't take an indefinite amount of time. + if (s.verbose) clog << "Pass 5: starting run." << endl; rc = run_pass (s); times (& tms_after); gettimeofday (&tv_after, NULL); 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);"; } -- cgit