Bug 1687631 - Enable CPU Utilization by default in the profilers - r=florian

Differential Revision: https://phabricator.services.mozilla.com/D107598
This commit is contained in:
Gerald Squelart 2021-03-15 11:54:43 +00:00
parent e6e59a38c3
commit f193604f7c
3 changed files with 7 additions and 10 deletions

View File

@ -863,8 +863,8 @@ pref("devtools.performance.recording.duration.remote", 0);
// explanations. Remote profiling also includes the java feature by default.
// If the remote debuggee isn't an Android phone, then this feature will
// be ignored.
pref("devtools.performance.recording.features", "[\"js\",\"leaf\",\"stackwalk\",\"screenshots\"]");
pref("devtools.performance.recording.features.remote", "[\"js\",\"leaf\",\"stackwalk\",\"screenshots\",\"java\"]");
pref("devtools.performance.recording.features", "[\"js\",\"leaf\",\"stackwalk\",\"cpu\",\"screenshots\"]");
pref("devtools.performance.recording.features.remote", "[\"js\",\"leaf\",\"stackwalk\",\"cpu\",\"screenshots\",\"java\"]");
// Threads to be captured by the profiler.
pref("devtools.performance.recording.threads", "[\"GeckoMain\",\"Compositor\",\"Renderer\"]");
pref("devtools.performance.recording.threads.remote", "[\"GeckoMain\",\"Compositor\",\"Renderer\"]");

View File

@ -229,17 +229,16 @@ static uint32_t AvailableFeatures() {
// Default features common to all contexts (even if not available).
static uint32_t DefaultFeatures() {
return ProfilerFeature::Java | ProfilerFeature::JS | ProfilerFeature::Leaf |
ProfilerFeature::StackWalk | ProfilerFeature::Threads;
ProfilerFeature::StackWalk | ProfilerFeature::Threads |
ProfilerFeature::CPUUtilization;
}
// Extra default features when MOZ_PROFILER_STARTUP is set (even if not
// available).
static uint32_t StartupExtraDefaultFeatures() {
// Enable CPUUtilization by default for startup profiles as it is useful to
// see when startup alternates between CPU intensive tasks and being blocked.
// Enable mainthreadio by default for startup profiles as startup is heavy on
// I/O operations, and main thread I/O is really important to see there.
return ProfilerFeature::CPUUtilization | ProfilerFeature::MainThreadIO;
return ProfilerFeature::MainThreadIO;
}
class MOZ_RAII PSAutoTryLock;

View File

@ -270,17 +270,15 @@ static uint32_t AvailableFeatures() {
static uint32_t DefaultFeatures() {
return ProfilerFeature::Java | ProfilerFeature::JS | ProfilerFeature::Leaf |
ProfilerFeature::StackWalk | ProfilerFeature::Threads |
ProfilerFeature::Screenshots;
ProfilerFeature::CPUUtilization | ProfilerFeature::Screenshots;
}
// Extra default features when MOZ_PROFILER_STARTUP is set (even if not
// available).
static uint32_t StartupExtraDefaultFeatures() {
// Enable CPUUtilization by default for startup profiles as it is useful to
// see when startup alternates between CPU intensive tasks and being blocked.
// Enable file I/Os by default for startup profiles as startup is heavy on
// I/O operations.
return ProfilerFeature::CPUUtilization | ProfilerFeature::FileIOAll;
return ProfilerFeature::FileIOAll;
}
// The class is a thin shell around mozglue PlatformMutex. It does not preserve