Currently the Gecko Profiler defines a moderate amount of stuff when MOZ_GECKO_PROFILER is undefined. It also #includes various headers, including JS ones. This is making it difficult to separate Gecko's media stack for inclusion in Servo. This patch greatly simplifies how things are exposed. The starting point is: - GeckoProfiler.h can be #included unconditionally; - everything else from the profiler must be guarded by MOZ_GECKO_PROFILER. In practice this introduces way too many #ifdefs, so the patch loosens it by adding no-op macros for a number of the most common operations. The net result is that #ifdefs and macros are used a bit more, but almost nothing is exposed in non-MOZ_GECKO_PROFILER builds (including ProfilerMarkerPayload.h and GeckoProfiler.h), and understanding what is exposed is much simpler than before. Note also that in BHR, ThreadStackHelper is now entirely absent in non-MOZ_GECKO_PROFILER builds.
56 lines
1.4 KiB
Python
56 lines
1.4 KiB
Python
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
|
|
# vim: set filetype=python:
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
# NOTE: These config options must match the ones in both android/'s and
|
|
# browser/'s package-manifest.in.
|
|
|
|
# BHR disabled outside of Nightly builds due to expected high ping frequency.
|
|
# BHR disabled for Release builds because of bug 965392.
|
|
# BHR disabled for debug builds because of bug 979069.
|
|
# BHR disabled for TSan builds because of bug 1121216.
|
|
if CONFIG['NIGHTLY_BUILD'] and \
|
|
not CONFIG['MOZ_DEBUG'] and \
|
|
not CONFIG['MOZ_TSAN']:
|
|
DEFINES['MOZ_ENABLE_BACKGROUND_HANG_MONITOR'] = 1
|
|
|
|
EXTRA_COMPONENTS += [
|
|
'BHRTelemetryService.js',
|
|
'BHRTelemetryService.manifest',
|
|
]
|
|
|
|
XPCSHELL_TESTS_MANIFESTS += ['tests/xpcshell.ini']
|
|
|
|
XPIDL_SOURCES += [
|
|
'nsIHangDetails.idl',
|
|
]
|
|
|
|
XPIDL_MODULE = 'backgroundhangmonitor'
|
|
|
|
EXPORTS.mozilla += [
|
|
'BackgroundHangMonitor.h',
|
|
'HangDetails.h',
|
|
'HangStack.h',
|
|
]
|
|
|
|
UNIFIED_SOURCES += [
|
|
'BackgroundHangMonitor.cpp',
|
|
'HangDetails.cpp',
|
|
'HangStack.cpp',
|
|
]
|
|
|
|
if CONFIG['MOZ_GECKO_PROFILER']:
|
|
UNIFIED_SOURCES += [
|
|
'ThreadStackHelper.cpp',
|
|
]
|
|
|
|
LOCAL_INCLUDES += [
|
|
'/caps', # For nsScriptSecurityManager.h
|
|
]
|
|
|
|
FINAL_LIBRARY = 'xul'
|
|
|
|
include('/ipc/chromium/chromium-config.mozbuild')
|