diff options
author | fche <fche> | 2006-12-30 04:25:51 +0000 |
---|---|---|
committer | fche <fche> | 2006-12-30 04:25:51 +0000 |
commit | 6f313a734d26b13cb77de68638dc1b9913891c07 (patch) | |
tree | f9d383b00d4f5373df41734b1a8086b301b63a9a /translate.cxx | |
parent | dbb686641c390c199e53ab94c1b365df1a62e2b9 (diff) | |
download | systemtap-steved-6f313a734d26b13cb77de68638dc1b9913891c07.tar.gz systemtap-steved-6f313a734d26b13cb77de68638dc1b9913891c07.tar.xz systemtap-steved-6f313a734d26b13cb77de68638dc1b9913891c07.zip |
2006-12-29 Frank Ch. Eigler <fche@elastic.org>
* tapsets.cxx (*group:emit_module_init): flush stdout less for timing
mode. Also, Set probe_point variable ...
* translate.cxx (emit_module_init): ... so on registration failure, a
usable error message can be generated.
Diffstat (limited to 'translate.cxx')
-rw-r--r-- | translate.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/translate.cxx b/translate.cxx index 4d4c83ac..d46428f0 100644 --- a/translate.cxx +++ b/translate.cxx @@ -1095,9 +1095,10 @@ c_unparser::emit_module_init () // NB: this gives O(N**2) amount of code, but luckily there // are only seven or eight derived_probe_groups, so it's ok. o->newline() << "if (rc) {"; + o->newline(1) << "_stp_error (\"probe %s registration error (rc %d)\", probe_point, rc);"; // NB: we need to be in the error state so timers can shutdown cleanly, // and so end probes don't run. - o->newline(1) << "atomic_set (&session_state, STAP_SESSION_ERROR);"; + o->newline() << "atomic_set (&session_state, STAP_SESSION_ERROR);"; if (i>0) for (int j=i-1; j>=0; j--) g[j]->emit_module_exit (*session); @@ -1213,11 +1214,11 @@ c_unparser::emit_module_exit () o->newline(1) << "int64_t avg = _stp_div64 (&error, stats->sum, stats->count);"; o->newline() << "_stp_printf (\"probe %s (%s), hits: %lld, cycles: %lldmin/%lldavg/%lldmax\\n\","; o->newline() << "probe_point, decl_location, (long long) stats->count, (long long) stats->min, (long long) avg, (long long) stats->max);"; - o->newline() << "_stp_print_flush();"; o->newline(-1) << "}"; o->newline(-1) << "}"; } } + o->newline() << "_stp_print_flush();"; o->newline(-1) << "}"; o->newline() << "#endif"; } |