diff --git a/mozglue/baseprofiler/core/platform.cpp b/mozglue/baseprofiler/core/platform.cpp index b0f849214bfd..033b217df3fa 100644 --- a/mozglue/baseprofiler/core/platform.cpp +++ b/mozglue/baseprofiler/core/platform.cpp @@ -92,10 +92,11 @@ # define USE_MOZ_STACK_WALK #endif -// Mac builds only have frame pointers when MOZ_PROFILING is specified, so -// FramePointerStackWalk() only works in that case. We don't use MozStackWalk() -// on Mac. -#if defined(GP_OS_darwin) && defined(MOZ_PROFILING) +// Mac builds use FramePointerStackWalk(). Even if we build without +// frame pointers, we'll still get useful stacks in system libraries +// because those always have frame pointers. +// We don't use MozStackWalk() on Mac. +#if defined(GP_OS_darwin) # define HAVE_NATIVE_UNWIND # define USE_FRAME_POINTER_STACK_WALK #endif diff --git a/tools/profiler/core/platform.cpp b/tools/profiler/core/platform.cpp index 6ccacd6e1c5e..352a5c1dbd6d 100644 --- a/tools/profiler/core/platform.cpp +++ b/tools/profiler/core/platform.cpp @@ -126,10 +126,11 @@ # define USE_MOZ_STACK_WALK #endif -// Mac builds only have frame pointers when MOZ_PROFILING is specified, so -// FramePointerStackWalk() only works in that case. We don't use MozStackWalk() -// on Mac. -#if defined(GP_OS_darwin) && defined(MOZ_PROFILING) +// Mac builds use FramePointerStackWalk(). Even if we build without +// frame pointers, we'll still get useful stacks in system libraries +// because those always have frame pointers. +// We don't use MozStackWalk() on Mac. +#if defined(GP_OS_darwin) # define HAVE_NATIVE_UNWIND # define USE_FRAME_POINTER_STACK_WALK #endif