From 02c01eae8664f8be2263e49cccfe9e51e80f852b Mon Sep 17 00:00:00 2001 From: Alexandre Lissy Date: Tue, 18 Jun 2024 05:13:48 +0000 Subject: [PATCH] Bug 1903080 - Remove useless include r=padenot,profiler-reviewers,canaltinova Differential Revision: https://phabricator.services.mozilla.com/D213993 --- tools/profiler/core/MicroGeckoProfiler.cpp | 6 ++++++ tools/profiler/public/ProfilerStackWalk.h | 1 - 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/profiler/core/MicroGeckoProfiler.cpp b/tools/profiler/core/MicroGeckoProfiler.cpp index ee79175a1b66..7cf12fa67ce2 100644 --- a/tools/profiler/core/MicroGeckoProfiler.cpp +++ b/tools/profiler/core/MicroGeckoProfiler.cpp @@ -292,12 +292,18 @@ void uprofiler_simple_event_marker(const char* name, const char category, } bool uprofiler_backtrace_into_buffer(NativeStack* aNativeStack, void* aBuffer) { +#if defined(MOZ_GECKO_PROFILER) return profiler_backtrace_into_buffer( *(static_cast(aBuffer)), *aNativeStack); +#else + return false; +#endif } void uprofiler_native_backtrace(const void* top, NativeStack* nativeStack) { +#if defined(MOZ_GECKO_PROFILER) DoNativeBacktraceDirect(top, *nativeStack, nullptr); +#endif } bool uprofiler_is_active() { return profiler_is_active(); } diff --git a/tools/profiler/public/ProfilerStackWalk.h b/tools/profiler/public/ProfilerStackWalk.h index 6eac52be3438..6d3488e7b789 100644 --- a/tools/profiler/public/ProfilerStackWalk.h +++ b/tools/profiler/public/ProfilerStackWalk.h @@ -16,7 +16,6 @@ #ifndef ProfilerStackWalk_h #define ProfilerStackWalk_h -#include "PlatformMacros.h" #include "ProfilerNativeStack.h" #include "mozilla/ProfileChunkedBuffer.h"