summaryrefslogtreecommitdiffstats
path: root/translate.cxx
diff options
context:
space:
mode:
authorMark Wielaard <mjw@redhat.com>2009-11-16 20:59:16 +0100
committerMark Wielaard <mjw@redhat.com>2009-11-16 20:59:16 +0100
commit01a71905151a751fc81a5f58743f6915378be20a (patch)
tree46001c105439507da2ee5ae76d00d090e73613ac /translate.cxx
parent1bc3d8e1a940e67d8e0e3f9a04cfc53d8bced85e (diff)
downloadsystemtap-steved-01a71905151a751fc81a5f58743f6915378be20a.tar.gz
systemtap-steved-01a71905151a751fc81a5f58743f6915378be20a.tar.xz
systemtap-steved-01a71905151a751fc81a5f58743f6915378be20a.zip
Allow modules to trigger task_finder vma_tracker.
* runtime/sym.h: Define _stp_need_vma_tracker. * translate.cxx (emit_symbol_data_done): Output _stp_need_vma_tracker value. (c_unparser::emit_module_init): If STP_NEED_VMA_TRACKER isn't defined check _stp_need_vma_tracker to call _stp_sym_init().
Diffstat (limited to 'translate.cxx')
-rw-r--r--translate.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/translate.cxx b/translate.cxx
index cbb8f1e3..ca298113 100644
--- a/translate.cxx
+++ b/translate.cxx
@@ -1172,6 +1172,8 @@ c_unparser::emit_module_init ()
// PR10228: set up symbol table-related task finders.
o->newline() << "#if defined(STP_NEED_VMA_TRACKER)";
o->newline() << "_stp_sym_init();";
+ o->newline() << "#else";
+ o->newline() << "if (_stp_need_vma_tracker == 1) _stp_sym_init();";
o->newline() << "#endif";
// NB: we don't need per-_stp_module task_finders, since a single common one
// set up in runtime/sym.c's _stp_sym_init() will scan through all _stp_modules.
@@ -5023,6 +5025,11 @@ emit_symbol_data_done (unwindsym_dump_context *ctx, systemtap_session& s)
ctx->output << "0x" << hex << ctx->stp_kretprobe_trampoline_addr << dec
<< ";\n";
+ // Note when someone requested the task_finder.
+ ctx->output << "static char _stp_need_vma_tracker = "
+ << (s.task_finder_derived_probes ? "1" : "0")
+ << ";\n";
+
// Some nonexistent modules may have been identified with "-d". Note them.
if (! s.suppress_warnings)
for (set<string>::iterator it = ctx->undone_unwindsym_modules.begin();