From 671ceda847955e31bc3ab310eb180fdc687a2ca8 Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Thu, 13 Aug 2009 22:53:44 -0400 Subject: 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. --- tapset-itrace.cxx | 35 ++++------------------------------- 1 file changed, 4 insertions(+), 31 deletions(-) (limited to 'tapset-itrace.cxx') 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); @@ -273,17 +257,6 @@ itrace_derived_probe_group::emit_module_init (systemtap_session& s) if (probes_by_path.empty() && probes_by_pid.empty()) 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; iindent(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 ---- */"; -- cgit