summaryrefslogtreecommitdiffstats
path: root/tapsets.cxx
diff options
context:
space:
mode:
authordsmith <dsmith>2007-03-19 21:14:21 +0000
committerdsmith <dsmith>2007-03-19 21:14:21 +0000
commitab655cf8ec35ab47a38d95182dfe07a0e380681a (patch)
tree64be89f5afc184d87d2b4f2764abc6fc7047ec73 /tapsets.cxx
parentdc499f36287a8c960f2ccf0d1940b52a8cc62c84 (diff)
downloadsystemtap-steved-ab655cf8ec35ab47a38d95182dfe07a0e380681a.tar.gz
systemtap-steved-ab655cf8ec35ab47a38d95182dfe07a0e380681a.tar.xz
systemtap-steved-ab655cf8ec35ab47a38d95182dfe07a0e380681a.zip
2007-03-19 David Smith <dsmith@redhat.com>
PR 4146 (partial fix) * tapsets.cxx (all_session_groups): Added note about stating that begin probes should be registered (actually run) first and end probes should be unregistered (run) last. * translate.cxx (c_unparser::emit_module_exit): Process probe group vector in reverse order so that probe groups will get unregistered in the reverse order that they were registered.
Diffstat (limited to 'tapsets.cxx')
-rw-r--r--tapsets.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/tapsets.cxx b/tapsets.cxx
index 54388f5b..eb66f2bc 100644
--- a/tapsets.cxx
+++ b/tapsets.cxx
@@ -5419,6 +5419,13 @@ all_session_groups(systemtap_session& s)
{
vector<derived_probe_group*> g;
#define DOONE(x) if (s. x##_derived_probes) g.push_back (s. x##_derived_probes)
+
+ // Note that order *is* important here. We want to make sure we
+ // register (actually run) begin probes before any other probe type
+ // is run. Similarly, when unregistering probes, we want to
+ // unregister (actually run) end probes after every other probe type
+ // has be unregistered. To do the latter,
+ // c_unparser::emit_module_exit() will run this list backwards.
DOONE(be);
DOONE(dwarf);
DOONE(timer);