List:Commits« Previous MessageNext Message »
From:Tor Didriksen Date:May 9 2012 7:13am
Subject:bzr push into mysql-trunk branch (tor.didriksen:3803 to 3804) Bug#14028421
View as plain text  
 3804 Tor Didriksen	2012-05-09
      Bug#14028421 DBUG_SUICIDE() DOES NOT FLUSH GCOV DATA

    modified:
      CMakeLists.txt
      dbug/dbug.c
 3803 Sunny Bains	2012-05-09
      include string.h, to avoid compiler warnings when using clang.

    modified:
      storage/innobase/include/ut0counter.h
=== modified file 'CMakeLists.txt'
--- a/CMakeLists.txt	2012-04-17 14:20:00 +0000
+++ b/CMakeLists.txt	2012-05-09 07:13:25 +0000
@@ -218,9 +218,9 @@ ENDIF() 
 OPTION(ENABLE_GCOV "Enable gcov (debug, Linux builds only)" OFF)
 IF (ENABLE_GCOV AND NOT WIN32 AND NOT APPLE)
   SET(CMAKE_CXX_FLAGS_DEBUG
-    "${CMAKE_CXX_FLAGS_DEBUG} -fprofile-arcs -ftest-coverage")
+    "${CMAKE_CXX_FLAGS_DEBUG} -fprofile-arcs -ftest-coverage -DHAVE_GCOV")
   SET(CMAKE_C_FLAGS_DEBUG
-    "${CMAKE_C_FLAGS_DEBUG} -fprofile-arcs -ftest-coverage")
+    "${CMAKE_C_FLAGS_DEBUG} -fprofile-arcs -ftest-coverage -DHAVE_GCOV")
   SET(CMAKE_EXE_LINKER_FLAGS_DEBUG
     "${CMAKE_EXE_LINKER_FLAGS_DEBUG} -fprofile-arcs -ftest-coverage -lgcov")
 ENDIF()

=== modified file 'dbug/dbug.c'
--- a/dbug/dbug.c	2011-12-09 21:08:37 +0000
+++ b/dbug/dbug.c	2012-05-09 07:13:25 +0000
@@ -2223,12 +2223,23 @@ void _db_flush_()
 
 
 #ifndef __WIN__
+
+#ifdef HAVE_GCOV
+extern void __gcov_flush();
+#endif
+
 void _db_suicide_()
 {
   int retval;
   sigset_t new_mask;
   sigfillset(&new_mask);
 
+#ifdef HAVE_GCOV
+  fprintf(stderr, "Flushing gcov data\n");
+  fflush(stderr);
+  __gcov_flush();
+#endif
+
   fprintf(stderr, "SIGKILL myself\n");
   fflush(stderr);
 

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk branch (tor.didriksen:3803 to 3804) Bug#14028421Tor Didriksen9 May