summaryrefslogtreecommitdiffstats
path: root/tapsets.cxx
diff options
context:
space:
mode:
authorfche <fche>2005-08-02 16:46:43 +0000
committerfche <fche>2005-08-02 16:46:43 +0000
commit71696fcfa2761a2d09a0538c0101913f1c41925c (patch)
tree17c5780d8a264d3fc00c1d9f6d78b7dac182d185 /tapsets.cxx
parent41474385441f82466c3d36608f117441406c62bc (diff)
downloadsystemtap-steved-71696fcfa2761a2d09a0538c0101913f1c41925c.tar.gz
systemtap-steved-71696fcfa2761a2d09a0538c0101913f1c41925c.tar.xz
systemtap-steved-71696fcfa2761a2d09a0538c0101913f1c41925c.zip
2005-08-02 Frank Ch. Eigler <fche@elastic.org>
* tapsets.cxx (emit_registrations): Treat module_name="kernel" as if module_name="".
Diffstat (limited to 'tapsets.cxx')
-rw-r--r--tapsets.cxx18
1 files changed, 6 insertions, 12 deletions
diff --git a/tapsets.cxx b/tapsets.cxx
index b4a1ce02..a51efad7 100644
--- a/tapsets.cxx
+++ b/tapsets.cxx
@@ -1302,7 +1302,7 @@ probe_entry_struct_kprobe_name(unsigned probenum)
void
dwarf_derived_probe::emit_registrations (translator_output* o, unsigned probenum)
{
- if (module_name.empty())
+ if (module_name.empty() || module_name == "kernel")
{
if (has_return)
{
@@ -1327,21 +1327,15 @@ dwarf_derived_probe::emit_registrations (translator_output* o, unsigned probenum
o->indent(1);
o->newline() << "struct module *mod = get_module(\"" << module_name << "\");";
o->newline() << "if (!mod)";
- o->indent(1);
- o->newline() << "rc++";
- o->indent(-1);
- o->newline() << "else";
- o->newline() << "{";
- o->indent(1);
- o->newline() << probe_entry_struct_kprobe_name(probenum)
+ o->newline(1) << "rc++;";
+ o->newline(-1) << "else {";
+ o->newline(1) << probe_entry_struct_kprobe_name(probenum)
<< ".addr = (void *) (mod->module_core + 0x" << hex << addr << ");";
o->newline() << "rc = register_kprobe (&"
<< probe_entry_struct_kprobe_name(probenum)
<< ");";
- o->indent(-1);
- o->newline() << "}";
- o->indent(-1);
- o->newline() << "}";
+ o->newline(-1) << "}";
+ o->newline(-1) << "}";
}
}