summaryrefslogtreecommitdiffstats
path: root/translate.cxx
diff options
context:
space:
mode:
authorfche <fche>2006-05-16 03:24:57 +0000
committerfche <fche>2006-05-16 03:24:57 +0000
commitffd1346fe1294b4d8a589f7085e394f091761378 (patch)
tree382b5e8810a31ecb9e263180a137fe50c52fbf81 /translate.cxx
parent090e8d5e8cc00bf7c887668f85a43d5767298df5 (diff)
downloadsystemtap-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().
Diffstat (limited to 'translate.cxx')
-rw-r--r--translate.cxx10
1 files changed, 5 insertions, 5 deletions
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() << ";";
}
}