Skip to content

Commit

Permalink
Bug 1634784 - Remove MOZ_BASE_PROFILER and replace it with MOZ_GECKO_…
Browse files Browse the repository at this point in the history
…PROFILER everywhere. r=gerald

Differential Revision: https://phabricator.services.mozilla.com/D73526
  • Loading branch information
mstange committed May 5, 2020
1 parent 1bb0550 commit 6725e6d
Show file tree
Hide file tree
Showing 38 changed files with 83 additions and 155 deletions.
2 changes: 1 addition & 1 deletion mozglue/android/APKOpen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ static void EnsureBaseProfilerInitialized() {
return;
}

#ifdef MOZ_BASE_PROFILER
#ifdef MOZ_GECKO_PROFILER
// The stack depth we observe here will be determined by the stack of
// whichever caller enters this code first. In practice this means that we may
// miss some root-most frames, which hopefully shouldn't ruin profiling.
Expand Down
4 changes: 2 additions & 2 deletions mozglue/baseprofiler/core/EHABIStackWalk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

#include "BaseProfiler.h"

#ifdef MOZ_BASE_PROFILER
#ifdef MOZ_GECKO_PROFILER

# include "EHABIStackWalk.h"

Expand Down Expand Up @@ -645,4 +645,4 @@ EHState::EHState(const mcontext_t& context) {
} // namespace baseprofiler
} // namespace mozilla

#endif // MOZ_BASE_PROFILER
#endif // MOZ_GECKO_PROFILER
4 changes: 2 additions & 2 deletions mozglue/baseprofiler/core/PageInformation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include "BaseProfiler.h"

#ifdef MOZ_BASE_PROFILER
#ifdef MOZ_GECKO_PROFILER

# include "PageInformation.h"

Expand Down Expand Up @@ -51,4 +51,4 @@ size_t PageInformation::SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const {
} // namespace baseprofiler
} // namespace mozilla

#endif // MOZ_BASE_PROFILER
#endif // MOZ_GECKO_PROFILER
4 changes: 2 additions & 2 deletions mozglue/baseprofiler/core/ProfileBuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include "BaseProfiler.h"

#ifdef MOZ_BASE_PROFILER
#ifdef MOZ_GECKO_PROFILER

# include "ProfileBuffer.h"

Expand Down Expand Up @@ -208,4 +208,4 @@ void ProfileBufferCollector::CollectProfilingStackFrame(
} // namespace baseprofiler
} // namespace mozilla

#endif // MOZ_BASE_PROFILER
#endif // MOZ_GECKO_PROFILER
4 changes: 2 additions & 2 deletions mozglue/baseprofiler/core/ProfileBufferEntry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include "BaseProfiler.h"

#ifdef MOZ_BASE_PROFILER
#ifdef MOZ_GECKO_PROFILER

# include "ProfileBufferEntry.h"

Expand Down Expand Up @@ -1377,4 +1377,4 @@ void ProfileBuffer::DiscardSamplesBeforeTime(double aTime) {
} // namespace baseprofiler
} // namespace mozilla

#endif // MOZ_BASE_PROFILER
#endif // MOZ_GECKO_PROFILER
4 changes: 2 additions & 2 deletions mozglue/baseprofiler/core/ProfileJSONWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

#include "BaseProfiler.h"

#ifdef MOZ_BASE_PROFILER
#ifdef MOZ_GECKO_PROFILER

# include "BaseProfileJSONWriter.h"

Expand Down Expand Up @@ -129,4 +129,4 @@ void SpliceableChunkedJSONWriter::TakeAndSplice(ChunkedJSONWriteFunc* aFunc) {
} // namespace baseprofiler
} // namespace mozilla

#endif // MOZ_BASE_PROFILER
#endif // MOZ_GECKO_PROFILER
4 changes: 2 additions & 2 deletions mozglue/baseprofiler/core/ProfiledThreadData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include "BaseProfiler.h"

#ifdef MOZ_BASE_PROFILER
#ifdef MOZ_GECKO_PROFILER

# include "ProfiledThreadData.h"

Expand Down Expand Up @@ -171,4 +171,4 @@ void StreamSamplesAndMarkers(const char* aName, int aThreadId,
} // namespace baseprofiler
} // namespace mozilla

#endif // MOZ_BASE_PROFILER
#endif // MOZ_GECKO_PROFILER
4 changes: 2 additions & 2 deletions mozglue/baseprofiler/core/ProfilerBacktrace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include "BaseProfiler.h"

#ifdef MOZ_BASE_PROFILER
#ifdef MOZ_GECKO_PROFILER

# include "ProfilerBacktrace.h"

Expand Down Expand Up @@ -80,4 +80,4 @@ ProfileBufferEntryReader::

} // namespace mozilla

#endif // MOZ_BASE_PROFILER
#endif // MOZ_GECKO_PROFILER
4 changes: 2 additions & 2 deletions mozglue/baseprofiler/core/ProfilerMarkerPayload.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

#include "BaseProfiler.h"

#ifdef MOZ_BASE_PROFILER
#ifdef MOZ_GECKO_PROFILER

