mirror of
https://github.com/mongodb/mongo.git
synced 2024-11-30 17:10:48 +01:00
SERVER-10816 enable StackChecker when not optimized and in debug mode rather than when simply in debug mode
This commit is contained in:
parent
d3da966f57
commit
97c82b16b2
@ -475,6 +475,8 @@ if "sunos5" == os.sys.platform:
|
||||
# http://four.pairlist.net/pipermail/scons-users/2013-June/001486.html
|
||||
env.Tool('gnulink')
|
||||
|
||||
if optBuild:
|
||||
env.Append( CPPDEFINES=["MONGO_OPTIMIZED_BUILD"] )
|
||||
|
||||
if has_option("propagate-shell-environment"):
|
||||
env['ENV'] = dict(os.environ);
|
||||
|
@ -81,7 +81,7 @@ namespace mongo {
|
||||
|
||||
TSP_DEFINE(Client, currentClient)
|
||||
|
||||
#if defined(_DEBUG) && !XSAN_ENABLED
|
||||
#if defined(_DEBUG) && !defined(MONGO_OPTIMIZED_BUILD) && !XSAN_ENABLED
|
||||
struct StackChecker;
|
||||
ThreadLocalValue<StackChecker *> checker;
|
||||
|
||||
@ -134,7 +134,7 @@ namespace mongo {
|
||||
call this when your thread starts.
|
||||
*/
|
||||
Client& Client::initThread(const char *desc, AbstractMessagingPort *mp) {
|
||||
#if defined(_DEBUG) && !XSAN_ENABLED
|
||||
#if defined(_DEBUG) && !defined(MONGO_OPTIMIZED_BUILD) && !XSAN_ENABLED
|
||||
{
|
||||
if( sizeof(void*) == 8 ) {
|
||||
StackChecker sc;
|
||||
@ -230,7 +230,7 @@ namespace mongo {
|
||||
}
|
||||
|
||||
bool Client::shutdown() {
|
||||
#if defined(_DEBUG) && !XSAN_ENABLED
|
||||
#if defined(_DEBUG) && !defined(MONGO_OPTIMIZED_BUILD) && !XSAN_ENABLED
|
||||
{
|
||||
if( sizeof(void*) == 8 ) {
|
||||
StackChecker::check( desc() );
|
||||
|
@ -104,7 +104,9 @@ namespace StackTests {
|
||||
|
||||
void setupTests() {
|
||||
if ( inConstructorChainSupported() ) {
|
||||
#if defined(_DEBUG) && !defined(MONGO_OPTIMIZED_BUILD)
|
||||
DEV add< InCons >();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
||||
|
||||
#include "mongo/util/stack_introspect.h"
|
||||
|
||||
#if !defined(_WIN32)
|
||||
#if !defined(_WIN32) && !defined(MONGO_OPTIMIZED_BUILD)
|
||||
|
||||
#include <cstdlib>
|
||||
#include <cxxabi.h>
|
||||
@ -205,4 +205,4 @@ namespace mongo {
|
||||
bool inConstructorChainSupported() { return false; }
|
||||
}
|
||||
|
||||
#endif // #if !defined(_WIN32)
|
||||
#endif // #if !defined(_WIN32) && !defined(MONGO_OPTIMIZED_BUILD)
|
||||
|
Loading…
Reference in New Issue
Block a user