diff options
author | fche <fche> | 2006-04-21 19:51:43 +0000 |
---|---|---|
committer | fche <fche> | 2006-04-21 19:51:43 +0000 |
commit | 35d4ab18d5d333ffcac436ea174beb7201275c65 (patch) | |
tree | 0c785d3b462cc7ca483f105639057239ac38da84 /elaborate.h | |
parent | f9db95d019b4936d62c9b3e021aecc2dfb653dcf (diff) | |
download | systemtap-steved-35d4ab18d5d333ffcac436ea174beb7201275c65.tar.gz systemtap-steved-35d4ab18d5d333ffcac436ea174beb7201275c65.tar.xz systemtap-steved-35d4ab18d5d333ffcac436ea174beb7201275c65.zip |
2006-04-21 Frank Ch. Eigler <fche@elastic.org>
PR 953
* elaborate.h (derived_probe): Add field "name". Stop passing
"probe index" to other emit_* calls.
(emit_probe_context_vars): New member function.
* elaborate.cxx (derived_probe ctor): Generate unique name.
* translate.cxx (*): Adapt to index->name.
(emit_probe): Realize that probe locals only occur at nesting=0.
* tapsets.cxx (*derived_probe::emit_*): Adapt to index->name.
(mark_var_expanding_copy_visitor): New class to process $argN.
(mark_derived_probe ctor): Call it.
(mark_derived_probe::emit_probe_context_vars): Do it.
* buildrun.cxx (compile_pass): Add more optional gcc verbosity.
Add CFLAGS += -freorder-blocks.
* testsuite/buildok/marker.stp: New test.
Diffstat (limited to 'elaborate.h')
-rw-r--r-- | elaborate.h | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/elaborate.h b/elaborate.h index afaf8b18..7317e940 100644 --- a/elaborate.h +++ b/elaborate.h @@ -112,20 +112,23 @@ struct derived_probe: public probe derived_probe (probe* b, probe_point* l); probe* base; // the original parsed probe +private: + static unsigned last_probeidx; + +public: + std::string name; + virtual ~derived_probe () {} - virtual void emit_registrations (translator_output* o, - unsigned probeidx) = 0; + virtual void emit_registrations (translator_output* o) = 0; // (from within module_init): - // rc = ..... ENTRYFN ; + // rc = ..... register_or_whatever (ENTRYFN); - virtual void emit_deregistrations (translator_output* o, - unsigned probeidx) = 0; + virtual void emit_deregistrations (translator_output* o) = 0; // (from within module_exit): - // rc = ..... ENTRYFN ; + // (void) ..... unregister_or_whatever (ENTRYFN); - virtual void emit_probe_entries (translator_output* o, - unsigned probeidx) = 0; + virtual void emit_probe_entries (translator_output* o) = 0; // ... for all probe-points: // ELABORATE_SPECIFIC_SIGNATURE ENTRYFN { // /* allocate context - probe_prologue */ @@ -134,6 +137,11 @@ struct derived_probe: public probe // /* deallocate context - probe_epilogue */ // } + virtual void emit_probe_context_vars (translator_output* o) {} + // From within unparser::emit_common_header, add any extra variables + // to this probe's context locals. + +protected: void emit_probe_prologue (translator_output* o, const std::string&); void emit_probe_epilogue (translator_output* o); }; |