summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile.am2
-rw-r--r--Makefile.in21
-rw-r--r--tapset-been.cxx236
-rw-r--r--tapsets.cxx205
-rw-r--r--tapsets.h1
5 files changed, 259 insertions, 206 deletions
diff --git a/Makefile.am b/Makefile.am
index 591793c3..a5920b00 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -38,7 +38,7 @@ stap_SOURCES = main.cxx \
parse.cxx staptree.cxx elaborate.cxx translate.cxx \
tapsets.cxx buildrun.cxx loc2c.c hash.cxx mdfour.c \
cache.cxx util.cxx coveragedb.cxx dwarf_wrappers.cxx \
- tapset-timers.cxx
+ tapset-been.cxx tapset-timers.cxx
stap_LDADD = @stap_LIBS@ @sqlite3_LIBS@
BUILT_SOURCES =
diff --git a/Makefile.in b/Makefile.in
index c0bd095f..55515d02 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -121,8 +121,8 @@ am_stap_OBJECTS = stap-main.$(OBJEXT) stap-parse.$(OBJEXT) \
stap-buildrun.$(OBJEXT) stap-loc2c.$(OBJEXT) \
stap-hash.$(OBJEXT) stap-mdfour.$(OBJEXT) stap-cache.$(OBJEXT) \
stap-util.$(OBJEXT) stap-coveragedb.$(OBJEXT) \
- stap-dwarf_wrappers.$(OBJEXT) stap-tapset-timers.$(OBJEXT) \
- $(am__objects_1)
+ stap-dwarf_wrappers.$(OBJEXT) stap-tapset-been.$(OBJEXT) \
+ stap-tapset-timers.$(OBJEXT) $(am__objects_1)
stap_OBJECTS = $(am_stap_OBJECTS)
stap_LINK = $(CXXLD) $(stap_CXXFLAGS) $(CXXFLAGS) $(stap_LDFLAGS) \
$(LDFLAGS) -o $@
@@ -328,7 +328,7 @@ oldinclude_HEADERS = includes/sys/sdt.h
stap_SOURCES = main.cxx parse.cxx staptree.cxx elaborate.cxx \
translate.cxx tapsets.cxx buildrun.cxx loc2c.c hash.cxx \
mdfour.c cache.cxx util.cxx coveragedb.cxx dwarf_wrappers.cxx \
- tapset-timers.cxx $(am__append_4)
+ tapset-been.cxx tapset-timers.cxx $(am__append_4)
stap_LDADD = @stap_LIBS@ @sqlite3_LIBS@ $(am__append_6)
# Arrange for git_version.h to be regenerated at every "make".
@@ -602,6 +602,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap-nsscommon.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap-parse.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap-staptree.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap-tapset-been.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap-tapset-timers.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap-tapsets.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stap-translate.Po@am__quote@
@@ -1083,6 +1084,20 @@ stap-dwarf_wrappers.obj: dwarf_wrappers.cxx
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-dwarf_wrappers.obj `if test -f 'dwarf_wrappers.cxx'; then $(CYGPATH_W) 'dwarf_wrappers.cxx'; else $(CYGPATH_W) '$(srcdir)/dwarf_wrappers.cxx'; fi`
+stap-tapset-been.o: tapset-been.cxx
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -MT stap-tapset-been.o -MD -MP -MF $(DEPDIR)/stap-tapset-been.Tpo -c -o stap-tapset-been.o `test -f 'tapset-been.cxx' || echo '$(srcdir)/'`tapset-been.cxx
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/stap-tapset-been.Tpo $(DEPDIR)/stap-tapset-been.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='tapset-been.cxx' object='stap-tapset-been.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-tapset-been.o `test -f 'tapset-been.cxx' || echo '$(srcdir)/'`tapset-been.cxx
+
+stap-tapset-been.obj: tapset-been.cxx
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -MT stap-tapset-been.obj -MD -MP -MF $(DEPDIR)/stap-tapset-been.Tpo -c -o stap-tapset-been.obj `if test -f 'tapset-been.cxx'; then $(CYGPATH_W) 'tapset-been.cxx'; else $(CYGPATH_W) '$(srcdir)/tapset-been.cxx'; fi`
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/stap-tapset-been.Tpo $(DEPDIR)/stap-tapset-been.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='tapset-been.cxx' object='stap-tapset-been.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -c -o stap-tapset-been.obj `if test -f 'tapset-been.cxx'; then $(CYGPATH_W) 'tapset-been.cxx'; else $(CYGPATH_W) '$(srcdir)/tapset-been.cxx'; fi`
+
stap-tapset-timers.o: tapset-timers.cxx
@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stap_CPPFLAGS) $(CPPFLAGS) $(stap_CXXFLAGS) $(CXXFLAGS) -MT stap-tapset-timers.o -MD -MP -MF $(DEPDIR)/stap-tapset-timers.Tpo -c -o stap-tapset-timers.o `test -f 'tapset-timers.cxx' || echo '$(srcdir)/'`tapset-timers.cxx
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/stap-tapset-timers.Tpo $(DEPDIR)/stap-tapset-timers.Po
diff --git a/tapset-been.cxx b/tapset-been.cxx
new file mode 100644
index 00000000..0b71671a
--- /dev/null
+++ b/tapset-been.cxx
@@ -0,0 +1,236 @@
+// tapset for begin/end/error/never
+// Copyright (C) 2005-2009 Red Hat Inc.
+// Copyright (C) 2005-2007 Intel Corporation.
+// Copyright (C) 2008 James.Bottomley@HansenPartnership.com
+//
+// 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
+// Public License (GPL); either version 2, or (at your option) any
+// later version.
+
+#include "session.h"
+#include "tapsets.h"
+#include "translate.h"
+#include "util.h"
+
+#include <algorithm>
+#include <string>
+
+
+using namespace std;
+using namespace __gnu_cxx;
+
+
+static string TOK_BEGIN("begin");
+static string TOK_END("end");
+static string TOK_ERROR("error");
+static string TOK_NEVER("never");
+
+
+// ------------------------------------------------------------------------
+// begin/end/error probes are run right during registration / deregistration
+// ------------------------------------------------------------------------
+
+enum be_t { BEGIN, END, ERROR };
+
+struct be_derived_probe: public derived_probe
+{
+ be_t type;
+ int64_t priority;
+
+ be_derived_probe (probe* p, probe_point* l, be_t t, int64_t pr):
+ derived_probe (p, l), type (t), priority (pr) {}
+
+ void join_group (systemtap_session& s);
+
+ static inline bool comp(be_derived_probe const *a,
+ be_derived_probe const *b)
+ {
+ // This allows the BEGIN/END/ERROR probes to intermingle.
+ // But that's OK - they're always treversed with a nested
+ // "if (type==FOO)" conditional.
+ return a->priority < b->priority;
+ }
+
+ bool needs_global_locks () { return false; }
+ // begin/end probes don't need locks around global variables, since
+ // they aren't run concurrently with any other probes
+};
+
+
+struct be_derived_probe_group: public generic_dpg<be_derived_probe>
+{
+public:
+ void emit_module_decls (systemtap_session& s);
+ void emit_module_init (systemtap_session& s);
+ void emit_module_exit (systemtap_session& s);
+};
+
+struct be_builder: public derived_probe_builder
+{
+ be_t type;
+
+ be_builder(be_t t) : type(t) {}
+
+ virtual void build(systemtap_session &,
+ probe * base,
+ probe_point * location,
+ literal_map_t const & parameters,
+ vector<derived_probe *> & finished_results)
+ {
+ int64_t priority;
+ if ((type == BEGIN && !get_param(parameters, TOK_BEGIN, priority)) ||
+ (type == END && !get_param(parameters, TOK_END, priority)) ||
+ (type == ERROR && !get_param(parameters, TOK_ERROR, priority)))
+ priority = 0;
+ finished_results.push_back
+ (new be_derived_probe(base, location, type, priority));
+ }
+};
+
+
+void
+be_derived_probe::join_group (systemtap_session& s)
+{
+ if (! s.be_derived_probes)
+ s.be_derived_probes = new be_derived_probe_group ();
+ s.be_derived_probes->enroll (this);
+}
+
+
+void
+be_derived_probe_group::emit_module_decls (systemtap_session& s)
+{
+ if (probes.empty()) return;
+
+ s.op->newline() << "/* ---- begin/end probes ---- */";
+ s.op->newline() << "static void enter_begin_probe (void (*fn)(struct context*), const char* pp) {";
+ s.op->indent(1);
+ common_probe_entryfn_prologue (s.op, "STAP_SESSION_STARTING", "pp", false);
+ s.op->newline() << "(*fn) (c);";
+ common_probe_entryfn_epilogue (s.op, false);
+ s.op->newline(-1) << "}";
+
+ s.op->newline() << "static void enter_end_probe (void (*fn)(struct context*), const char* pp) {";
+ s.op->indent(1);
+ common_probe_entryfn_prologue (s.op, "STAP_SESSION_STOPPING", "pp", false);
+ s.op->newline() << "(*fn) (c);";
+ common_probe_entryfn_epilogue (s.op, false);
+ s.op->newline(-1) << "}";
+
+ s.op->newline() << "static void enter_error_probe (void (*fn)(struct context*), const char* pp) {";
+ s.op->indent(1);
+ common_probe_entryfn_prologue (s.op, "STAP_SESSION_ERROR", "pp", false);
+ s.op->newline() << "(*fn) (c);";
+ common_probe_entryfn_epilogue (s.op, false);
+ s.op->newline(-1) << "}";
+
+ s.op->newline() << "static struct stap_be_probe {";
+ s.op->newline(1) << "void (*ph)(struct context*);";
+ s.op->newline() << "const char* pp;";
+ s.op->newline() << "int type;";
+ s.op->newline(-1) << "} stap_be_probes[] = {";
+ s.op->indent(1);
+
+ // NB: We emit the table in sorted order here, so we don't have to
+ // store the priority numbers as integers and sort at run time.
+
+ sort(probes.begin(), probes.end(), be_derived_probe::comp);
+
+ for (unsigned i=0; i < probes.size(); i++)
+ {
+ s.op->newline () << "{";
+ s.op->line() << " .pp="
+ << lex_cast_qstring (*probes[i]->sole_location()) << ",";
+ s.op->line() << " .ph=&" << probes[i]->name << ",";
+ s.op->line() << " .type=" << probes[i]->type;
+ s.op->line() << " },";
+ }
+ s.op->newline(-1) << "};";
+}
+
+void
+be_derived_probe_group::emit_module_init (systemtap_session& s)
+{
+ if (probes.empty()) return;
+
+ s.op->newline() << "for (i=0; i<" << probes.size() << "; i++) {";
+ s.op->newline(1) << "struct stap_be_probe* stp = & stap_be_probes [i];";
+ s.op->newline() << "if (stp->type != " << BEGIN << ") continue;";
+ s.op->newline() << "enter_begin_probe (stp->ph, stp->pp);";
+ s.op->newline() << "/* rc = 0; */";
+ // NB: begin probes that cause errors do not constitute registration
+ // failures. An error message will probably get printed and if
+ // MAXERRORS was left at 1, we'll get an stp_exit. The
+ // error-handling probes will be run during the ordinary
+ // unregistration phase.
+ s.op->newline(-1) << "}";
+}
+
+void
+be_derived_probe_group::emit_module_exit (systemtap_session& s)
+{
+ if (probes.empty()) return;
+
+ s.op->newline() << "for (i=0; i<" << probes.size() << "; i++) {";
+ s.op->newline(1) << "struct stap_be_probe* stp = & stap_be_probes [i];";
+ s.op->newline() << "if (stp->type != " << END << ") continue;";
+ s.op->newline() << "enter_end_probe (stp->ph, stp->pp);";
+ s.op->newline(-1) << "}";
+
+ s.op->newline() << "for (i=0; i<" << probes.size() << "; i++) {";
+ s.op->newline(1) << "struct stap_be_probe* stp = & stap_be_probes [i];";
+ s.op->newline() << "if (stp->type != " << ERROR << ") continue;";
+ s.op->newline() << "enter_error_probe (stp->ph, stp->pp);";
+ s.op->newline(-1) << "}";
+}
+
+
+
+// ------------------------------------------------------------------------
+// never probes are never run
+// ------------------------------------------------------------------------
+
+struct never_derived_probe: public derived_probe
+{
+ never_derived_probe (probe* p): derived_probe (p) {}
+ never_derived_probe (probe* p, probe_point* l): derived_probe (p, l) {}
+ void join_group (systemtap_session&) { /* thus no probe_group */ }
+};
+
+
+struct never_builder: public derived_probe_builder
+{
+ never_builder() {}
+ virtual void build(systemtap_session &,
+ probe * base,
+ probe_point * location,
+ literal_map_t const &,
+ vector<derived_probe *> & finished_results)
+ {
+ finished_results.push_back(new never_derived_probe(base, location));
+ }
+};
+
+
+
+// ------------------------------------------------------------------------
+// unified registration for begin/end/error/never
+// ------------------------------------------------------------------------
+
+void
+register_tapset_been(systemtap_session& s)
+{
+ match_node* root = s.pattern_root;
+
+ root->bind(TOK_BEGIN)->bind(new be_builder(BEGIN));
+ root->bind_num(TOK_BEGIN)->bind(new be_builder(BEGIN));
+ root->bind(TOK_END)->bind(new be_builder(END));
+ root->bind_num(TOK_END)->bind(new be_builder(END));
+ root->bind(TOK_ERROR)->bind(new be_builder(ERROR));
+ root->bind_num(TOK_ERROR)->bind(new be_builder(ERROR));
+
+ root->bind(TOK_NEVER)->bind(new never_builder());
+}
+
+/* vim: set sw=2 ts=8 cino=>4,n-2,{2,^-2,t0,(0,u0,w1,M1 : */
diff --git a/tapsets.cxx b/tapsets.cxx
index 9b6ad713..e6d641bd 100644
--- a/tapsets.cxx
+++ b/tapsets.cxx
@@ -69,81 +69,6 @@ using namespace __gnu_cxx;
// ------------------------------------------------------------------------
-// begin/end/error probes are run right during registration / deregistration
-// ------------------------------------------------------------------------
-
-static string TOK_BEGIN("begin");
-static string TOK_END("end");
-static string TOK_ERROR("error");
-
-enum be_t { BEGIN, END, ERROR };
-
-struct be_derived_probe: public derived_probe
-{
- be_t type;
- int64_t priority;
-
- be_derived_probe (probe* p, probe_point* l, be_t t, int64_t pr):
- derived_probe (p, l), type (t), priority (pr) {}
-
- void join_group (systemtap_session& s);
-
- static inline bool comp(be_derived_probe const *a,
- be_derived_probe const *b)
- {
- // This allows the BEGIN/END/ERROR probes to intermingle.
- // But that's OK - they're always treversed with a nested
- // "if (type==FOO)" conditional.
- return a->priority < b->priority;
- }
-
- bool needs_global_locks () { return false; }
- // begin/end probes don't need locks around global variables, since
- // they aren't run concurrently with any other probes
-};
-
-
-struct be_derived_probe_group: public generic_dpg<be_derived_probe>
-{
-public:
- void emit_module_decls (systemtap_session& s);
- void emit_module_init (systemtap_session& s);
- void emit_module_exit (systemtap_session& s);
-};
-
-struct be_builder: public derived_probe_builder
-{
- be_t type;
-
- be_builder(be_t t) : type(t) {}
-
- virtual void build(systemtap_session &,
- probe * base,
- probe_point * location,
- literal_map_t const & parameters,
- vector<derived_probe *> & finished_results)
- {
- int64_t priority;
- if ((type == BEGIN && !get_param(parameters, TOK_BEGIN, priority)) ||
- (type == END && !get_param(parameters, TOK_END, priority)) ||
- (type == ERROR && !get_param(parameters, TOK_ERROR, priority)))
- priority = 0;
- finished_results.push_back(
- new be_derived_probe(base, location, type, priority));
- }
-};
-
-
-void
-be_derived_probe::join_group (systemtap_session& s)
-{
- if (! s.be_derived_probes)
- s.be_derived_probes = new be_derived_probe_group ();
- s.be_derived_probes->enroll (this);
-}
-
-
-// ------------------------------------------------------------------------
void
common_probe_entryfn_prologue (translator_output* o, string statestr,
string new_pp,
@@ -334,124 +259,6 @@ common_probe_entryfn_epilogue (translator_output* o,
// ------------------------------------------------------------------------
-void
-be_derived_probe_group::emit_module_decls (systemtap_session& s)
-{
- if (probes.empty()) return;
-
- s.op->newline() << "/* ---- begin/end probes ---- */";
- s.op->newline() << "static void enter_begin_probe (void (*fn)(struct context*), const char* pp) {";
- s.op->indent(1);
- common_probe_entryfn_prologue (s.op, "STAP_SESSION_STARTING", "pp", false);
- s.op->newline() << "(*fn) (c);";
- common_probe_entryfn_epilogue (s.op, false);
- s.op->newline(-1) << "}";
-
- s.op->newline() << "static void enter_end_probe (void (*fn)(struct context*), const char* pp) {";
- s.op->indent(1);
- common_probe_entryfn_prologue (s.op, "STAP_SESSION_STOPPING", "pp", false);
- s.op->newline() << "(*fn) (c);";
- common_probe_entryfn_epilogue (s.op, false);
- s.op->newline(-1) << "}";
-
- s.op->newline() << "static void enter_error_probe (void (*fn)(struct context*), const char* pp) {";
- s.op->indent(1);
- common_probe_entryfn_prologue (s.op, "STAP_SESSION_ERROR", "pp", false);
- s.op->newline() << "(*fn) (c);";
- common_probe_entryfn_epilogue (s.op, false);
- s.op->newline(-1) << "}";
-
- s.op->newline() << "static struct stap_be_probe {";
- s.op->newline(1) << "void (*ph)(struct context*);";
- s.op->newline() << "const char* pp;";
- s.op->newline() << "int type;";
- s.op->newline(-1) << "} stap_be_probes[] = {";
- s.op->indent(1);
-
- // NB: We emit the table in sorted order here, so we don't have to
- // store the priority numbers as integers and sort at run time.
-
- sort(probes.begin(), probes.end(), be_derived_probe::comp);
-
- for (unsigned i=0; i < probes.size(); i++)
- {
- s.op->newline () << "{";
- s.op->line() << " .pp="
- << lex_cast_qstring (*probes[i]->sole_location()) << ",";
- s.op->line() << " .ph=&" << probes[i]->name << ",";
- s.op->line() << " .type=" << probes[i]->type;
- s.op->line() << " },";
- }
- s.op->newline(-1) << "};";
-}
-
-void
-be_derived_probe_group::emit_module_init (systemtap_session& s)
-{
- if (probes.empty()) return;
-
- s.op->newline() << "for (i=0; i<" << probes.size() << "; i++) {";
- s.op->newline(1) << "struct stap_be_probe* stp = & stap_be_probes [i];";
- s.op->newline() << "if (stp->type != " << BEGIN << ") continue;";
- s.op->newline() << "enter_begin_probe (stp->ph, stp->pp);";
- s.op->newline() << "/* rc = 0; */";
- // NB: begin probes that cause errors do not constitute registration
- // failures. An error message will probably get printed and if
- // MAXERRORS was left at 1, we'll get an stp_exit. The
- // error-handling probes will be run during the ordinary
- // unregistration phase.
- s.op->newline(-1) << "}";
-}
-
-void
-be_derived_probe_group::emit_module_exit (systemtap_session& s)
-{
- if (probes.empty()) return;
-
- s.op->newline() << "for (i=0; i<" << probes.size() << "; i++) {";
- s.op->newline(1) << "struct stap_be_probe* stp = & stap_be_probes [i];";
- s.op->newline() << "if (stp->type != " << END << ") continue;";
- s.op->newline() << "enter_end_probe (stp->ph, stp->pp);";
- s.op->newline(-1) << "}";
-
- s.op->newline() << "for (i=0; i<" << probes.size() << "; i++) {";
- s.op->newline(1) << "struct stap_be_probe* stp = & stap_be_probes [i];";
- s.op->newline() << "if (stp->type != " << ERROR << ") continue;";
- s.op->newline() << "enter_error_probe (stp->ph, stp->pp);";
- s.op->newline(-1) << "}";
-}
-
-
-
-// ------------------------------------------------------------------------
-// never probes are never run
-// ------------------------------------------------------------------------
-
-static string TOK_NEVER("never");
-
-struct never_derived_probe: public derived_probe
-{
- never_derived_probe (probe* p): derived_probe (p) {}
- never_derived_probe (probe* p, probe_point* l): derived_probe (p, l) {}
- void join_group (systemtap_session&) { /* thus no probe_group */ }
-};
-
-
-struct never_builder: public derived_probe_builder
-{
- never_builder() {}
- virtual void build(systemtap_session &,
- probe * base,
- probe_point * location,
- literal_map_t const &,
- vector<derived_probe *> & finished_results)
- {
- finished_results.push_back(new never_derived_probe(base, location));
- }
-};
-
-
-
// ------------------------------------------------------------------------
// Dwarf derived probes. "We apologize for the inconvience."
// ------------------------------------------------------------------------
@@ -6796,6 +6603,8 @@ itrace_derived_probe_group::emit_module_exit (systemtap_session& s)
// utrace user-space probes
// ------------------------------------------------------------------------
+static string TOK_BEGIN("begin");
+static string TOK_END("end");
static string TOK_THREAD("thread");
static string TOK_SYSCALL("syscall");
@@ -11177,17 +10986,9 @@ perfmon_derived_probe_group::emit_module_init (translator_output* o)
void
register_standard_tapsets(systemtap_session & s)
{
+ register_tapset_been(s);
register_tapset_timers(s);
- s.pattern_root->bind(TOK_BEGIN)->bind(new be_builder(BEGIN));
- s.pattern_root->bind_num(TOK_BEGIN)->bind(new be_builder(BEGIN));
- s.pattern_root->bind(TOK_END)->bind(new be_builder(END));
- s.pattern_root->bind_num(TOK_END)->bind(new be_builder(END));
- s.pattern_root->bind(TOK_ERROR)->bind(new be_builder(ERROR));
- s.pattern_root->bind_num(TOK_ERROR)->bind(new be_builder(ERROR));
-
- s.pattern_root->bind(TOK_NEVER)->bind(new never_builder());
-
s.pattern_root->bind("perfmon")->bind_str("counter")
->bind(new perfmon_builder());
diff --git a/tapsets.h b/tapsets.h
index eb8a5072..cf83b5e3 100644
--- a/tapsets.h
+++ b/tapsets.h
@@ -20,6 +20,7 @@ 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_timers(systemtap_session& sess);
// ------------------------------------------------------------------------