]> sourceware.org Git - systemtap.git/commitdiff
2007-01-18 Frank Ch. Eigler <fche@elastic.org>
authorfche <fche>
Thu, 18 Jan 2007 23:00:15 +0000 (23:00 +0000)
committerfche <fche>
Thu, 18 Jan 2007 23:00:15 +0000 (23:00 +0000)
* main.cxx (version): Add (C) 2007.
* translate.cxx (emit_module_init): Add a KERN_DEBUG printk
at module startup time to aid debugging and auditing.

ChangeLog
main.cxx
translate.cxx

index 697a99cf6d85ccbe4dc565bb8b16040e0a9c345f..04eb99adad1a6a27b8c167961134e4c471528e30 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-01-18  Frank Ch. Eigler  <fche@elastic.org>
+
+       * main.cxx (version): Add (C) 2007.
+       * translate.cxx (emit_module_init): Add a KERN_DEBUG printk
+       at module startup time to aid debugging and auditing.
+
 2007-01-12  David Smith  <dsmith@redhat.com>
 
        * tapsets.cxx
index 3953fd153aa09949f009fce4dac26e5a62969404..3ded761e3f1d87baae558451fdfa0b96121d6098 100644 (file)
--- a/main.cxx
+++ b/main.cxx
@@ -46,7 +46,7 @@ version ()
     << "SystemTap translator/driver "
     << "(version " << VERSION << " built " << DATE << ")" << endl
     << "(Using " << dwfl_version (NULL) << " libraries.)" << endl
-    << "Copyright (C) 2005-2006 Red Hat, Inc. and others" << endl
+    << "Copyright (C) 2005-2007 Red Hat, Inc. and others" << endl
     << "This is free software; see the source for copying conditions." << endl;
 }
 
index 58347a59ff1e8829d29204d1fb99f2167bceb5db..c6085a57c7e6f0b3bd333c80fd4b7b0b3ddd54f0 100644 (file)
@@ -1,5 +1,5 @@
 // translation pass
-// Copyright (C) 2005, 2006 Red Hat Inc.
+// Copyright (C) 2005, 2006, 2007 Red Hat Inc.
 // Copyright (C) 2005, 2006 Intel Corporation
 //
 // This file is part of systemtap, and is free software.  You can
@@ -996,6 +996,21 @@ c_unparser::emit_module_init ()
   o->newline() << "int i=0, j=0;"; // for derived_probe_group use
   o->newline() << "const char *probe_point = \"\";";
 
+  // Print a message to the kernel log about this module.  This is
+  // intended to help debug problems with systemtap modules.
+  o->newline() << "printk (KERN_DEBUG \"%s: "
+               << "systemtap: " << VERSION
+               << ", base: %p"
+               << ", memory: %lu+%lu data+text" // XXX: + runtime dynamic memory
+               << ", probes: " << session->probes.size()
+               << "\\n\""
+    // printk arguments
+               << ", THIS_MODULE->name"
+               << ", THIS_MODULE->module_core"
+               << ", (unsigned long) THIS_MODULE->core_size"
+               << ", (unsigned long) THIS_MODULE->core_text_size"
+               << ");";
+
   // Compare actual and targeted kernel releases/machines.  Sometimes
   // one may install the incorrect debuginfo or -devel RPM, and try to
   // run a probe compiled for a different version.  Catch this early,
This page took 0.049521 seconds and 5 git commands to generate.