diff options
author | ddomingo <ddomingo@redhat.com> | 2008-09-11 12:07:38 +1000 |
---|---|---|
committer | ddomingo <ddomingo@redhat.com> | 2008-09-11 12:07:38 +1000 |
commit | 936eeb672167eaec2e5d8e9d7cf7fe9e962efe58 (patch) | |
tree | f340b3f78479294491e76e6533c28160b3cc2ee1 /coveragedb.cxx | |
parent | 6f57b072898d1858e0af448169c759dd44efddca (diff) | |
parent | 223f5b6b6e2c945c442a5dde7e63e637237f575b (diff) | |
download | systemtap-steved-936eeb672167eaec2e5d8e9d7cf7fe9e962efe58.tar.gz systemtap-steved-936eeb672167eaec2e5d8e9d7cf7fe9e962efe58.tar.xz systemtap-steved-936eeb672167eaec2e5d8e9d7cf7fe9e962efe58.zip |
Merge branch 'master' of ssh://sources.redhat.com/git/systemtap
Diffstat (limited to 'coveragedb.cxx')
-rw-r--r-- | coveragedb.cxx | 30 |
1 files changed, 16 insertions, 14 deletions
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; i<s.functions.size(); i++) { - clog << "function: " << s.functions[i]->tok->location - << " " << s.functions[i]->name - << endl; - } + for (map<string,functiondecl*>::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; i<s.unused_functions.size(); i++) { @@ -262,15 +263,16 @@ void sql_update_used_functions(sqlite3 *db, systemtap_session &s) { // update db used functions - for (unsigned i=0; i<s.functions.size(); i++) { - struct source_loc place = s.functions[i]->tok->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<string,functiondecl*>::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); + } } |