From f76427a2bf80e4451e5e8d0c26b06aca65e4e2c4 Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Wed, 10 Sep 2008 17:21:44 -0400 Subject: PR6876: translator speedup for many $vars --- coveragedb.cxx | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) (limited to 'coveragedb.cxx') diff --git a/coveragedb.cxx b/coveragedb.cxx index 63cc4c0f..aafcd545 100644 --- a/coveragedb.cxx +++ b/coveragedb.cxx @@ -62,11 +62,12 @@ void print_coverage_info(systemtap_session &s) } // print out used functions clog << "---- used functions----- " << endl; - for (unsigned i=0; itok->location - << " " << s.functions[i]->name - << endl; - } + for (map::iterator it = s.functions.begin(); it != s.functions.end(); it++) + { + clog << "function: " << it->second->tok->location + << " " << it->second->name + << endl; + } // print out unused functions clog << "---- unused functions----- " << endl; for (unsigned i=0; itok->location; - coverage_element x(place); - - x.type = db_type_function; - x.name = s.functions[i]->name; - x.compiled = 1; - increment_element(db, x); - } + for (map::iterator it = s.functions.begin(); it != s.functions.end(); it++) + { + struct source_loc place = it->second->tok->location; + coverage_element x(place); + + x.type = db_type_function; + x.name = it->second->name; + x.compiled = 1; + increment_element(db, x); + } } -- cgit