diff options
author | Frank Ch. Eigler <fche@elastic.org> | 2009-08-13 22:53:44 -0400 |
---|---|---|
committer | Frank Ch. Eigler <fche@elastic.org> | 2009-08-14 09:04:18 -0400 |
commit | 671ceda847955e31bc3ab310eb180fdc687a2ca8 (patch) | |
tree | 9fcfa58a88eef99b3c326da8ed641c9a93ffa610 /tapset-itrace.cxx | |
parent | b9bee53ec058c142ac5ba010224dd75669d61ad5 (diff) | |
download | systemtap-steved-671ceda847955e31bc3ab310eb180fdc687a2ca8.tar.gz systemtap-steved-671ceda847955e31bc3ab310eb180fdc687a2ca8.tar.xz systemtap-steved-671ceda847955e31bc3ab310eb180fdc687a2ca8.zip |
PR10228: use task_finder_vma for -d /user/object files.
* main.cxx (main): For "-d /path" arguments, enable task finder.
* runtime/sym.h (_stp_module): Add *vmcb member.
* task_finder{.cxx,.h} (emit_vma_callback_probe_decl): Zap.
* tapset-itrace.cxx, tapset-utrace.cxx: Use unwindsyms_modules
instead.
* tapsets.cxx (uprobe::emit_module_decls): Ditto.
* translate.cxx (emit_module_init): Emit task finder registrations
for vmcb's associated with _stp_modules.
(dump_unwindsyms): Associate vmcbs with user-space unwindsyms entries.
Diffstat (limited to 'tapset-itrace.cxx')
-rw-r--r-- | tapset-itrace.cxx | 35 |
1 files changed, 4 insertions, 31 deletions
diff --git a/tapset-itrace.cxx b/tapset-itrace.cxx index 87845155..57c20539 100644 --- a/tapset-itrace.cxx +++ b/tapset-itrace.cxx @@ -111,7 +111,10 @@ struct itrace_builder: public derived_probe_builder // If we have a path, we need to validate it. if (has_path) - path = find_executable (path); + { + path = find_executable (path); + sess.unwindsym_modules.insert (path); + } finished_results.push_back(new itrace_derived_probe(sess, base, location, has_path, path, pid, @@ -214,25 +217,6 @@ itrace_derived_probe_group::emit_module_decls (systemtap_session& s) s.op->newline(-1) << "return rc;"; s.op->newline(-1) << "}"; - // Emit vma callbacks. - s.op->newline() << "#ifdef STP_NEED_VMA_TRACKER"; - s.op->newline() << "static struct stap_task_finder_target stap_itrace_vmcbs[] = {"; - s.op->indent(1); - if (! probes_by_path.empty()) - { - for (p_b_path_iterator it = probes_by_path.begin(); - it != probes_by_path.end(); it++) - emit_vma_callback_probe_decl (s, it->first, (int64_t)0); - } - if (! probes_by_pid.empty()) - { - for (p_b_pid_iterator it = probes_by_pid.begin(); - it != probes_by_pid.end(); it++) - emit_vma_callback_probe_decl (s, "", it->first); - } - s.op->newline(-1) << "};"; - s.op->newline() << "#endif"; - s.op->newline() << "static struct stap_itrace_probe stap_itrace_probes[] = {"; s.op->indent(1); @@ -274,17 +258,6 @@ itrace_derived_probe_group::emit_module_init (systemtap_session& s) return; s.op->newline(); - s.op->newline() << "#ifdef STP_NEED_VMA_TRACKER"; - s.op->newline() << "_stp_sym_init();"; - s.op->newline() << "/* ---- itrace vma callbacks ---- */"; - s.op->newline() << "for (i=0; i<ARRAY_SIZE(stap_itrace_vmcbs); i++) {"; - s.op->indent(1); - s.op->newline() << "struct stap_task_finder_target *r = &stap_itrace_vmcbs[i];"; - s.op->newline() << "rc = stap_register_task_finder_target(r);"; - s.op->newline(-1) << "}"; - s.op->newline() << "#endif"; - - s.op->newline(); s.op->newline() << "/* ---- itrace probes ---- */"; s.op->newline() << "for (i=0; i<" << num_probes << "; i++) {"; |