Bug 1715844 - Fixed non-MOZ_GECKO_PROFILER build of MicroGeckoProfiler - r=canaltinova

Differential Revision: https://phabricator.services.mozilla.com/D117493
This commit is contained in:
Gerald Squelart 2021-06-11 08:43:42 +00:00
Родитель 78f4bb0d4d
Коммит c953f2a74f
2 изменённых файлов: 10 добавлений и 2 удалений

Просмотреть файл

@ -7,13 +7,20 @@
using namespace mozilla;
void uprofiler_register_thread(const char* name, void* stacktop) {
#ifdef MOZ_GECKO_PROFILER
profiler_register_thread(name, stacktop);
#endif // MOZ_GECKO_PROFILER
}
void uprofiler_unregister_thread() { profiler_unregister_thread(); }
void uprofiler_unregister_thread() {
#ifdef MOZ_GECKO_PROFILER
profiler_unregister_thread();
#endif // MOZ_GECKO_PROFILER
}
// The category string will be handled later in Bug 1715047
void uprofiler_simple_event_marker(const char* name, const char*, char phase) {
#ifdef MOZ_GECKO_PROFILER
switch (phase) {
case 'B':
profiler_add_marker(ProfilerString8View::WrapNullTerminatedString(name),
@ -36,4 +43,5 @@ void uprofiler_simple_event_marker(const char* name, const char*, char phase) {
}
break;
}
#endif // MOZ_GECKO_PROFILER
}

Просмотреть файл

@ -19,7 +19,6 @@ if CONFIG["MOZ_GECKO_PROFILER"]:
"public/shared-libraries.h",
]
UNIFIED_SOURCES += [
"core/MicroGeckoProfiler.cpp",
"core/PageInformation.cpp",
"core/platform.cpp",
"core/ProfileBuffer.cpp",
@ -127,6 +126,7 @@ if CONFIG["MOZ_GECKO_PROFILER"]:
]
UNIFIED_SOURCES += [
"core/MicroGeckoProfiler.cpp",
"core/ProfilerBindings.cpp",
]