summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfche <fche>2005-07-19 18:24:16 +0000
committerfche <fche>2005-07-19 18:24:16 +0000
commita76c46d5d96b24f2d2b9f1c0f960af8d1f9c6e1f (patch)
tree40a81fa98040b68b581ac211b130c7b6e804b8c5
parent5ecb5763771af8db1b67cf2a2fb4a40c5107cd0f (diff)
downloadsystemtap-steved-a76c46d5d96b24f2d2b9f1c0f960af8d1f9c6e1f.tar.gz
systemtap-steved-a76c46d5d96b24f2d2b9f1c0f960af8d1f9c6e1f.tar.xz
systemtap-steved-a76c46d5d96b24f2d2b9f1c0f960af8d1f9c6e1f.zip
2005-07-19 Frank Ch. Eigler <fche@redhat.com>
* translate.cxx (emit_module_init/exit, translate_pass): Conform to newer runtime startup/shutdown hooks.
-rw-r--r--ChangeLog5
-rw-r--r--translate.cxx32
2 files changed, 12 insertions, 25 deletions
diff --git a/ChangeLog b/ChangeLog
index 961e903b..ee637899 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-07-19 Frank Ch. Eigler <fche@redhat.com>
+
+ * translate.cxx (emit_module_init/exit, translate_pass): Conform
+ to newer runtime startup/shutdown hooks.
+
2005-07-15 Frank Ch. Eigler <fche@redhat.com>
* Makefile.am (install-data-local): Correct typo.
diff --git a/translate.cxx b/translate.cxx
index 30bff04b..f55b677e 100644
--- a/translate.cxx
+++ b/translate.cxx
@@ -327,11 +327,6 @@ c_unparser::emit_module_init ()
o->newline(1) << "int anyrc = 0;";
o->newline() << "int rc;";
- // XXX: yuck runtime
- o->newline() << "#if !TEST_MODE";
- o->newline() << "TRANSPORT_OPEN;";
- o->newline() << "#endif";
-
for (unsigned i=0; i<session->globals.size(); i++)
{
vardecl* v = session->globals[i];
@@ -370,13 +365,6 @@ c_unparser::emit_module_init ()
void
c_unparser::emit_module_exit ()
{
- // XXX: double-yuck runtime
- o->newline() << "void probe_exit () {";
- // need to reference these static functions for -Werror avoidance
- o->newline(1) << "if (0) next_fmt ((void *) 0, (void *) 0);";
- o->newline() << "if (0) _stp_dbug(\"\", 0, \"\");";
- o->newline(-1) << "}";
- //
o->newline() << "static void systemtap_module_exit (void);";
o->newline() << "void systemtap_module_exit () {";
o->newline(1) << "int anyrc = 0;";
@@ -388,12 +376,6 @@ c_unparser::emit_module_exit ()
}
// XXX: uninitialize globals
-
- // XXX: yuck runtime
- o->newline() << "#if !TEST_MODE";
- o->newline() << "_stp_transport_close ();";
- o->newline() << "#endif";
-
// XXX: if anyrc, log badness
o->newline(-1) << "}" << endl;
}
@@ -1541,20 +1523,20 @@ translate_pass (systemtap_session& s)
s.op->newline() << "#else";
s.op->newline();
- s.op->newline() << "static int __init _systemtap_module_init (void);";
- s.op->newline() << "int _systemtap_module_init () {";
+ // XXX
+ s.op->newline() << "int probe_start () {";
s.op->newline(1) << "return systemtap_module_init ();";
s.op->newline(-1) << "}";
s.op->newline();
- s.op->newline() << "static void __exit _systemtap_module_exit (void);";
- s.op->newline() << "void _systemtap_module_exit () {";
- s.op->newline(1) << "systemtap_module_exit ();";
+ s.op->newline() << "void probe_exit () {";
+ // XXX: need to reference these static functions for -Werror avoidance
+ s.op->newline(1) << "if (0) next_fmt ((void *) 0, (void *) 0);";
+ s.op->newline() << "if (0) _stp_dbug(\"\", 0, \"\");";
+ s.op->newline() << "systemtap_module_exit ();";
s.op->newline(-1) << "}";
s.op->newline();
- s.op->newline() << "module_init (_systemtap_module_init);";
- s.op->newline() << "module_exit (_systemtap_module_exit);";
s.op->newline() << "MODULE_DESCRIPTION(\"systemtap probe\");";
s.op->newline() << "MODULE_LICENSE(\"GPL\");"; // XXX