forked from mirrors/gecko-dev
Backed out changeset dc425d760d09 (bug 1817163) for causing dt failures on browser_interaction-between-interfaces.js CLOSED TREE
This commit is contained in:
parent
990a0c1450
commit
b4bb722de5
22 changed files with 29 additions and 116 deletions
|
|
@ -124,7 +124,7 @@ export const presets = {
|
|||
"web-developer": {
|
||||
entries: 128 * 1024 * 1024,
|
||||
interval: 1,
|
||||
features: ["screenshots", "js", "cpu", "memory"],
|
||||
features: ["screenshots", "js", "cpu"],
|
||||
threads: ["GeckoMain", "Compositor", "Renderer", "DOM Worker"],
|
||||
duration: 0,
|
||||
profilerViewMode: "active-tab",
|
||||
|
|
@ -142,15 +142,7 @@ export const presets = {
|
|||
"firefox-platform": {
|
||||
entries: 128 * 1024 * 1024,
|
||||
interval: 1,
|
||||
features: [
|
||||
"screenshots",
|
||||
"js",
|
||||
"stackwalk",
|
||||
"cpu",
|
||||
"java",
|
||||
"processcpu",
|
||||
"memory",
|
||||
],
|
||||
features: ["screenshots", "js", "stackwalk", "cpu", "java", "processcpu"],
|
||||
threads: [
|
||||
"GeckoMain",
|
||||
"Compositor",
|
||||
|
|
@ -173,7 +165,7 @@ export const presets = {
|
|||
graphics: {
|
||||
entries: 128 * 1024 * 1024,
|
||||
interval: 1,
|
||||
features: ["stackwalk", "js", "cpu", "java", "processcpu", "memory"],
|
||||
features: ["stackwalk", "js", "cpu", "java", "processcpu"],
|
||||
threads: [
|
||||
"GeckoMain",
|
||||
"Compositor",
|
||||
|
|
@ -207,7 +199,6 @@ export const presets = {
|
|||
"audiocallbacktracing",
|
||||
"ipcmessages",
|
||||
"processcpu",
|
||||
"memory",
|
||||
],
|
||||
threads: [
|
||||
"cubeb",
|
||||
|
|
@ -257,7 +248,6 @@ export const presets = {
|
|||
"java",
|
||||
"processcpu",
|
||||
"bandwidth",
|
||||
"memory",
|
||||
],
|
||||
threads: [
|
||||
"Compositor",
|
||||
|
|
@ -296,7 +286,6 @@ export const presets = {
|
|||
"markersallthreads",
|
||||
"power",
|
||||
"bandwidth",
|
||||
"memory",
|
||||
],
|
||||
threads: ["GeckoMain", "Renderer"],
|
||||
duration: 0,
|
||||
|
|
|
|||
|
|
@ -414,13 +414,6 @@ const featureDescriptions = [
|
|||
"Record how much CPU has been used between samples by each profiled thread.",
|
||||
recommended: true,
|
||||
},
|
||||
{
|
||||
name: "Memory Tracking",
|
||||
value: "memory",
|
||||
title:
|
||||
"Track the memory allocations and deallocations per process over time.",
|
||||
recommended: true,
|
||||
},
|
||||
{
|
||||
name: "Java",
|
||||
value: "java",
|
||||
|
|
|
|||
|
|
@ -58,7 +58,6 @@ exports.PerfActor = class PerfActor extends Actor {
|
|||
"stackwalk",
|
||||
"cpu",
|
||||
"responsiveness",
|
||||
"memory",
|
||||
],
|
||||
threads: options.threads || ["GeckoMain", "Compositor"],
|
||||
activeTabID: RecordingUtils.getActiveBrowserID(),
|
||||
|
|
|
|||
|
|
@ -34,7 +34,6 @@ private val firefox_features = arrayOf(
|
|||
"java",
|
||||
"processcpu",
|
||||
"ipcmessages",
|
||||
"memory",
|
||||
)
|
||||
private val firefox_threads = arrayOf(
|
||||
"GeckoMain",
|
||||
|
|
@ -44,8 +43,7 @@ private val firefox_threads = arrayOf(
|
|||
"DOM Worker",
|
||||
)
|
||||
|
||||
private val graphics_features =
|
||||
arrayOf("stackwalk", "js", "cpu", "java", "processcpu", "ipcmessages", "memory")
|
||||
private val graphics_features = arrayOf("stackwalk", "js", "cpu", "java", "processcpu", "ipcmessages")
|
||||
private val graphics_threads = arrayOf(
|
||||
"GeckoMain",
|
||||
"Compositor",
|
||||
|
|
@ -66,7 +64,6 @@ private val media_features = arrayOf(
|
|||
"ipcmessages",
|
||||
"processcpu",
|
||||
"java",
|
||||
"memory",
|
||||
)
|
||||
private val media_threads = arrayOf(
|
||||
"cubeb", "audio", "BackgroundThreadPool", "camera", "capture", "Compositor", "decoder", "GeckoMain", "gmp",
|
||||
|
|
@ -84,7 +81,6 @@ private val networking_features = arrayOf(
|
|||
"processcpu",
|
||||
"bandwidth",
|
||||
"ipcmessages",
|
||||
"memory",
|
||||
)
|
||||
|
||||
private val networking_threads = arrayOf(
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ PRODUCTS = [PROD_FENIX, PROD_GVE]
|
|||
GV_CONFIG = b"""env:
|
||||
MOZ_PROFILER_STARTUP: 1
|
||||
MOZ_PROFILER_STARTUP_INTERVAL: 5
|
||||
MOZ_PROFILER_STARTUP_FEATURES: js,stackwalk,leaf,screenshots,ipcmessages,java,cpu,memory
|
||||
MOZ_PROFILER_STARTUP_FEATURES: js,stackwalk,leaf,screenshots,ipcmessages,java,cpu
|
||||
MOZ_PROFILER_STARTUP_FILTERS: GeckoMain,Compositor,Renderer,IPDL Background
|
||||
"""
|
||||
|
||||
|
|
|
|||
|
|
@ -720,8 +720,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\",\"stackwalk\",\"cpu\",\"screenshots\",\"memory\"]");
|
||||
pref("devtools.performance.recording.features.remote", "[\"js\",\"stackwalk\",\"cpu\",\"screenshots\",\"memory\",\"java\"]");
|
||||
pref("devtools.performance.recording.features", "[\"js\",\"stackwalk\",\"cpu\",\"screenshots\"]");
|
||||
pref("devtools.performance.recording.features.remote", "[\"js\",\"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\"]");
|
||||
|
|
|
|||
|
|
@ -238,10 +238,7 @@ class MOZ_RAII AutoProfilerStats {
|
|||
"every CPU core for every profiler sample.") \
|
||||
\
|
||||
MACRO(23, "bandwidth", Bandwidth, \
|
||||
"Record the network bandwidth used for every profiler sample.") \
|
||||
MACRO(24, "memory", Memory, \
|
||||
"Track the memory allocations and deallocations per process over " \
|
||||
"time.")
|
||||
"Record the network bandwidth used for every profiler sample.")
|
||||
// *** Synchronize with lists in ProfilerState.h and geckoProfiler.json ***
|
||||
|
||||
struct ProfilerFeature {
|
||||
|
|
|
|||
|
|
@ -630,7 +630,7 @@ class Browsertime(Perftest):
|
|||
(
|
||||
"gecko_profile_features",
|
||||
"--firefox.geckoProfilerParams.features",
|
||||
"js,stackwalk,cpu,screenshots,memory",
|
||||
"js,stackwalk,cpu,screenshots",
|
||||
),
|
||||
(
|
||||
"gecko_profile_threads",
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
alert_threshold = 2.0
|
||||
apps = "firefox, chrome, safari, custom-car"
|
||||
gecko_profile_interval = 1
|
||||
gecko_profile_features = "stackwalk,js,cpu,java,processcpu,memory"
|
||||
gecko_profile_features = "stackwalk,js,cpu,java,processcpu"
|
||||
gecko_profile_threads = "GeckoMain,Compositor,Renderer,SwComposite,RenderBackend,SceneBuilder,WrWorker,CanvasWorkers,TextureUpdate"
|
||||
expose_browser_profiler = true
|
||||
expose_chrome_trace = true
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
alert_threshold = 2.0
|
||||
apps = "fenix, geckoview, chrome-m, cstm-car-m"
|
||||
gecko_profile_interval = 1
|
||||
gecko_profile_features = "stackwalk,js,cpu,java,processcpu,memory"
|
||||
gecko_profile_features = "stackwalk,js,cpu,java,processcpu"
|
||||
gecko_profile_threads = "GeckoMain,Compositor,Renderer,SwComposite,RenderBackend,SceneBuilder,WrWorker,CanvasWorkers,TextureUpdate"
|
||||
expose_browser_profiler = true
|
||||
lower_is_better = false
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
alert_threshold = 2.0
|
||||
apps = "firefox, chrome, safari"
|
||||
gecko_profile_interval = 1
|
||||
gecko_profile_features = "stackwalk,js,cpu,java,processcpu,memory"
|
||||
gecko_profile_features = "stackwalk,js,cpu,java,processcpu"
|
||||
gecko_profile_threads = "GeckoMain,Compositor,Renderer,SwComposite,RenderBackend,SceneBuilder,WrWorker,CanvasWorkers,TextureUpdate"
|
||||
expose_browser_profiler = true
|
||||
lower_is_better = false
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
alert_threshold = 2.0
|
||||
apps = "fenix, chrome-m, geckoview"
|
||||
gecko_profile_interval = 1
|
||||
gecko_profile_features = "stackwalk,js,cpu,java,processcpu,memory"
|
||||
gecko_profile_features = "stackwalk,js,cpu,java,processcpu"
|
||||
gecko_profile_threads = "GeckoMain,Compositor,Renderer,SwComposite,RenderBackend,SceneBuilder,WrWorker,CanvasWorkers,TextureUpdate"
|
||||
expose_browser_profiler = true
|
||||
lower_is_better = false
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
alert_threshold = 2.0
|
||||
apps = "firefox, chrome, safari"
|
||||
gecko_profile_interval = 1
|
||||
gecko_profile_features = "stackwalk,js,cpu,java,processcpu,memory"
|
||||
gecko_profile_features = "stackwalk,js,cpu,java,processcpu"
|
||||
gecko_profile_threads = "GeckoMain,Compositor,Renderer,SwComposite,RenderBackend,SceneBuilder,WrWorker,CanvasWorkers,TextureUpdate"
|
||||
expose_gecko_profiler = true
|
||||
expose_chrome_trace = true
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
alert_threshold = 2.0
|
||||
apps = "fenix, chrome-m, geckoview"
|
||||
gecko_profile_interval = 1
|
||||
gecko_profile_features = "stackwalk,js,cpu,java,processcpu,memory"
|
||||
gecko_profile_features = "stackwalk,js,cpu,java,processcpu"
|
||||
gecko_profile_threads = "GeckoMain,Compositor,Renderer,SwComposite,RenderBackend,SceneBuilder,WrWorker,CanvasWorkers,TextureUpdate"
|
||||
expose_gecko_profiler = true
|
||||
expose_chrome_trace = true
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ alert_threshold = 2.0
|
|||
browser_cycles = 1
|
||||
custom_data = true
|
||||
gecko_profile_entries = 131072000 # 1GB
|
||||
gecko_profile_features = "js,stackwalk,cpu,memory"
|
||||
gecko_profile_features = "js,stackwalk,cpu"
|
||||
gecko_profile_threads = "GeckoMain,DOM Worker,IndexedDB"
|
||||
lower_is_better = true
|
||||
measure = "cpuTime"
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ class GeckoProfile(object):
|
|||
"gecko_profile_entries", int(128 * 1024 * 1024 / 8)
|
||||
)
|
||||
gecko_profile_features = test_config.get(
|
||||
"gecko_profile_features", "js,stackwalk,cpu,screenshots,memory"
|
||||
"gecko_profile_features", "js,stackwalk,cpu,screenshots"
|
||||
)
|
||||
gecko_profile_threads = test_config.get(
|
||||
"gecko_profile_threads", "GeckoMain,Compositor,Renderer"
|
||||
|
|
|
|||
|
|
@ -47,8 +47,7 @@
|
|||
"power",
|
||||
"responsiveness",
|
||||
"cpufreq",
|
||||
"bandwidth",
|
||||
"memory"
|
||||
"bandwidth"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -584,7 +584,6 @@ BaseProfilerCount* install_memory_hooks() {
|
|||
ThreadIntercept::Init();
|
||||
} else {
|
||||
sCounter->Clear();
|
||||
sCounter->Register();
|
||||
}
|
||||
jemalloc_replace_dynamic(replace_init);
|
||||
return sCounter;
|
||||
|
|
@ -636,10 +635,4 @@ void disable_native_allocations() {
|
|||
}
|
||||
}
|
||||
|
||||
void unregister_memory_counter() {
|
||||
if (sCounter) {
|
||||
sCounter->Unregister();
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace mozilla::profiler
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@ BaseProfilerCount* install_memory_hooks();
|
|||
void remove_memory_hooks();
|
||||
void enable_native_allocations();
|
||||
void disable_native_allocations();
|
||||
void unregister_memory_counter();
|
||||
|
||||
} // namespace profiler
|
||||
} // namespace mozilla
|
||||
|
|
|
|||
|
|
@ -405,7 +405,6 @@ static uint32_t AvailableFeatures() {
|
|||
}
|
||||
#else
|
||||
// The memory hooks are not available.
|
||||
ProfilerFeature::ClearMemory(features);
|
||||
ProfilerFeature::ClearNativeAllocations(features);
|
||||
#endif
|
||||
|
||||
|
|
@ -1311,11 +1310,6 @@ class ActivePS {
|
|||
|
||||
#undef PS_GET_FEATURE
|
||||
|
||||
static bool ShouldInstallMemoryHooks(PSLockRef) {
|
||||
MOZ_ASSERT(sInstance);
|
||||
return ProfilerFeature::ShouldInstallMemoryHooks(sInstance->mFeatures);
|
||||
}
|
||||
|
||||
static uint32_t JSFlags(PSLockRef aLock) {
|
||||
uint32_t Flags = 0;
|
||||
Flags |=
|
||||
|
|
@ -5825,16 +5819,9 @@ void profiler_init(void* aStackTop) {
|
|||
profiler_mark_thread_awake();
|
||||
|
||||
#if defined(MOZ_REPLACE_MALLOC) && defined(MOZ_PROFILER_MEMORY)
|
||||
if (ProfilerFeature::ShouldInstallMemoryHooks(features)) {
|
||||
// Start counting memory allocations (outside of lock because this may call
|
||||
// profiler_add_sampled_counter which would attempt to take the lock.)
|
||||
ActivePS::SetMemoryCounter(mozilla::profiler::install_memory_hooks());
|
||||
} else {
|
||||
// Unregister the memory counter in case it was registered before. This will
|
||||
// make sure that the empty memory counter from the previous profiler run is
|
||||
// removed completely and we don't serialize the memory counters.
|
||||
mozilla::profiler::unregister_memory_counter();
|
||||
}
|
||||
// Start counting memory allocations (outside of lock because this may call
|
||||
// profiler_add_sampled_counter which would attempt to take the lock.)
|
||||
ActivePS::SetMemoryCounter(mozilla::profiler::install_memory_hooks());
|
||||
#endif
|
||||
|
||||
invoke_profiler_state_change_callbacks(ProfilingState::Started);
|
||||
|
|
@ -6461,16 +6448,9 @@ RefPtr<GenericPromise> profiler_start(PowerOfTwo32 aCapacity, double aInterval,
|
|||
}
|
||||
|
||||
#if defined(MOZ_REPLACE_MALLOC) && defined(MOZ_PROFILER_MEMORY)
|
||||
if (ProfilerFeature::ShouldInstallMemoryHooks(aFeatures)) {
|
||||
// Start counting memory allocations (outside of lock because this may call
|
||||
// profiler_add_sampled_counter which would attempt to take the lock.)
|
||||
ActivePS::SetMemoryCounter(mozilla::profiler::install_memory_hooks());
|
||||
} else {
|
||||
// Unregister the memory counter in case it was registered before. This will
|
||||
// make sure that the empty memory counter from the previous profiler run is
|
||||
// removed completely and we don't serialize the memory counters.
|
||||
mozilla::profiler::unregister_memory_counter();
|
||||
}
|
||||
// Start counting memory allocations (outside of lock because this may call
|
||||
// profiler_add_sampled_counter which would attempt to take the lock.)
|
||||
ActivePS::SetMemoryCounter(mozilla::profiler::install_memory_hooks());
|
||||
#endif
|
||||
|
||||
invoke_profiler_state_change_callbacks(ProfilingState::Started);
|
||||
|
|
@ -6594,8 +6574,7 @@ void profiler_ensure_started(PowerOfTwo32 aCapacity, double aInterval,
|
|||
}
|
||||
|
||||
#if defined(MOZ_REPLACE_MALLOC) && defined(MOZ_PROFILER_MEMORY)
|
||||
if (ActivePS::FeatureNativeAllocations(aLock) &&
|
||||
ActivePS::ShouldInstallMemoryHooks(aLock)) {
|
||||
if (ActivePS::FeatureNativeAllocations(aLock)) {
|
||||
mozilla::profiler::disable_native_allocations();
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@
|
|||
|
||||
# include "mozilla/Assertions.h"
|
||||
# include "mozilla/Atomics.h"
|
||||
# include "mozilla/DataMutex.h"
|
||||
|
||||
class BaseProfilerCount;
|
||||
void profiler_add_sampled_counter(BaseProfilerCount* aCounter);
|
||||
|
|
@ -189,33 +188,13 @@ class ProfilerCounterTotal final : public BaseProfilerCount {
|
|||
public:
|
||||
ProfilerCounterTotal(const char* aLabel, const char* aCategory,
|
||||
const char* aDescription)
|
||||
: BaseProfilerCount(aLabel, &mCounter, &mNumber, aCategory, aDescription),
|
||||
mRegistered(false, "ProfilerCounterTotal::mRegistered") {
|
||||
: BaseProfilerCount(aLabel, &mCounter, &mNumber, aCategory,
|
||||
aDescription) {
|
||||
// Assume we're in libxul
|
||||
Register();
|
||||
}
|
||||
|
||||
virtual ~ProfilerCounterTotal() { Unregister(); }
|
||||
|
||||
void Register() {
|
||||
auto registered = mRegistered.Lock();
|
||||
if (*registered) {
|
||||
return;
|
||||
}
|
||||
|
||||
*registered = true;
|
||||
profiler_add_sampled_counter(this);
|
||||
}
|
||||
|
||||
void Unregister() {
|
||||
auto registered = mRegistered.Lock();
|
||||
if (!*registered) {
|
||||
return;
|
||||
}
|
||||
|
||||
*registered = false;
|
||||
profiler_remove_sampled_counter(this);
|
||||
}
|
||||
virtual ~ProfilerCounterTotal() { profiler_remove_sampled_counter(this); }
|
||||
|
||||
BaseProfilerCount& operator++() {
|
||||
Add(1);
|
||||
|
|
@ -229,7 +208,6 @@ class ProfilerCounterTotal final : public BaseProfilerCount {
|
|||
|
||||
ProfilerAtomicSigned mCounter;
|
||||
ProfilerAtomicUnsigned mNumber;
|
||||
mozilla::DataMutex<bool> mRegistered;
|
||||
};
|
||||
|
||||
// Defines a counter that is sampled on each profiler tick, with a running
|
||||
|
|
|
|||
|
|
@ -118,10 +118,7 @@
|
|||
"every CPU core for every profiler sample.") \
|
||||
\
|
||||
MACRO(23, "bandwidth", Bandwidth, \
|
||||
"Record the network bandwidth used for every profiler sample.") \
|
||||
MACRO( \
|
||||
24, "memory", Memory, \
|
||||
"Track the memory allocations and deallocations per process over time.")
|
||||
"Record the network bandwidth used for every profiler sample.")
|
||||
// *** Synchronize with lists in BaseProfilerState.h and geckoProfiler.json ***
|
||||
|
||||
struct ProfilerFeature {
|
||||
|
|
@ -141,12 +138,6 @@ struct ProfilerFeature {
|
|||
PROFILER_FOR_EACH_FEATURE(DECLARE)
|
||||
|
||||
#undef DECLARE
|
||||
|
||||
[[nodiscard]] static constexpr bool ShouldInstallMemoryHooks(
|
||||
uint32_t aFeatures) {
|
||||
return ProfilerFeature::HasMemory(aFeatures) ||
|
||||
ProfilerFeature::HasNativeAllocations(aFeatures);
|
||||
}
|
||||
};
|
||||
|
||||
// clang-format off
|
||||
|
|
|
|||
Loading…
Reference in a new issue