diff options
author | fche <fche> | 2008-02-28 21:34:46 +0000 |
---|---|---|
committer | fche <fche> | 2008-02-28 21:34:46 +0000 |
commit | 49abf162fa91397b0c65d41f5c9af31ace4e6290 (patch) | |
tree | 45fe654102d6db99e627fe04f7cbfd78e9db12e1 /translate.cxx | |
parent | 7e6c2d0bd81af35151167ca75fc1b7d20a9e9a7d (diff) | |
download | systemtap-steved-49abf162fa91397b0c65d41f5c9af31ace4e6290.tar.gz systemtap-steved-49abf162fa91397b0c65d41f5c9af31ace4e6290.tar.xz systemtap-steved-49abf162fa91397b0c65d41f5c9af31ace4e6290.zip |
PR5045: clean up after interrupts
2008-02-28 Frank Ch. Eigler <fche@elastic.org>
PR5045
* session.h (pending_interrupts): New global.
* main.cxx (handle_interrupts): New fn to handle SIGINT* etc.
* elaborate.cxx, translate.cxx, tapsets.cxx, main.cxx (*): Insert
pending_interrupts escape hatches inside potentially timetaking loops.
* buildrun.cxx: Don't deal with signals.
Diffstat (limited to 'translate.cxx')
-rw-r--r-- | translate.cxx | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/translate.cxx b/translate.cxx index fefb0c8f..855a8e93 100644 --- a/translate.cxx +++ b/translate.cxx @@ -4471,18 +4471,21 @@ translate_pass (systemtap_session& s) s.op->newline(1); for (unsigned i=0; i<s.globals.size(); i++) { + if (pending_interrupts) return 1; s.up->emit_global_init (s.globals[i]); } s.op->newline(-1) << "};"; for (unsigned i=0; i<s.functions.size(); i++) { + if (pending_interrupts) return 1; s.op->newline(); s.up->emit_functionsig (s.functions[i]); } for (unsigned i=0; i<s.functions.size(); i++) { + if (pending_interrupts) return 1; s.op->newline(); s.up->emit_function (s.functions[i]); } @@ -4492,12 +4495,16 @@ translate_pass (systemtap_session& s) // emit_locks()/emit_unlocks(). for (unsigned i=0; i<s.probes.size(); i++) { - if (s.probes[i]->needs_global_locks()) + if (pending_interrupts) return 1; + if (s.probes[i]->needs_global_locks()) s.probes[i]->body->visit (&cup.vcv_needs_global_locks); } for (unsigned i=0; i<s.probes.size(); i++) - s.up->emit_probe (s.probes[i]); + { + if (pending_interrupts) return 1; + s.up->emit_probe (s.probes[i]); + } s.op->newline(); s.up->emit_module_init (); |