Files
alexical 908042a0d2 Bug 2005954 - Create Collector Log Analyzer UI in about:memory r=smaug,mccr8,desktop-theme-reviewers,frontend-codestyle-reviewers,mossop,emilio
This patch covers the frontend and backend of a CC/GC log analyzer tool.
Let me know if you'd like me to split this patch into smaller pieces, but
it's all interrelated enough that it felt right to put it into one. In either
case I would recommend pulling the patch and playing with the UI on some heavy
CC/GC logs if you have time.

Differential Revision: https://phabricator.services.mozilla.com/D282529
2026-09-04 00:28:43 +00:00

332 lines
7.8 KiB
INI

# 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/.
XPIDL_SOURCES += [
"nsIAvailableMemoryWatcherBase.idl",
"nsIConsoleListener.idl",
"nsIConsoleMessage.idl",
"nsIConsoleService.idl",
"nsICycleCollectorListener.idl",
"nsIDebug2.idl",
"nsIException.idl",
"nsIInterfaceRequestor.idl",
"nsIKeyedUUIDMapper.idl",
"nsIMemoryInfoDumper.idl",
"nsIMemoryReporter.idl",
"nsISecurityConsoleMessage.idl",
"nsISupports.idl",
"nsIUUIDGenerator.idl",
"nsIVersionComparator.idl",
"nsIWeakReference.idl",
"nsrootidl.idl",
]
if CONFIG["OS_TARGET"] == "Linux":
XPIDL_SOURCES += [
"nsIAvailableMemoryWatcherTestingLinux.idl",
]
EXPORTS += [
"nsIPSIProvider.h",
]
if CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa":
XPIDL_SOURCES += [
"nsIMacPreferencesReader.idl",
]
EXPORTS.mozilla += [
"MacHelpers.h",
"nsMacPreferencesReader.h",
"nsMacUtilsImpl.h",
]
UNIFIED_SOURCES += [
"MacHelpers.mm",
"nsMacPreferencesReader.mm",
]
if CONFIG["OS_ARCH"] == "Darwin":
EXPORTS += [
"CFTypeRefPtr.h",
"nsObjCExceptions.h",
]
EXPORTS.mozilla += [
"DarwinObjectPtr.h",
"MacStringHelpers.h",
]
UNIFIED_SOURCES += [
"MacStringHelpers.mm",
"nsObjCExceptions.mm",
]
XPIDL_MODULE = "xpcom_base"
XPCOM_MANIFESTS += [
"components.conf",
]
EXPORTS += [
"!ErrorList.h",
"!ErrorNamesInternal.h",
"!extra_xpc_msg.h",
"CodeAddressService.h",
"nsAlgorithm.h",
"nsAutoRef.h",
"nsCom.h",
"nsCOMPtr.h",
"nscore.h",
"nsCRTGlue.h",
"nsCycleCollectionContainerParticipant.h",
"nsCycleCollectionNoteChild.h",
"nsCycleCollectionNoteRootCallback.h",
"nsCycleCollectionParticipant.h",
"nsCycleCollectionTraversalCallback.h",
"nsCycleCollector.h",
"nsDebug.h",
"nsDebugImpl.h",
"nsDumpUtils.h",
"nsError.h",
"nsGZFileWriter.h",
"nsIClassInfoImpl.h",
"nsID.h",
"nsIDUtils.h",
"nsIInterfaceRequestorUtils.h",
"nsINIParser.h",
"nsInterfaceRequestorAgg.h",
"nsISupportsImpl.h",
"nsISupportsUtils.h",
"nsIWeakReferenceUtils.h",
"nsMaybeWeakPtr.h",
"nsMemory.h",
"nsMemoryReporterManager.h",
"nsQueryObject.h",
"nsSystemInfo.h",
"nsTraceRefcnt.h",
"nsVersionComparator.h",
"nsWeakReference.h",
]
if CONFIG["OS_ARCH"] == "WINNT":
EXPORTS += [
"nsWindowsHelpers.h",
]
if CONFIG["CC_TYPE"] not in ("gcc", "clang"):
OS_LIBS += [
"wscapi",
]
EXPORTS.mozilla += [
"AppShutdown.h",
"AutoRestore.h",
"AvailableMemoryTracker.h",
"AvailableMemoryWatcher.h",
"ClearOnShutdown.h",
"CollectorLogAnalyzer.h",
"CollectorLogAnalyzerBackground.h",
"CountingAllocatorBase.h",
"CycleCollectedJSContext.h",
"CycleCollectedJSRuntime.h",
"CycleCollectorStats.h",
"Debug.h",
"DebuggerOnGCRunnable.h",
"DeferredFinalize.h",
"EnumeratedArrayCycleCollection.h",
"ErrorNames.h",
"GkRustUtils.h",
"HoldDropJSObjects.h",
"IntentionalCrash.h",
"JSObjectHolder.h",
"JSONStringWriteFuncs.h",
"Logging.h",
"MemoryInfo.h",
"MemoryMapping.h",
"MemoryReportingProcess.h",
"MemoryTelemetry.h",
"nsMemoryInfoDumper.h",
"NSPRLogModulesParser.h",
"OwningNonNull.h",
"RLBoxSandboxPool.h",
"RLBoxUtils.h",
"ShutdownPhase.h",
"SizeOfState.h",
"StaticLocalPtr.h",
"StaticMonitor.h",
"StaticMutex.h",
"StaticPtr.h",
]
SOURCES += [
# nsDebugImpl isn't unified because we disable PGO so that NS_ABORT_OOM isn't
# optimized away oddly.
"nsDebugImpl.cpp",
# nsDumpUtils.cpp includes SpecialSystemDirectory.h which includes
# nsLocalFileMac.h which upsets other files in this dir that have a different
# idea about what `TextRange` means.
"nsDumpUtils.cpp",
]
SOURCES["nsDebugImpl.cpp"].no_pgo = True
UNIFIED_SOURCES += [
"AppShutdown.cpp",
"AvailableMemoryTracker.cpp",
"AvailableMemoryWatcher.cpp",
"ClearOnShutdown.cpp",
"CollectorLogAnalyzer.cpp",
"CycleCollectedJSContext.cpp",
"CycleCollectedJSRuntime.cpp",
"CycleCollectorStats.cpp",
"Debug.cpp",
"DebuggerOnGCRunnable.cpp",
"DeferredFinalize.cpp",
"ErrorNames.cpp",
"GkRustUtils.cpp",
"HoldDropJSObjects.cpp",
"JSObjectHolder.cpp",
"KeyedUUIDMapper.cpp",
"LogCommandLineHandler.cpp",
"Logging.cpp",
"LogModulePrefWatcher.cpp",
"MemoryTelemetry.cpp",
"nsClassInfoImpl.cpp",
"nsCOMPtr.cpp",
"nsConsoleMessage.cpp",
"nsConsoleService.cpp",
"nsCRTGlue.cpp",
"nsCycleCollectionParticipant.cpp",
"nsCycleCollector.cpp",
"nsCycleCollectorTraceJSHelpers.cpp",
"nsGZFileWriter.cpp",
"nsID.cpp",
"nsIInterfaceRequestorUtils.cpp",
"nsINIParser.cpp",
"nsInterfaceRequestorAgg.cpp",
"nsISupportsImpl.cpp",
"nsMemoryImpl.cpp",
"nsMemoryInfoDumper.cpp",
"nsMemoryReporterManager.cpp",
"NSPRLogModulesParser.cpp",
"nsSecurityConsoleMessage.cpp",
"nsSystemInfo.cpp",
"nsTraceRefcnt.cpp",
"nsUUIDGenerator.cpp",
"nsVersionComparator.cpp",
"nsVersionComparatorImpl.cpp",
"nsWeakReference.cpp",
"RLBoxSandboxPool.cpp",
]
if CONFIG["OS_TARGET"] in ("Linux", "Android"):
UNIFIED_SOURCES += [
"MemoryMapping.cpp",
]
if CONFIG["OS_TARGET"] == "WINNT":
UNIFIED_SOURCES += [
"AvailableMemoryWatcherWin.cpp",
"MemoryInfo.cpp",
]
if CONFIG["OS_TARGET"] == "Darwin":
UNIFIED_SOURCES += [
"AvailableMemoryWatcherMac.cpp",
]
EXPORTS.mozilla += [
"MemoryPressureLevelMac.h",
]
if CONFIG["OS_TARGET"] == "Linux":
UNIFIED_SOURCES += [
"AvailableMemoryWatcherLinux.cpp",
]
EXPORTS.mozilla += [
"AvailableMemoryWatcherUtils.h",
]
if CONFIG["MOZ_PHC"]:
DEFINES["MOZ_PHC"] = True
extra_errors = []
if CONFIG["MOZ_EXTRA_ERROR_DEFINITIONS"]:
extra_errors.append(CONFIG["MOZ_EXTRA_ERROR_DEFINITIONS"])
GeneratedFile(
"ErrorList.h",
script="ErrorList.py",
entry_point="error_list_h",
inputs=extra_errors,
)
GeneratedFile(
"ErrorNamesInternal.h",
script="ErrorList.py",
entry_point="error_names_internal_h",
inputs=extra_errors,
)
GeneratedFile(
"error_list.rs",
script="ErrorList.py",
entry_point="error_list_rs",
inputs=extra_errors,
)
GeneratedFile(
"error_list.json",
script="ErrorList.py",
entry_point="error_list_json",
inputs=extra_errors,
)
GeneratedFile(
"extra_xpc_msg.h",
script="ErrorList.py",
entry_point="extra_xpc_msg",
inputs=extra_errors,
)
if CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa":
SOURCES += [
"nsMacUtilsImpl.cpp",
]
elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "windows":
SOURCES += [
"nsCrashOnException.cpp",
]
if CONFIG["COMPILE_ENVIRONMENT"]:
EXPORTS.mozilla += [
"!gk_rust_utils_ffi_generated.h",
]
CbindgenHeader("gk_rust_utils_ffi_generated.h", inputs=["/xpcom/rust/gkrust_utils"])
include("/ipc/chromium/chromium-config.mozbuild")
FINAL_LIBRARY = "xul"
LOCAL_INCLUDES += [
"../build",
"/mfbt",
"/netwerk/base",
"/xpcom/ds",
]
if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
CXXFLAGS += CONFIG["MOZ_GTK3_CFLAGS"]
if CONFIG["MOZ_PHC"]:
EXPORTS.mozilla += [
"PHCManager.h",
]
DEFINES["MOZ_PHC"] = 1
UNIFIED_SOURCES += ["PHCManager.cpp"]
with Files("nsCycleCollect*"):
BUG_COMPONENT = ("Core", "Cycle Collector")
with Files("*CycleCollector*"):
BUG_COMPONENT = ("Core", "Cycle Collector")
with Files("PHCManager.*"):
BUG_COMPONENT = ("Core", "Memory Allocator")
with Files("*KeyedUUIDMapper*"):
BUG_COMPONENT = ("WebExtensions", "General")