diff options
author | Rickard Green <[email protected]> | 2012-05-08 15:40:51 +0200 |
---|---|---|
committer | Rickard Green <[email protected]> | 2012-05-08 15:40:51 +0200 |
commit | 57c83838ee9e44c748603de381eee0dc5d59d3d3 (patch) | |
tree | 54439c35bff84f8de1c32e5f6e17ee822ee572f2 | |
parent | a1855f5bcbbc47faadf414eeb86de38c92341dca (diff) | |
download | otp-57c83838ee9e44c748603de381eee0dc5d59d3d3.tar.gz otp-57c83838ee9e44c748603de381eee0dc5d59d3d3.tar.bz2 otp-57c83838ee9e44c748603de381eee0dc5d59d3d3.zip |
Only use "gcc optimizer hack" when needed
-rw-r--r-- | erts/emulator/beam/erl_async.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/erts/emulator/beam/erl_async.c b/erts/emulator/beam/erl_async.c index cb975d64b0..d85c6feba7 100644 --- a/erts/emulator/beam/erl_async.c +++ b/erts/emulator/beam/erl_async.c @@ -122,6 +122,8 @@ typedef struct { #endif } ErtsAsyncData; +#if defined(USE_THREADS) && defined(USE_VM_PROBES) + /* * Some compilers, e.g. GCC 4.2.1 and -O3, will optimize away DTrace * calls if they're the last thing in the function. :-( @@ -129,6 +131,7 @@ typedef struct { * https://github.com/memcached/memcached/commit/6298b3978687530bc9d219b6ac707a1b681b2a46 */ static unsigned gcc_optimizer_hack = 0; +#endif int erts_async_max_threads; /* Initialized by erl_init.c */ int erts_async_thread_suggested_stack_size; /* Initialized by erl_init.c */ @@ -281,8 +284,8 @@ static ERTS_INLINE void async_add(ErtsAsync *a, ErtsAsyncQ* q) len = -1; DTRACE2(aio_pool_add, port_str, len); } -#endif gcc_optimizer_hack++; +#endif } static ERTS_INLINE ErtsAsync *async_get(ErtsThrQ_t *q, |