diff options
author | fche <fche> | 2007-01-18 23:00:15 +0000 |
---|---|---|
committer | fche <fche> | 2007-01-18 23:00:15 +0000 |
commit | 5212330de73ed43224b1fa3c5aaaf567da2ecd93 (patch) | |
tree | a79fdf4a442f122f3c2cccecdf8f16c5fadbefac /translate.cxx | |
parent | cb54ae9353bd1f970486c654771e21c53cfdffa1 (diff) | |
download | systemtap-steved-5212330de73ed43224b1fa3c5aaaf567da2ecd93.tar.gz systemtap-steved-5212330de73ed43224b1fa3c5aaaf567da2ecd93.tar.xz systemtap-steved-5212330de73ed43224b1fa3c5aaaf567da2ecd93.zip |
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.
Diffstat (limited to 'translate.cxx')
-rw-r--r-- | translate.cxx | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/translate.cxx b/translate.cxx index 58347a59..c6085a57 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, |