diff options
author | fche <fche> | 2005-10-18 12:40:59 +0000 |
---|---|---|
committer | fche <fche> | 2005-10-18 12:40:59 +0000 |
commit | 2508b230c643707830bfc491c1606fe6d81bc92d (patch) | |
tree | 59c86e3620b8036482109801cd3b4009dbfdf3b8 /translate.cxx | |
parent | 1eb8c9ca274c82762a357cf1e7641b113bceb16c (diff) | |
download | systemtap-steved-2508b230c643707830bfc491c1606fe6d81bc92d.tar.gz systemtap-steved-2508b230c643707830bfc491c1606fe6d81bc92d.tar.xz systemtap-steved-2508b230c643707830bfc491c1606fe6d81bc92d.zip |
2005-10-18 Frank Ch. Eigler <fche@elastic.org>
PR 1482 cont'd.
* translator.cxx (emit_module_init): Set aside a variable for
detailed probe point id.
* tapsets.cxx (emit_registrations): Use it.
(add_probe_point): Correct synthesized probe-point typo.
Diffstat (limited to 'translate.cxx')
-rw-r--r-- | translate.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/translate.cxx b/translate.cxx index a8b3ca12..5e9621cc 100644 --- a/translate.cxx +++ b/translate.cxx @@ -707,6 +707,7 @@ c_unparser::emit_module_init () o->newline() << "static int systemtap_module_init (void);"; o->newline() << "int systemtap_module_init () {"; o->newline(1) << "int rc = 0;"; + o->newline() << "const char *probe_point = \"\";"; o->newline() << "atomic_set (&session_state, STAP_SESSION_STARTING);"; // This signals any other probes that may be invoked in the next little @@ -727,6 +728,9 @@ c_unparser::emit_module_init () { o->newline() << "/* register probe #" << i << ", "; o->line() << session->probes[i]->locations.size() << " location(s) */"; + // default + o->newline() << "probe_point = " << + lex_cast_qstring (*session->probes[i]->tok) << ";"; session->probes[i]->emit_registrations (o, i); o->newline() << "if (unlikely (rc)) {"; @@ -735,11 +739,8 @@ c_unparser::emit_module_init () // probe from attempting to run. o->newline(1) << "atomic_set (&session_state, STAP_SESSION_ERROR);"; - // XXX: would be nice to print failing probe point o->newline() << "_stp_error (\"probe " << i << " registration failed" - << ", rc=%d, %s\\n\", rc, " - << lex_cast_qstring(*session->probes[i]->tok) - << ");"; + << ", rc=%d, %s\\n\", rc, probe_point);"; // We need to deregister any already probes set up - this is // essential for kprobes. |