From: fche Date: Thu, 18 Jan 2007 23:00:15 +0000 (+0000) Subject: 2007-01-18 Frank Ch. Eigler X-Git-Tag: release-0.5.13~127 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=5212330de73ed43224b1fa3c5aaaf567da2ecd93;p=systemtap.git 2007-01-18 Frank Ch. Eigler * 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. --- diff --git a/ChangeLog b/ChangeLog index 697a99cf6..04eb99ada 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-01-18 Frank Ch. Eigler + + * 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 * tapsets.cxx diff --git a/main.cxx b/main.cxx index 3953fd153..3ded761e3 100644 --- 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; } diff --git a/translate.cxx b/translate.cxx index 58347a59f..c6085a57c 100644 --- a/translate.cxx +++ b/translate.cxx @@ -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,