diff options
author | dsmith <dsmith> | 2007-03-28 20:11:37 +0000 |
---|---|---|
committer | dsmith <dsmith> | 2007-03-28 20:11:37 +0000 |
commit | 90f98cc36060df795f79379e512d151d0e7c74a4 (patch) | |
tree | 937617c7cb901d5d7e75364400425d5ec7304ec6 /elaborate.h | |
parent | dba81c1410b8905ddcdeaac0a7af7badac74b341 (diff) | |
download | systemtap-steved-90f98cc36060df795f79379e512d151d0e7c74a4.tar.gz systemtap-steved-90f98cc36060df795f79379e512d151d0e7c74a4.tar.xz systemtap-steved-90f98cc36060df795f79379e512d151d0e7c74a4.zip |
2007-03-28 David Smith <dsmith@redhat.com>
PR 2341 (partial fix)
* elaborate.h (struct derived_probe): Added needs_global_locks()
member function. Unless overridden, will return true indicating
that this probe needs locks around global variable references.
* tapsets.cxx (struct be_derived_probe): Added override of default
needs_global_locks() returning false. begin/end probes don't
need locks around global variables, since they aren't run
concurrently with any other probes.
* translate.cxx (c_unparser::emit_common_header): Updated
probe_contents logic to match the logic in emit_probe.
(c_unparser::emit_probe): Added whether the probe needs global
variable locks to the probe string (that helps eliminate duplicate
probes). The generated C changes based on whether or not global
variable locks are needed, but the pass 2 output doesn't differ
between a probe that needs global variable locks and one that
doesn't. If the probe doesn't need global variable locks, doesn't
output them.
Diffstat (limited to 'elaborate.h')
-rw-r--r-- | elaborate.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/elaborate.h b/elaborate.h index 8c3a6869..9ad3c038 100644 --- a/elaborate.h +++ b/elaborate.h @@ -125,6 +125,9 @@ public: static void emit_common_header (translator_output* o); // from c_unparser::emit_common_header // XXX: probably can move this stuff to a probe_group::emit_module_decls + + virtual bool needs_global_locks () { return true; } + // by default, probes need locks around global variables }; // ------------------------------------------------------------------------ |