From 6b1a02746ee21861ddbd7bb7ccd46d0674904417 Mon Sep 17 00:00:00 2001 From: wcohen Date: Fri, 29 Jun 2007 18:13:49 +0000 Subject: PR 4529 * configure.ac: * Makefile.am: Limit where sqlite3 linked in. * configure: * Makefile.in: Regenerate. * coveragedb.cxx (update_coverage_db): Remove unneeded print. * coveragedb.cxx (increment_element): Correct formatting. --- coveragedb.cxx | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) (limited to 'coveragedb.cxx') diff --git a/coveragedb.cxx b/coveragedb.cxx index 69eb95b4..15298636 100644 --- a/coveragedb.cxx +++ b/coveragedb.cxx @@ -120,26 +120,26 @@ void enter_element(sqlite3 *db, coverage_element &x) void increment_element(sqlite3 *db, coverage_element &x) { // make sure value in table - enter_element(db, x); - // increment appropriate value - if (x.compiled) { + enter_element(db, x); + // increment appropriate value + if (x.compiled) { ostringstream command; command << "update counts set compiled = compiled + " << x.compiled << " where (" << "file == '" << x.file << "' and " << "line == '" << x.line << "' and " << "col == '" << x.col << "')"; - sql_stmt(db, command.str().c_str()); - } - if (x.removed) { - ostringstream command; - command << "update counts set removed = removed + " + sql_stmt(db, command.str().c_str()); + } + if (x.removed) { + ostringstream command; + command << "update counts set removed = removed + " << x.removed << " where (" << "file == '" << x.file << "' and " << "line == '" << x.line << "' and " << "col == '" << x.col << "')"; - sql_stmt(db, command.str().c_str()); - } + sql_stmt(db, command.str().c_str()); + } } @@ -305,9 +305,6 @@ void update_coverage_db(systemtap_session &s) // update the number counts on things sql_stmt(db, create_table.c_str()); - if (s.verbose >2) - print_coverage_info(s); - sql_update_used_probes(db, s); sql_update_unused_probes(db, s); sql_update_used_functions(db, s); -- cgit