Bug 1653181 - Profiler feature 'audiocallbacktracing' controls Start/StopAudioCallbackTracing(), off by default - r=canaltinova

Differential Revision: https://phabricator.services.mozilla.com/D83749
This commit is contained in:
Gerald Squelart 2020-07-17 11:22:23 +00:00
Родитель 698881bb66
Коммит 126afc3ab4
5 изменённых файлов: 21 добавлений и 5 удалений

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

@ -406,6 +406,11 @@ const featureDescriptions = [
value: "nativeallocations",
title: "Track native allocations",
},
{
name: "Audio Callback Tracing",
value: "audiocallbacktracing",
title: "Trace real-time audio callbacks.",
},
];
module.exports = {

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

@ -156,7 +156,10 @@ class SpliceableJSONWriter;
"allocations, biasing towards collecting larger allocations") \
\
MACRO(17, "ipcmessages", IPCMessages, \
"Have the IPC layer track cross-process messages")
"Have the IPC layer track cross-process messages") \
\
MACRO(18, "audiocallbacktracing", AudioCallbackTracing, \
"Audio callback tracing")
struct ProfilerFeature {
# define DECLARE(n_, str_, Name_, desc_) \

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

@ -41,7 +41,8 @@
"ipcmessages",
"fileio",
"fileioall",
"noiostacks"
"noiostacks",
"audiocallbacktracing"
]
},
{

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

@ -4543,7 +4543,9 @@ static void locked_profiler_start(PSLockRef aLock, PowerOfTwo32 aCapacity,
}
#endif
StartAudioCallbackTracing();
if (ProfilerFeature::HasAudioCallbackTracing(aFeatures)) {
StartAudioCallbackTracing();
}
// At the very end, set up RacyFeatures.
RacyFeatures::SetActive(ActivePS::Features(aLock));
@ -4652,7 +4654,9 @@ void profiler_ensure_started(PowerOfTwo32 aCapacity, double aInterval,
// At the very start, clear RacyFeatures.
RacyFeatures::SetInactive();
StopAudioCallbackTracing();
if (ActivePS::FeatureAudioCallbackTracing(aLock)) {
StopAudioCallbackTracing();
}
#if defined(GP_OS_android)
if (ActivePS::FeatureJava(aLock)) {

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

@ -194,7 +194,10 @@ class Vector;
"allocations, biasing towards collecting larger allocations") \
\
MACRO(17, "ipcmessages", IPCMessages, \
"Have the IPC layer track cross-process messages")
"Have the IPC layer track cross-process messages") \
\
MACRO(18, "audiocallbacktracing", AudioCallbackTracing, \
"Audio callback tracing")
struct ProfilerFeature {
# define DECLARE(n_, str_, Name_, desc_) \