summaryrefslogtreecommitdiffstats
path: root/dwflpp.h
diff options
context:
space:
mode:
authorJosh Stone <jistone@redhat.com>2009-06-01 18:47:30 -0700
committerJosh Stone <jistone@redhat.com>2009-06-01 18:47:30 -0700
commit276465828851648edc5b56f762a0d100051c9e32 (patch)
tree25bc37f7800741949fd433cdaf25bbd198b2479e /dwflpp.h
parentbec8cf694b0cd89dfa3d082e611326d7bcfad884 (diff)
downloadsystemtap-steved-276465828851648edc5b56f762a0d100051c9e32.tar.gz
systemtap-steved-276465828851648edc5b56f762a0d100051c9e32.tar.xz
systemtap-steved-276465828851648edc5b56f762a0d100051c9e32.zip
Move the blacklist functions into dwflpp
For a call like "stap -l 'syscall.*'", I found that ~10% of the time was spent compiling the blacklist regexps over again for each probe point. By moving this functionality into the kernel dwflpp instance, we can reuse the regexps and get an easy speed boost.
Diffstat (limited to 'dwflpp.h')
-rw-r--r--dwflpp.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/dwflpp.h b/dwflpp.h
index 042b37a9..554e02d4 100644
--- a/dwflpp.h
+++ b/dwflpp.h
@@ -25,6 +25,7 @@
extern "C" {
#include <elfutils/libdwfl.h>
+#include <regex.h>
}
@@ -268,6 +269,19 @@ struct dwflpp
bool lvalue,
exp_type & ty);
+ bool blacklisted_p(const std::string& funcname,
+ const std::string& filename,
+ int line,
+ const std::string& module,
+ const std::string& section,
+ Dwarf_Addr addr,
+ bool has_return);
+
+ Dwarf_Addr relocate_address(Dwarf_Addr addr,
+ std::string& reloc_section,
+ std::string& blacklist_section);
+
+
private:
Dwfl * dwfl;
@@ -361,6 +375,13 @@ private:
std::string express_as_string (std::string prelude,
std::string postlude,
struct location *head);
+
+ regex_t blacklist_func; // function/statement probes
+ regex_t blacklist_func_ret; // only for .return probes
+ regex_t blacklist_file; // file name
+ bool blacklist_enabled;
+ void build_blacklist();
+ std::string get_blacklist_section(Dwarf_Addr addr);
};
#endif // DWFLPP_H