diff options
author | Ingo Struewing <ingo.struewing@sun.com> | 2009-09-29 17:38:40 +0200 |
---|---|---|
committer | Ingo Struewing <ingo.struewing@sun.com> | 2009-09-29 17:38:40 +0200 |
commit | 21586dfb084b05ac7d98ee990d64637b4be9222a (patch) | |
tree | 685de4fd8757394edb5d353f0627eb2390ffc419 /CMakeLists.txt | |
parent | 8b9843408d8b1068798228f397cd1a20fa56f504 (diff) | |
download | mariadb-git-21586dfb084b05ac7d98ee990d64637b4be9222a.tar.gz |
WL#4259 - Debug Sync Facility
Backport from 6.0 to 5.1.
Only those sync points are included, which are used in debug_sync.test.
The Debug Sync Facility allows to place synchronization points
in the code:
open_tables(...)
DEBUG_SYNC(thd, "after_open_tables");
lock_tables(...)
When activated, a sync point can
- Send a signal and/or
- Wait for a signal
Nomenclature:
- signal: A value of a global variable that persists
until overwritten by a new signal. The global
variable can also be seen as a "signal post"
or "flag mast". Then the signal is what is
attached to the "signal post" or "flag mast".
- send a signal: Assign the value (the signal) to the global
variable ("set a flag") and broadcast a
global condition to wake those waiting for
a signal.
- wait for a signal: Loop over waiting for the global condition until
the global value matches the wait-for signal.
Please find more information in the top comment in debug_sync.cc
or in the worklog entry.
Diffstat (limited to 'CMakeLists.txt')
-rwxr-xr-x | CMakeLists.txt | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 7d91e39eb6d..8c40312e32b 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -66,6 +66,12 @@ IF(EXTRA_DEBUG) ADD_DEFINITIONS(-D EXTRA_DEBUG) ENDIF(EXTRA_DEBUG) +IF(ENABLED_DEBUG_SYNC) + ADD_DEFINITIONS(-D ENABLED_DEBUG_SYNC) +ENDIF(ENABLED_DEBUG_SYNC) +SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DENABLED_DEBUG_SYNC") +SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DENABLED_DEBUG_SYNC") + # in some places we use DBUG_OFF SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DDBUG_OFF") SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -DDBUG_OFF") |