diff options
author | dsmith <dsmith> | 2007-05-21 21:21:13 +0000 |
---|---|---|
committer | dsmith <dsmith> | 2007-05-21 21:21:13 +0000 |
commit | 2c384610cea3e62da8a4af676b5f8be523741b88 (patch) | |
tree | 3640552069c2ef7388a9a3c2202ccd1b9ecd8cbc /translate.cxx | |
parent | 2f675c1e854d1546ade5c29b3fb8ddf41349c5e0 (diff) | |
download | systemtap-steved-2c384610cea3e62da8a4af676b5f8be523741b88.tar.gz systemtap-steved-2c384610cea3e62da8a4af676b5f8be523741b88.tar.xz systemtap-steved-2c384610cea3e62da8a4af676b5f8be523741b88.zip |
2007-05-21 David Smith <dsmith@redhat.com>
PR 4446.
* elaborate.h (derived_probe::initialize_probe_context_vars): New
virtual function that will allow added context vars to be
initialized.
* translate.cxx (c_unparser::emit_common_header): Added
'mark_va_list'.
(c_unparser::emit_probe): Calls new function
initialize_probe_context_vars.
(translate_pass): Includes linux/marker.h if CONFIG_MARKERS is
defined.
* tapsets.cxx (struct dwarf_query): Split into base_query (which
contains most of the original code) and a much smaller
dwarf_query class.
(struct base_query): New class.
(dwarf_query::handle_query_module): New function.
(query_module): Moved code into dwarf_query::handle_query_module().
(mark_derived_probe): Adjusted for new kernel markers.
(mark_derived_probe_group): Ditto.
(mark_var_expanding_copy_visitor): Ditto.
(mark_var_expanding_copy_visitor::visit_target_symbol): Generates
code for new kernel markers.
(struct mark_query): New class.
(mark_query::handle_query_module): New function.
(mark_derived_probe::mark_derived_probe): Adjusted for new kernel
markers.
(mark_derived_probe::join_group): Ditto.
(mark_derived_probe::emit_probe_context_vars): Ditto.
(mark_derived_probe::parse_probe_sig): New function.
(mark_derived_probe::initialize_probe_context_vars): New function.
(mark_derived_probe::emit_module_decls): Adjust for new kernel markers.
(mark_derived_probe::emit_module_init): Ditto.
(mark_derived_probe::emit_module_exit): Ditto.
(struct mark_builder): Ditto.
(mark_builder::build): Ditto.
Diffstat (limited to 'translate.cxx')
-rw-r--r-- | translate.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/translate.cxx b/translate.cxx index 8996bc4c..b5fef890 100644 --- a/translate.cxx +++ b/translate.cxx @@ -858,6 +858,7 @@ c_unparser::emit_common_header () o->newline() << "const char *last_stmt;"; o->newline() << "struct pt_regs *regs;"; o->newline() << "struct kretprobe_instance *pi;"; + o->newline() << "va_list mark_va_list;"; o->newline() << "#ifdef STP_TIMING"; o->newline() << "Stat *statp;"; o->newline() << "#endif"; @@ -1482,6 +1483,8 @@ c_unparser::emit_probe (derived_probe* v) throw semantic_error ("unsupported local variable type", v->locals[j]->tok); } + + v->initialize_probe_context_vars (o); v->body->visit (this); @@ -4340,6 +4343,10 @@ translate_pass (systemtap_session& s) s.op->newline() << "#define read_trylock(x) ({ read_lock(x); 1; })"; s.op->newline() << "#endif"; + s.op->newline() << "#if defined(CONFIG_MARKERS)"; + s.op->newline() << "#include <linux/marker.h>"; + s.op->newline() << "#endif"; + s.up->emit_common_header (); // context etc. for (unsigned i=0; i<s.embeds.size(); i++) |