diff options
author | wcohen <wcohen> | 2007-06-29 18:13:49 +0000 |
---|---|---|
committer | wcohen <wcohen> | 2007-06-29 18:13:49 +0000 |
commit | 6b1a02746ee21861ddbd7bb7ccd46d0674904417 (patch) | |
tree | 65b81cc9164aa57073a8d340e0cbe149a3e74e59 /coveragedb.cxx | |
parent | 65eebc45d24f5272cc261b815fd1e0e523e3b504 (diff) | |
download | systemtap-steved-6b1a02746ee21861ddbd7bb7ccd46d0674904417.tar.gz systemtap-steved-6b1a02746ee21861ddbd7bb7ccd46d0674904417.tar.xz systemtap-steved-6b1a02746ee21861ddbd7bb7ccd46d0674904417.zip |
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.
Diffstat (limited to 'coveragedb.cxx')
-rw-r--r-- | coveragedb.cxx | 23 |
1 files changed, 10 insertions, 13 deletions
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); |