From 3066c15c5313ba37afb518ef13d207c764a8ad2a Mon Sep 17 00:00:00 2001 From: fche Date: Thu, 26 Jan 2006 22:55:20 +0000 Subject: 2006-01-26 Frank Ch. Eigler PR 2060: lock elevation, mop-up * staptree.cxx (functioncall_traversing_visitor): Store a current_function pointer during traversal. (visit_embeddedcode): Use it to handle $target-synthesized functions. (varuse_collecting_visitor::visit_assignment): Correct l-lr typo. (visit_foreach_loop): Note added write on sorted foreach. (visit_delete_statement): Note as read+write. * staptree.h: Corresponding changes. * elaborate.cxx (dead_assignment_remover::visit_expr_statement): Correct stmt token after possible expression rewriting. * tapsets.cxx (visit_target_symbol): Create naming convention to recognize $target-synthesized functions. * translate.cxx (emit_locks, emit_unlocks): New functions to emit lock/unlock sequences at the outermost level of a probe. (emit_probe): Call them. (varlock_*): #if-0 out the lock code generation. Later, these classes should be removed. (translate_pass): Emit read_trylock() kludge macro for old kernels. --- tapsets.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'tapsets.cxx') diff --git a/tapsets.cxx b/tapsets.cxx index 835c426f..91740520 100644 --- a/tapsets.cxx +++ b/tapsets.cxx @@ -1040,7 +1040,7 @@ dwflpp clog << "finding prologue for '" << last_function->name << "' entrypc=0x" << hex << addr - << " highpc=0x" << last_function_highpc + << " highpc=0x" << last_function_highpc << dec << "\n"; } } @@ -2619,7 +2619,9 @@ var_expanding_copy_visitor::visit_target_symbol (target_symbol *e) if (lvalue && !q.sess.guru_mode) throw semantic_error("write to target variable not permitted", e->tok); - string fname = (string(lvalue ? "set" : "get") + // NB: This naming convention is used by varuse_collecting_visitor + // to make elision of these functions possible. + string fname = (string(lvalue ? "_tvar_set" : "_tvar_get") + "_" + e->base_name.substr(1) + "_" + lex_cast(tick++)); -- cgit