From f80d90043cf900dc6027329a61489444d7ab4ee3 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Wed, 11 Feb 2009 15:28:41 -0800 Subject: Enable session-wide code filtering This will be used to hook to dwarf_builder to all functions and probes so it can attempt @cast expansion. * session.h (systemtap_session): Add a vector of update_visitors that will act as filters for all probes and functions. * elaborate.cxx (semantic_pass_symbols): Run probes and functions through each registered code filter. --- elaborate.cxx | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'elaborate.cxx') diff --git a/elaborate.cxx b/elaborate.cxx index 981fc7c7..9f8aa450 100644 --- a/elaborate.cxx +++ b/elaborate.cxx @@ -1092,6 +1092,9 @@ semantic_pass_symbols (systemtap_session& s) try { + for (unsigned j=0; jbody = s.code_filters[j]->require (fd->body); + sym.current_function = fd; sym.current_probe = 0; fd->body->visit (& sym); @@ -1124,6 +1127,9 @@ semantic_pass_symbols (systemtap_session& s) try { + for (unsigned k=0; kbody = s.code_filters[k]->require (dp->body); + sym.current_function = 0; sym.current_probe = dp; dp->body->visit (& sym); -- cgit