summaryrefslogtreecommitdiffstats
path: root/tapsets.h
diff options
context:
space:
mode:
authorJosh Stone <jistone@redhat.com>2009-05-07 19:06:52 -0700
committerJosh Stone <jistone@redhat.com>2009-05-07 19:07:39 -0700
commit800bc674c524b1c58b550ed65fbcd10dffea470b (patch)
tree17013f184c94a77ca0d022911dac888cf2f71c00 /tapsets.h
parent8f65d588e2a2e58409bc52363b652eba9a963957 (diff)
parentb84779a5a4e19d2a4d8bbf9eabb96e43b2aecdee (diff)
downloadsystemtap-steved-800bc674c524b1c58b550ed65fbcd10dffea470b.tar.gz
systemtap-steved-800bc674c524b1c58b550ed65fbcd10dffea470b.tar.xz
systemtap-steved-800bc674c524b1c58b550ed65fbcd10dffea470b.zip
Merge branch 'tapsets-cleanup'
This merge splits some of the built-in tapsets into their own files, so we can better maintain clean interfaces. Still TODO are the dwarf- dependent tapsets though, because that's a much bigger mess to untangle.
Diffstat (limited to 'tapsets.h')
-rw-r--r--tapsets.h41
1 files changed, 38 insertions, 3 deletions
diff --git a/tapsets.h b/tapsets.h
index 406a69d9..7a74ad31 100644
--- a/tapsets.h
+++ b/tapsets.h
@@ -1,5 +1,5 @@
// -*- C++ -*-
-// Copyright (C) 2005 Red Hat Inc.
+// Copyright (C) 2005, 2009 Red Hat Inc.
//
// This file is part of systemtap, and is free software. You can
// redistribute it and/or modify it under the terms of the GNU General
@@ -13,12 +13,47 @@
#include "staptree.h"
#include "elaborate.h"
-struct derived_probe_group;
-
void register_standard_tapsets(systemtap_session& sess);
std::vector<derived_probe_group*> all_session_groups(systemtap_session& s);
int dwfl_report_offline_predicate (const char* modname, const char* filename);
+void common_probe_entryfn_prologue (translator_output* o, std::string statestr,
+ std::string new_pp, bool overload_processing = true);
+void common_probe_entryfn_epilogue (translator_output* o, bool overload_processing = true);
+
+void register_tapset_been(systemtap_session& sess);
+void register_tapset_itrace(systemtap_session& sess);
+void register_tapset_mark(systemtap_session& sess);
+void register_tapset_perfmon(systemtap_session& sess);
+void register_tapset_procfs(systemtap_session& sess);
+void register_tapset_timers(systemtap_session& sess);
+void register_tapset_utrace(systemtap_session& sess);
+
+
+// ------------------------------------------------------------------------
+// Generic derived_probe_group: contains an ordinary vector of the
+// given type. It provides only the enrollment function.
+
+template <class DP> struct generic_dpg: public derived_probe_group
+{
+protected:
+ std::vector <DP*> probes;
+public:
+ generic_dpg () {}
+ void enroll (DP* probe) { probes.push_back (probe); }
+};
+
+
+// ------------------------------------------------------------------------
+// An update visitor that allows replacing assignments with a function call
+
+struct var_expanding_visitor: public update_visitor
+{
+ static unsigned tick;
+ std::stack<functioncall**> target_symbol_setter_functioncalls;
+ var_expanding_visitor() {}
+ void visit_assignment (assignment* e);
+};
#endif // TAPSETS_H