Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/mozglue/baseprofiler/   (Firefox Browser Version 153.0.1©)  Datei vom 27.6.2026 mit Größe 4 kB image not shown  

Quelle  moz.build   Sprache: unbekannt

 
Spracherkennung für: .build vermutete Sprache: Unknown {[0] [0] [0]} [Methode: Schwerpunktbildung, einfache Gewichte, sechs Dimensionen]

# 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/.

# This is pretty much a copy from tools/profiler, cut down to exclude anything
# that cannot work in mozglue (because they are totally dependent on libxul-
# specific code).
# All exported headers now prefixed with "Base" to avoid #include name clashes.


if not CONFIG["JS_STANDALONE"]:
    DEFINES["IMPL_MFBT"] = True
    EXPORTS += [
        "public/BaseProfilingStack.h",
    ]
    UNIFIED_SOURCES += [
        "core/PageInformation.cpp",
        "core/platform.cpp",
        "core/ProfileBuffer.cpp",
        "core/ProfileBufferEntry.cpp",
        "core/ProfiledThreadData.cpp",
        "core/ProfileJSONWriter.cpp",
        "core/ProfilerBacktrace.cpp",
        "core/ProfilerMarkers.cpp",
        "core/ProfilingCategory.cpp",
        "core/ProfilingStack.cpp",
        "core/RegisteredThread.cpp",
    ]

    # Keep in sync with ProfilerPlatformMacros.h
    if (
        (
            CONFIG["OS_TARGET"] == "Android"
            and CONFIG["TARGET_CPU"] in ("aarch64", "arm", "x86", "x86_64")
        )
        or (
            CONFIG["OS_TARGET"] == "Linux"
            and CONFIG["TARGET_CPU"] in ("aarch64", "arm", "x86", "x86_64", "mips64")
        )
        or (
            CONFIG["OS_TARGET"] == "FreeBSD"
            and CONFIG["TARGET_CPU"] in ("aarch64", "x86_64")
        )
    ):
        # These files cannot be built in unified mode because of name clashes with mozglue headers on Android.
        SOURCES += [
            "core/shared-libraries-linux.cc",
        ]
        if CONFIG["TARGET_CPU"] == "arm":
            SOURCES += [
                "core/EHABIStackWalk.cpp",
            ]
    elif CONFIG["OS_TARGET"] == "Darwin" and CONFIG["TARGET_CPU"] in (
        "aarch64",
        "x86_64",
    ):
        UNIFIED_SOURCES += [
            "core/shared-libraries-macos.cc",
        ]
    elif CONFIG["OS_TARGET"] == "WINNT" and CONFIG["TARGET_CPU"] in (
        "aarch64",
        "x86",
        "x86_64",
    ):
        SOURCES += [
            "core/shared-libraries-win32.cc",
        ]
    else:
        SOURCES += [
            "core/shared-libraries-noop.cc",
        ]

    LOCAL_INCLUDES += [
        "/mozglue/baseprofiler/core/",
        "/mozglue/linker",
    ]

    if CONFIG["OS_TARGET"] == "Android":
        DEFINES["ANDROID_NDK_MAJOR_VERSION"] = CONFIG["ANDROID_NDK_MAJOR_VERSION"]
        DEFINES["ANDROID_NDK_MINOR_VERSION"] = CONFIG["ANDROID_NDK_MINOR_VERSION"]

GeneratedFile(
    "public/ProfilingCategoryList.h",
    script="build/generate_profiling_categories.py",
    entry_point="generate_macro_header",
    inputs=["build/profiling_categories.yaml"],
)

EXPORTS.mozilla += [
    "!public/ProfilingCategoryList.h",
    "public/BaseAndGeckoProfilerDetail.h",
    "public/BaseProfileJSONWriter.h",
    "public/BaseProfiler.h",
    "public/BaseProfilerCounts.h",
    "public/BaseProfilerDetail.h",
    "public/BaseProfilerLabels.h",
    "public/BaseProfilerMarkers.h",
    "public/BaseProfilerMarkersDetail.h",
    "public/BaseProfilerMarkersPrerequisites.h",
    "public/BaseProfilerMarkerTypes.h",
    "public/BaseProfilerRAIIMacro.h",
    "public/BaseProfilerState.h",
    "public/BaseProfilerUtils.h",
    "public/BaseProfilingCategory.h",
    "public/FailureLatch.h",
    "public/Flow.h",
    "public/leb128iterator.h",
    "public/ModuloBuffer.h",
    "public/PowerOfTwo.h",
    "public/ProfileBufferChunk.h",
    "public/ProfileBufferChunkManager.h",
    "public/ProfileBufferChunkManagerSingle.h",
    "public/ProfileBufferChunkManagerWithLocalLimit.h",
    "public/ProfileBufferControlledChunkManager.h",
    "public/ProfileBufferEntryKinds.h",
    "public/ProfileBufferEntrySerialization.h",
    "public/ProfileBufferIndex.h",
    "public/ProfileChunkedBuffer.h",
    "public/ProfileChunkedBufferDetail.h",
    "public/ProfilerBufferSize.h",
    "public/ProfilerPlatformMacros.h",
    "public/ProgressLogger.h",
    "public/ProportionValue.h",
    "public/SharedLibraries.h",
]

UNIFIED_SOURCES += [
    "core/BaseAndGeckoProfilerDetail.cpp",
    "core/Flow.cpp",
    "core/ProfilerUtils.cpp",
]

if CONFIG["MOZ_VTUNE"]:
    DEFINES["MOZ_VTUNE_INSTRUMENTATION"] = True
    UNIFIED_SOURCES += [
        "core/VTuneProfiler.cpp",
    ]

FINAL_LIBRARY = "mozglue"

if CONFIG["CC_TYPE"] in ("clang", "gcc"):
    CXXFLAGS += [
        "-Wno-ignored-qualifiers",  # due to use of breakpad headers
    ]

with Files("**"):
    BUG_COMPONENT = ("Core", "Gecko Profiler")

[Dauer der Verarbeitung: 0.41 Sekunden]