summaryrefslogtreecommitdiffstats
path: root/tapsets.cxx
diff options
context:
space:
mode:
authorJosh Stone <jistone@redhat.com>2009-04-24 18:07:12 -0700
committerJosh Stone <jistone@redhat.com>2009-04-24 20:09:27 -0700
commit5badd4d0d1fc3f7dce2dc26a3ad5a69275ff07d2 (patch)
tree1e84f94d01a18bfefa1e03d2074e1efd639a1fe8 /tapsets.cxx
parent8f497c23fd73345bd73b085a853f9c8be548715c (diff)
downloadsystemtap-steved-5badd4d0d1fc3f7dce2dc26a3ad5a69275ff07d2.tar.gz
systemtap-steved-5badd4d0d1fc3f7dce2dc26a3ad5a69275ff07d2.tar.xz
systemtap-steved-5badd4d0d1fc3f7dce2dc26a3ad5a69275ff07d2.zip
Don't terminate when a dwarfless kprobe fails
All of our other kprobe types will let the script continue after a registration failure, as per PR6749. The dwarfless kprobes should be no exception. Also, the way they were exiting was causing an unclean shutdown, so I added tests to badkprobe.exp to make sure that cleanup is always allowed to run.
Diffstat (limited to 'tapsets.cxx')
-rw-r--r--tapsets.cxx9
1 files changed, 1 insertions, 8 deletions
diff --git a/tapsets.cxx b/tapsets.cxx
index d16ae487..511289df 100644
--- a/tapsets.cxx
+++ b/tapsets.cxx
@@ -8586,14 +8586,7 @@ kprobe_derived_probe_group::emit_module_init (systemtap_session& s)
s.op->newline(-1) << "}";
s.op->newline() << "if (rc) {"; // PR6749: tolerate a failed register_*probe.
s.op->newline(1) << "sdp->registered_p = 0;";
- s.op->newline() << "if (rc == -EINVAL)";
- s.op->newline() << "{";
- s.op->newline() << " _stp_error (\"Error registering kprobe, possibly an incorrect name %s OR addr = %p, rc = %d \", sdp->symbol_string, sdp->address, rc);";
- s.op->newline() << " atomic_set (&session_state, STAP_SESSION_ERROR);";
- s.op->newline() << " goto out;";
- s.op->newline() << "}";
- s.op->newline() << "else";
- s.op->newline() << "_stp_warn (\"probe %s for %s registration error (rc %d)\", probe_point, sdp->pp, rc);";
+ s.op->newline() << "_stp_warn (\"probe %s registration error (rc %d)\", probe_point, rc);";
s.op->newline() << "rc = 0;"; // continue with other probes
// XXX: shall we increment numskipped?
s.op->newline(-1) << "}";