summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog11
-rw-r--r--Makefile.am2
-rw-r--r--Makefile.in2
-rwxr-xr-xconfigure13
-rw-r--r--configure.ac11
-rw-r--r--coveragedb.cxx23
6 files changed, 40 insertions, 22 deletions
diff --git a/ChangeLog b/ChangeLog
index 05fe3211..0137cef9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2007-06-29 William Cohen <wcohen@redhat.com>
+
+ 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.
+
2007-06-26 William Cohen <wcohen@redhat.com>
* staptree.cxx (probe_point::print): Remove stray "\n".
diff --git a/Makefile.am b/Makefile.am
index 4b81c83d..25727712 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -16,7 +16,7 @@ stap_SOURCES = main.cxx \
parse.cxx staptree.cxx elaborate.cxx translate.cxx \
tapsets.cxx buildrun.cxx loc2c.c hash.cxx mdfour.c \
cache.cxx util.cxx coveragedb.cxx
-stap_LDADD = @stap_LIBS@ -lsqlite3
+stap_LDADD = @stap_LIBS@
stap_CXXFLAGS = $(AM_CXXFLAGS)
stap_CPPFLAGS = $(AM_CPPFLAGS)
diff --git a/Makefile.in b/Makefile.in
index 1b1ff3f8..3ffc2441 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -270,7 +270,7 @@ stap_SOURCES = main.cxx \
tapsets.cxx buildrun.cxx loc2c.c hash.cxx mdfour.c \
cache.cxx util.cxx coveragedb.cxx
-stap_LDADD = @stap_LIBS@ -lsqlite3
+stap_LDADD = @stap_LIBS@
stap_CXXFLAGS = $(AM_CXXFLAGS)
stap_CPPFLAGS = $(AM_CPPFLAGS) $(am__append_1)
stap_LDFLAGS = $(AM_LDFLAGS) $(am__append_2)
diff --git a/configure b/configure
index 5e034dc8..ae8949d4 100755
--- a/configure
+++ b/configure
@@ -6654,9 +6654,8 @@ else
stap_LIBS="-ldw -lebl"
fi
-{ echo "$as_me:$LINENO: stap will link $stap_LIBS" >&5
-echo "$as_me: stap will link $stap_LIBS" >&6;}
-
+save_LIBS="$LIBS"
+LIBS="$stap_LIBS"
{ echo "$as_me:$LINENO: checking for sqlite3_open in -lsqlite3" >&5
echo $ECHO_N "checking for sqlite3_open in -lsqlite3... $ECHO_C" >&6; }
@@ -6728,11 +6727,17 @@ _ACEOF
else
- { { echo "$as_me:$LINENO: error: missing sqlite development headers/libraries" >&5
+ { { echo "$as_me:$LINENO: error: missing sqlite development headers/libraries" >&5
echo "$as_me: error: missing sqlite development headers/libraries" >&2;}
{ (exit 1); exit 1; }; }
fi
+stap_LIBS="$LIBS"
+LIBS="$SAVE_LIBS"
+
+
+{ echo "$as_me:$LINENO: stap will link $stap_LIBS" >&5
+echo "$as_me: stap will link $stap_LIBS" >&6;}
date=`date +%Y-%m-%d`
diff --git a/configure.ac b/configure.ac
index ec619094..ae1207dc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -137,11 +137,16 @@ else
# We built our own and stap_LDFLAGS points at the install.
stap_LIBS="-ldw -lebl"
fi
-AC_SUBST(stap_LIBS)
-AC_MSG_NOTICE([stap will link $stap_LIBS])
-AC_CHECK_HEADER(sqlite3.h, AC_CHECK_LIB(sqlite3, sqlite3_open,
+save_LIBS="$LIBS"
+LIBS="$stap_LIBS"
+AC_CHECK_LIB(sqlite3, sqlite3_open,,[
AC_MSG_ERROR([missing sqlite development headers/libraries])])
+stap_LIBS="$LIBS"
+LIBS="$SAVE_LIBS"
+
+AC_SUBST(stap_LIBS)
+AC_MSG_NOTICE([stap will link $stap_LIBS])
dnl Plop in the build (configure) date
date=`date +%Y-%m-%d`
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);