Bug 1791900 - Change cubeb vendoring manifest, swapping out cubeb_tracing.h with something that uses MicroGeckoProfiler.h. r=cubeb-reviewers,kinetik

Differential Revision: https://phabricator.services.mozilla.com/D157879
This commit is contained in:
Paul Adenot 2022-09-30 00:23:13 +00:00
Родитель 74ba168395
Коммит 0c5ec11141
3 изменённых файлов: 19 добавлений и 12 удалений

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

@ -34,6 +34,7 @@ vendoring:
- src/cubeb_kai.c
- src/cubeb_osx_run_loop.cpp
- src/cubeb_pulse.c
- src/cubeb_tracing.h
- subprojects
- tools
keep:
@ -44,5 +45,6 @@ vendoring:
- src/cubeb-jni-instances.h
- src/cubeb_assert.h
- src/cubeb_osx_run_loop.c
- src/cubeb_tracing.h
- src/moz.build

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

@ -1,23 +1,27 @@
/*
* Copyright © 2022 Mozilla Foundation
*
* This program is made available under an ISC-style license. See the
* accompanying file LICENSE for details.
*/
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* 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/. */
#ifndef CUBEB_TRACING_H
#define CUBEB_TRACING_H
/* Empty header to allow hooking up a frame profiler. */
#include <MicroGeckoProfiler.h>
#define CUBEB_REGISTER_THREAD(name) \
do { \
char stacktop; \
uprofiler_register_thread(name, &stacktop); \
} while (0)
#define CUBEB_UNREGISTER_THREAD() uprofiler_unregister_thread()
// To be called once on a thread to register for tracing.
#define CUBEB_REGISTER_THREAD(name)
// To be called once before a registered threads exits.
#define CUBEB_UNREGISTER_THREAD()
// Insert a tracing marker, with a particular name.
// Phase can be 'x': instant marker, start time but no duration
// 'b': beginning of a marker with a duration
// 'e': end of a marker with a duration
#define CUBEB_TRACE(name, phase)
#define CUBEB_TRACE(name, phase) \
uprofiler_simple_event_marker(name, phase, 0, NULL, NULL, NULL)
#endif // CUBEB_TRACING_H

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

@ -151,6 +151,7 @@ include("/ipc/chromium/chromium-config.mozbuild")
EXPORTS += [
"public/ChildProfilerController.h",
"public/GeckoProfiler.h",
"public/MicroGeckoProfiler.h",
"public/ProfilerBindings.h",
"public/ProfilerControl.h",
"public/ProfilerParent.h",