From c3a3c0c99c32c0969e6450d60aae1a2b1798ca17 Mon Sep 17 00:00:00 2001 From: wcohen Date: Tue, 26 Jun 2007 19:36:25 +0000 Subject: 2007-06-26 William Cohen PR 4529 * coveragedb.cxx: New. * coveragedb.h: New. * Makefile.am: Add coveragedb.cxx and sqlite3 to build. * Makefile.in: Regenerated. * configure.ac: Add test for sqlite3 * configure: Regenerated. * systemtap.spec.in: Add dependencies for sqlite3/sqlite3-devel. * elaborate.h, elaborate.cxx (derived_probe::collect_derivation_chain): New. (alias_expansion_builder::build): Correct token location. (semantic_pass_opt[12): Track used and unused variables/functions. * session.h (tapset_compile_coverage, unused_globals, unused_probes, unused_functions): New fields. * staptree.h (unused_locals, probe_point::str): New member. * staptree.cxx: Ditto. * main.cxx: Add "-q" tapset coverage option and SYSTEMTAP_COVERAGE env. --- staptree.cxx | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'staptree.cxx') diff --git a/staptree.cxx b/staptree.cxx index 08b2abae..3a50ac14 100644 --- a/staptree.cxx +++ b/staptree.cxx @@ -15,6 +15,7 @@ #include #include #include +#include #include using namespace std; @@ -848,6 +849,13 @@ void probe::printsig (ostream& o) const } +void +probe::collect_derivation_chain (std::vector &probes_list) +{ + probes_list.push_back((derived_probe*)this); +} + + void probe_point::print (ostream& o) const { for (unsigned i=0; ilocation << "}\n"; +} + +string probe_point::str () +{ + ostringstream o; + for (unsigned i=0; i0) o << "."; + probe_point::component* c = components[i]; + o << c->functor; + if (c->arg) + o << "(" << *c->arg << ")"; + } + if (optional) + o << "?"; + return o.str(); } -- cgit