Fix a usage of the wrong variable; separate the profiling enabled bool for the run loop and flow profilers.
This commit is contained in:
parent
335c76501a
commit
f44f41c9fb
|
@ -3756,6 +3756,7 @@ volatile bool profileThread = false;
|
|||
volatile int64_t profileThreadId = -1;
|
||||
void (*chainedSignalHandler)(int) = nullptr;
|
||||
volatile bool profilingEnabled = 1;
|
||||
volatile thread_local bool flowProfilingEnabled = 1;
|
||||
|
||||
volatile int64_t numProfilesDisabled = 0;
|
||||
volatile int64_t numProfilesOverflowed = 0;
|
||||
|
@ -3833,6 +3834,7 @@ void setProfilingEnabled(int enabled) {
|
|||
if (profileThread) {
|
||||
profilingEnabled = enabled;
|
||||
}
|
||||
flowProfilingEnabled = enabled;
|
||||
#else
|
||||
// No profiling for other platforms!
|
||||
#endif
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
#include "flow/Platform.h"
|
||||
#include "flow/actorcompiler.h" // This must be the last include.
|
||||
|
||||
extern volatile int profilingEnabled;
|
||||
extern volatile thread_local int flowProfilingEnabled;
|
||||
|
||||
static uint64_t sys_gettid() {
|
||||
return syscall(__NR_gettid);
|
||||
|
@ -146,7 +146,7 @@ struct Profiler {
|
|||
if (inSigHandler.exchange(true)) {
|
||||
return;
|
||||
}
|
||||
if (profilingEnabled) {
|
||||
if (flowProfilingEnabled) {
|
||||
double t = timer();
|
||||
output_buffer->push(*(void**)&t);
|
||||
size_t n = platform::raw_backtrace(addresses, 256);
|
||||
|
|
Loading…
Reference in New Issue