f->profile_memory = "";
f->flush_memory_ms = 0;
f->stop_on_start = false;
+ f->running_on_valgrind = false;
+
// Let a frontend override.
OverrideFlags(f);
int flush_memory_ms;
// Stops on start until __tsan_resume() is called (for debugging).
bool stop_on_start;
+ // Controls whether RunningOnValgrind() returns true or false.
+ bool running_on_valgrind;
};
Flags *flags();
}
int RunningOnValgrind() {
- return 0;
+ return flags()->running_on_valgrind;
}
double __attribute__((weak)) ValgrindSlowdown(void) {