diff options
author | fche <fche> | 2006-05-16 03:24:57 +0000 |
---|---|---|
committer | fche <fche> | 2006-05-16 03:24:57 +0000 |
commit | ffd1346fe1294b4d8a589f7085e394f091761378 (patch) | |
tree | 382b5e8810a31ecb9e263180a137fe50c52fbf81 | |
parent | 090e8d5e8cc00bf7c887668f85a43d5767298df5 (diff) | |
download | systemtap-steved-ffd1346fe1294b4d8a589f7085e394f091761378.tar.gz systemtap-steved-ffd1346fe1294b4d8a589f7085e394f091761378.tar.xz systemtap-steved-ffd1346fe1294b4d8a589f7085e394f091761378.zip |
2006-05-15 Frank Ch. Eigler <fche@elastic.org>
* tapsets.cxx, translator.cxx (*): Designate more emitted
functions as static.
* translator.cxx (visit_print_format): Correct regression
regression from two weeks ago.
* stapfuncs.5.in: Tweak wording. Deprecate returnval() in favour
of retval().
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | stapfuncs.5.in | 6 | ||||
-rw-r--r-- | tapsets.cxx | 9 | ||||
-rw-r--r-- | translate.cxx | 10 |
4 files changed, 21 insertions, 13 deletions
@@ -1,3 +1,12 @@ +2006-05-15 Frank Ch. Eigler <fche@elastic.org> + + * tapsets.cxx, translator.cxx (*): Designate more emitted + functions as static. + * translator.cxx (visit_print_format): Correct regression + regression from two weeks ago. + * stapfuncs.5.in: Tweak wording. Deprecate returnval() in favour + of retval(). + 2006-05-12 Thang P Nguyen <thang.p.nguyen@intel.com> * testsuite/buildok/probefunc.stp: test probefunc() diff --git a/stapfuncs.5.in b/stapfuncs.5.in index 2d3d0678..ba6018ae 100644 --- a/stapfuncs.5.in +++ b/stapfuncs.5.in @@ -163,15 +163,15 @@ Return the probe point associated with the currently running probe handler, including alias and wildcard expansion effects. .TP probefunc:string () -Return the probe point's function name. +Return the probe point's function name, if known. .TP target:long () Return the pid of the target process. .TP is_return:long () -Return 1 if the probe point is a return probe. +Return 1 if the probe point is a return probe. Deprecated. .TP -returnval:long () +retval:long () Return the pending return value of the function being return-probed. .SS ERRNO diff --git a/tapsets.cxx b/tapsets.cxx index 2fab6583..d562677b 100644 --- a/tapsets.cxx +++ b/tapsets.cxx @@ -222,8 +222,7 @@ be_derived_probe::emit_probe_entries (translator_output* o) { probe_point *l = locations[i]; o->newline() << "/* location " << i << ": " << *l << " */"; - o->newline() << "static void enter_" << name << "_" << i << " (void);"; - o->newline() << "void enter_" << name << "_" << i << " () {"; + o->newline() << "static void enter_" << name << "_" << i << " (void) {"; // While begin/end probes are executed single-threaded, we // still code defensively and use a per-cpu context. @@ -3066,7 +3065,7 @@ dwarf_derived_probe::emit_probe_entries (translator_output* o) assert(probe_points.size() == locations.size()); - o->newline() << "char const * " + o->newline() << "static char const * " << string_array << "[" << locations.size() << "] = {"; o->indent(1); @@ -3265,7 +3264,7 @@ timer_derived_probe::emit_probe_entries (translator_output* o) { o->newline() << "static struct timer_list timer_" << name << ";"; - o->newline() << "void enter_" << name << " (unsigned long val) {"; + o->newline() << "static void enter_" << name << " (unsigned long val) {"; o->indent(1); o->newline() << "const char* probe_point = " << lex_cast_qstring(*locations[0]) << ";"; @@ -3579,7 +3578,7 @@ mark_derived_probe::emit_probe_entries (translator_output* o) { assert (this->locations.size() == 1); - o->newline() << "void enter_" << name << " (" << probe_sig_expanded << ")"; + o->newline() << "static void enter_" << name << " (" << probe_sig_expanded << ")"; o->newline() << "{"; o->newline(1) << "const char* probe_point = " << lex_cast_qstring(* this->locations[0]) << ";"; diff --git a/translate.cxx b/translate.cxx index f4f00f65..3b656815 100644 --- a/translate.cxx +++ b/translate.cxx @@ -993,7 +993,7 @@ c_unparser::emit_module_init () // come in handy too. for (unsigned i=0; i<session->probes.size(); i++) { - o->newline() << "noinline int register_probe_" << i << " (void) {"; + o->newline() << "static noinline int register_probe_" << i << " (void) {"; o->indent(1); // By default, mark the first location as the site of possible // registration failure. This is helpful since non-dwarf @@ -1256,8 +1256,7 @@ c_unparser::emit_probe (derived_probe* v, unsigned i) this->current_probenum = i; this->tmpvar_counter = 0; - // o->newline() << "static void probe_" << i << " (struct context *c);"; - o->newline() << "void probe_" << i << " (struct context * __restrict__ c) {"; + o->newline() << "static void probe_" << i << " (struct context * __restrict__ c) {"; o->indent(1); // initialize frame pointer @@ -1290,6 +1289,7 @@ c_unparser::emit_probe (derived_probe* v, unsigned i) o->newline(-1) << "out:"; // NB: no need to uninitialize locals, except if arrays can somedays be local + // XXX: do this flush only if the body included a print/printf/etc. routine! o->newline(1) << "_stp_print_flush();"; emit_unlocks (vut); @@ -3576,7 +3576,7 @@ c_unparser::visit_print_format (print_format* e) tmpvar res = gensym (ty); // Make the [s]printf call, but not if there was an error evaluating the args - o->newline() << "if (likely (! c->last_error))"; + o->newline() << "if (likely (! c->last_error)) {"; o->indent(1); if (e->print_to_stream) { @@ -3591,7 +3591,7 @@ c_unparser::visit_print_format (print_format* e) for (unsigned i = 0; i < tmp.size(); ++i) o->line() << ", " << tmp[i].qname(); o->line() << ");"; - o->indent(-1); + o->newline(-1) << "}"; o->newline() << res.qname() << ";"; } } |