1 # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
2 # vim: set filetype=python:
3 # This Source Code Form is subject to the terms of the Mozilla Public
4 # License, v. 2.0. If a copy of the MPL was not distributed with this
5 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 # This is pretty much a copy from tools/profiler, cut down to exclude anything
8 # that cannot work in mozglue (because they are totally dependent on libxul-
10 # All exported headers now prefixed with "Base" to avoid #include name clashes.
12 if CONFIG["MOZ_GECKO_PROFILER"]:
13 DEFINES["IMPL_MFBT"] = True
15 "public/BaseProfilerSharedLibraries.h",
16 "public/BaseProfilingStack.h",
19 "core/PageInformation.cpp",
21 "core/ProfileBuffer.cpp",
22 "core/ProfileBufferEntry.cpp",
23 "core/ProfiledThreadData.cpp",
24 "core/ProfileJSONWriter.cpp",
25 "core/ProfilerBacktrace.cpp",
26 "core/ProfilerMarkers.cpp",
27 "core/ProfilingCategory.cpp",
28 "core/ProfilingStack.cpp",
29 "core/RegisteredThread.cpp",
32 if CONFIG["OS_TARGET"] in ("Android", "Linux", "FreeBSD"):
33 if CONFIG["CPU_ARCH"] in ("arm", "aarch64", "x86", "x86_64", "mips64"):
35 "lul/AutoObjectMapper.cpp",
38 "lul/LulDwarfSummariser.cpp",
41 "lul/platform-linux-lul.cpp",
43 # These files cannot be built in unified mode because of name clashes with mozglue headers on Android.
45 "core/shared-libraries-linux.cc",
47 if CONFIG["CPU_ARCH"] == "arm" and CONFIG["OS_TARGET"] != "FreeBSD":
49 "core/EHABIStackWalk.cpp",
51 elif CONFIG["OS_TARGET"] == "Darwin":
53 "core/shared-libraries-macos.cc",
55 elif CONFIG["OS_TARGET"] == "WINNT":
57 "core/shared-libraries-win32.cc",
61 "/mozglue/baseprofiler/core/",
65 if CONFIG["OS_TARGET"] == "Android":
66 DEFINES["ANDROID_NDK_MAJOR_VERSION"] = CONFIG["ANDROID_NDK_MAJOR_VERSION"]
67 DEFINES["ANDROID_NDK_MINOR_VERSION"] = CONFIG["ANDROID_NDK_MINOR_VERSION"]
70 "public/ProfilingCategoryList.h",
71 script="build/generate_profiling_categories.py",
72 entry_point="generate_macro_header",
73 inputs=["build/profiling_categories.yaml"],
77 "!public/ProfilingCategoryList.h",
78 "public/BaseProfiler.h",
79 "public/BaseProfilingCategory.h",
83 "public/BaseAndGeckoProfilerDetail.h",
84 "public/BaseProfileJSONWriter.h",
85 "public/BaseProfilerCounts.h",
86 "public/BaseProfilerDetail.h",
87 "public/BaseProfilerLabels.h",
88 "public/BaseProfilerMarkers.h",
89 "public/BaseProfilerMarkersDetail.h",
90 "public/BaseProfilerMarkersPrerequisites.h",
91 "public/BaseProfilerMarkerTypes.h",
92 "public/BaseProfilerRAIIMacro.h",
93 "public/BaseProfilerState.h",
94 "public/BaseProfilerUtils.h",
95 "public/BlocksRingBuffer.h",
96 "public/FailureLatch.h",
97 "public/leb128iterator.h",
98 "public/ModuloBuffer.h",
99 "public/PowerOfTwo.h",
100 "public/ProfileBufferChunk.h",
101 "public/ProfileBufferChunkManager.h",
102 "public/ProfileBufferChunkManagerSingle.h",
103 "public/ProfileBufferChunkManagerWithLocalLimit.h",
104 "public/ProfileBufferControlledChunkManager.h",
105 "public/ProfileBufferEntryKinds.h",
106 "public/ProfileBufferEntrySerialization.h",
107 "public/ProfileBufferIndex.h",
108 "public/ProfileChunkedBuffer.h",
109 "public/ProfileChunkedBufferDetail.h",
110 "public/ProgressLogger.h",
111 "public/ProportionValue.h",
115 "core/BaseAndGeckoProfilerDetail.cpp",
116 "core/ProfilerUtils.cpp",
119 if CONFIG["MOZ_VTUNE"]:
120 DEFINES["MOZ_VTUNE_INSTRUMENTATION"] = True
122 "core/VTuneProfiler.cpp",
125 FINAL_LIBRARY = "mozglue"
127 if CONFIG["CC_TYPE"] in ("clang", "gcc"):
129 "-Wno-ignored-qualifiers", # due to use of breakpad headers
133 BUG_COMPONENT = ("Core", "Gecko Profiler")