# include "BaseProfilerMarkerPayload.h"

Expand Down Expand Up @@ -543,4 +543,4 @@ void LongTaskMarkerPayload::StreamPayload(SpliceableJSONWriter& aWriter,
} // namespace baseprofiler
} // namespace mozilla

#endif // MOZ_BASE_PROFILER
#endif // MOZ_GECKO_PROFILER
4 changes: 2 additions & 2 deletions mozglue/baseprofiler/core/ProfilingCategory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include "BaseProfiler.h"

#ifdef MOZ_BASE_PROFILER
#ifdef MOZ_GECKO_PROFILER

# include "BaseProfilingCategory.h"

Expand Down Expand Up @@ -72,4 +72,4 @@ const ProfilingCategoryPairInfo& GetProfilingCategoryPairInfo(
} // namespace baseprofiler
} // namespace mozilla

#endif // MOZ_BASE_PROFILER
#endif // MOZ_GECKO_PROFILER
4 changes: 2 additions & 2 deletions mozglue/baseprofiler/core/ProfilingStack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include "BaseProfiler.h"

#ifdef MOZ_BASE_PROFILER
#ifdef MOZ_GECKO_PROFILER

# include "BaseProfilingStack.h"

Expand Down Expand Up @@ -53,4 +53,4 @@ void ProfilingStack::ensureCapacitySlow() {
} // namespace baseprofiler
} // namespace mozilla

#endif // MOZ_BASE_PROFILER
#endif // MOZ_GECKO_PROFILER
4 changes: 2 additions & 2 deletions mozglue/baseprofiler/core/RegisteredThread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include "BaseProfiler.h"

#ifdef MOZ_BASE_PROFILER
#ifdef MOZ_GECKO_PROFILER

# include "RegisteredThread.h"

Expand Down Expand Up @@ -44,4 +44,4 @@ size_t RegisteredThread::SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const {
} // namespace baseprofiler
} // namespace mozilla

#endif // MOZ_BASE_PROFILER
#endif // MOZ_GECKO_PROFILER
4 changes: 2 additions & 2 deletions mozglue/baseprofiler/core/VTuneProfiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include "BaseProfiler.h"

#ifdef MOZ_BASE_PROFILER
#ifdef MOZ_GECKO_PROFILER

# ifdef XP_WIN
# undef UNICODE
Expand Down Expand Up @@ -93,4 +93,4 @@ void VTuneProfiler::RegisterThreadInternal(const char* aName) {
} // namespace baseprofiler
} // namespace mozilla

#endif // MOZ_BASE_PROFILER
#endif // MOZ_GECKO_PROFILER
4 changes: 2 additions & 2 deletions mozglue/baseprofiler/core/platform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

#include "BaseProfiler.h"

#ifdef MOZ_BASE_PROFILER
#ifdef MOZ_GECKO_PROFILER

# include "platform.h"

Expand Down Expand Up @@ -3584,4 +3584,4 @@ void profiler_suspend_and_sample_thread(int aThreadId, uint32_t aFeatures,
} // namespace baseprofiler
} // namespace mozilla

#endif // MOZ_BASE_PROFILER
#endif // MOZ_GECKO_PROFILER
4 changes: 2 additions & 2 deletions mozglue/baseprofiler/core/shared-libraries-linux.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include "BaseProfiler.h"

#ifdef MOZ_BASE_PROFILER
#ifdef MOZ_GECKO_PROFILER

# include "BaseProfilerSharedLibraries.h"

