MCPcopy Create free account
hub / github.com/apple/foundationdb / RunningOnValgrind

Function RunningOnValgrind

contrib/stacktrace/stacktrace.amalgamation.cpp:2894–2903  ·  view source on GitHub ↗

See the comments in dynamic_annotations.h */

Source from the content-addressed store, hash-verified

2892
2893/* See the comments in dynamic_annotations.h */
2894int RunningOnValgrind(void) {
2895 static volatile int running_on_valgrind = -1;
2896 int local_running_on_valgrind = running_on_valgrind;
2897 /* C doesn't have thread-safe initialization of statics, and we
2898 don't want to depend on pthread_once here, so hack it. */
2899 ANNOTATE_BENIGN_RACE(&running_on_valgrind, "safe hack");
2900 if (local_running_on_valgrind == -1)
2901 running_on_valgrind = local_running_on_valgrind = GetRunningOnValgrind();
2902 return local_running_on_valgrind;
2903}
2904
2905/* See the comments in dynamic_annotations.h */
2906double ValgrindSlowdown(void) {

Callers 2

InitMethod · 0.85
ValgrindSlowdownFunction · 0.85

Calls 1

GetRunningOnValgrindFunction · 0.85

Tested by

no test coverage detected