diff --git a/js/src/jit/PerfSpewer.cpp b/js/src/jit/PerfSpewer.cpp index ca628bd19240..bab01a647798 100644 --- a/js/src/jit/PerfSpewer.cpp +++ b/js/src/jit/PerfSpewer.cpp @@ -9,7 +9,7 @@ #include "mozilla/IntegerPrintfMacros.h" #include "mozilla/SizePrintfMacros.h" -#if defined(__linux__) +#ifdef XP_UNIX # include #endif @@ -20,6 +20,8 @@ # include "jit/MIRGraph.h" #endif +#include "vm/MutexIDs.h" + // perf expects its data to be in a file /tmp/perf-PID.map, but for Android // and B2G the map files are written to /data/local/tmp/perf-PID.map // @@ -94,7 +96,7 @@ js::jit::CheckPerf() { } if (PerfMode != PERF_MODE_NONE) { - PerfMutex = js_new(); + PerfMutex = js_new(mutexid::PerfSpewer); if (!PerfMutex) MOZ_CRASH("failed to allocate PerfMutex"); diff --git a/js/src/vm/MutexIDs.h b/js/src/vm/MutexIDs.h index 69546620573e..ac384c6af128 100644 --- a/js/src/vm/MutexIDs.h +++ b/js/src/vm/MutexIDs.h @@ -34,6 +34,7 @@ _(SimulatorCacheLock, 500) \ _(Arm64SimulatorLock, 500) \ _(IonSpewer, 500) \ + _(PerfSpewer, 500) \ _(TraceLoggerThreadState, 500) \ \ _(TraceLoggerGraphState, 600)