Expand Down Expand Up @@ -850,4 +850,4 @@ SharedLibraryInfo SharedLibraryInfo::GetInfoForSelf() {
void SharedLibraryInfo::Initialize() { /* do nothing */
}

#endif // MOZ_BASE_PROFILER
#endif // MOZ_GECKO_PROFILER
4 changes: 2 additions & 2 deletions mozglue/baseprofiler/core/shared-libraries-macos.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

#include "BaseProfiler.h"

#ifdef MOZ_BASE_PROFILER
#ifdef MOZ_GECKO_PROFILER

# include "BaseProfilerSharedLibraries.h"

Expand Down Expand Up @@ -185,4 +185,4 @@ SharedLibraryInfo SharedLibraryInfo::GetInfoForSelf() {
return sharedLibraryInfo;
}

#endif // MOZ_BASE_PROFILER
#endif // MOZ_GECKO_PROFILER
4 changes: 2 additions & 2 deletions mozglue/baseprofiler/core/shared-libraries-win32.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

#include "BaseProfiler.h"

#ifdef MOZ_BASE_PROFILER
#ifdef MOZ_GECKO_PROFILER

# include <windows.h>
# include <dbghelp.h>
Expand Down Expand Up @@ -238,4 +238,4 @@ SharedLibraryInfo SharedLibraryInfo::GetInfoForSelf() {
void SharedLibraryInfo::Initialize() { /* do nothing */
}

#endif // MOZ_BASE_PROFILER
#endif // MOZ_GECKO_PROFILER
4 changes: 2 additions & 2 deletions mozglue/baseprofiler/lul/AutoObjectMapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include "BaseProfiler.h"

#ifdef MOZ_BASE_PROFILER
#ifdef MOZ_GECKO_PROFILER

# include <sys/mman.h>
# include <unistd.h>
Expand Down Expand Up @@ -153,4 +153,4 @@ bool AutoObjectMapperFaultyLib::Map(/*OUT*/ void** start,

# endif // defined(MOZ_LINKER)

#endif // MOZ_BASE_PROFILER
#endif // MOZ_GECKO_PROFILER
4 changes: 2 additions & 2 deletions mozglue/baseprofiler/lul/LulCommon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

#include "BaseProfiler.h"

#ifdef MOZ_BASE_PROFILER
#ifdef MOZ_GECKO_PROFILER

// There's no internal-only interface for LulCommon. Hence include
// the external interface directly.
Expand Down Expand Up @@ -103,4 +103,4 @@ const UniqueString* UniqueStringUniverse::ToUniqueString(string str) {

} // namespace lul

#endif // MOZ_BASE_PROFILER
#endif // MOZ_GECKO_PROFILER
4 changes: 2 additions & 2 deletions mozglue/baseprofiler/lul/LulDwarf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@

#include "BaseProfiler.h"

#ifdef MOZ_BASE_PROFILER
#ifdef MOZ_GECKO_PROFILER

# include <stdint.h>
# include <stdio.h>
Expand Down Expand Up @@ -2255,4 +2255,4 @@ void DwarfCFIToModule::Reporter::ExpressionCouldNotBeSummarised(

} // namespace lul

#endif // MOZ_BASE_PROFILER
#endif // MOZ_GECKO_PROFILER
4 changes: 2 additions & 2 deletions mozglue/baseprofiler/lul/LulDwarfSummariser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include "BaseProfiler.h"

#ifdef MOZ_BASE_PROFILER
#ifdef MOZ_GECKO_PROFILER

# include "LulDwarfSummariser.h"

Expand Down Expand Up @@ -556,4 +556,4 @@ void Summariser::End() {

} // namespace lul

#endif // MOZ_BASE_PROFILER
#endif // MOZ_GECKO_PROFILER
4 changes: 2 additions & 2 deletions mozglue/baseprofiler/lul/LulElf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@

#include "BaseProfiler.h"

#ifdef MOZ_BASE_PROFILER
#ifdef MOZ_GECKO_PROFILER

# include <errno.h>
# include <fcntl.h>
Expand Down Expand Up @@ -875,4 +875,4 @@ void FileID::ConvertIdentifierToString(const uint8_t identifier[kMDGUIDSize],

} // namespace lul

#endif // MOZ_BASE_PROFILER
#endif // MOZ_GECKO_PROFILER
4 changes: 2 additions & 2 deletions mozglue/baseprofiler/lul/LulMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include "BaseProfiler.h"

#ifdef MOZ_BASE_PROFILER
#ifdef MOZ_GECKO_PROFILER

# include "LulMain.h"

Expand Down Expand Up @@ -1959,4 +1959,4 @@ void RunLulUnitTests(/*OUT*/ int* aNTests, /*OUT*/ int* aNTestsPassed,

} // namespace lul

#endif // MOZ_BASE_PROFILER
#endif // MOZ_GECKO_PROFILER
4 changes: 2 additions & 2 deletions mozglue/baseprofiler/lul/platform-linux-lul.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

#include "BaseProfiler.h"

#ifdef MOZ_BASE_PROFILER
#ifdef MOZ_GECKO_PROFILER

# include <stdio.h>
# include <signal.h>
Expand Down Expand Up @@ -83,4 +83,4 @@ void logging_sink_for_LUL(const char* str) {
// VERBOSE_LOG("[%d] %s", profiler_current_process_id(), str);
}

#endif // MOZ_BASE_PROFILER
#endif // MOZ_GECKO_PROFILER
5 changes: 3 additions & 2 deletions mozglue/baseprofiler/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,9 @@ if CONFIG['MOZ_GECKO_PROFILER']:

FINAL_LIBRARY = 'mozglue'

# BaseProfiler.h and BaseProfilerCounts.h are the only headers that are usable
# in non-MOZ_GECKO_PROFILER builds, and they only contains no-op macros in that
# Many of the headers in this directory are usable in non-MOZ_GECKO_PROFILER
# builds.
# BaseProfiler.h and BaseProfilerCounts.h only contain no-op macros in that
# case.
EXPORTS += [
'public/BaseProfiler.h',
Expand Down
4 changes: 2 additions & 2 deletions mozglue/baseprofiler/public/BaseProfileJSONWriter.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

#include "BaseProfiler.h"

#ifndef MOZ_BASE_PROFILER
# error Do not #include this header when MOZ_BASE_PROFILER is not #defined.
#ifndef MOZ_GECKO_PROFILER
# error Do not #include this header when MOZ_GECKO_PROFILER is not #defined.
#endif

#include "mozilla/JSONWriter.h"
Expand Down
Loading

0 comments on commit 6725e6d

Please sign in to comment.