diff --git a/gfx/thebes/gfxUtils.cpp b/gfx/thebes/gfxUtils.cpp index 9dd8ee262dc0..6e5a1dc1bb8f 100644 --- a/gfx/thebes/gfxUtils.cpp +++ b/gfx/thebes/gfxUtils.cpp @@ -1443,7 +1443,7 @@ static bool sDumpPaintList = getenv("MOZ_DUMP_PAINT_LIST") != 0; /* static */ bool gfxUtils::DumpPaintList() { - return sDumpPaintList || gfxPrefs::LayoutDumpDisplayList(); + return sDumpPaintList || gfxPrefs::LayoutDumpDisplayList() || profiler_feature_active("displaylistdump"); } bool gfxUtils::sDumpPainting = getenv("MOZ_DUMP_PAINT") != 0; diff --git a/tools/profiler/TableTicker.h b/tools/profiler/TableTicker.h index bfd06dd3573b..da5f94acbc0f 100644 --- a/tools/profiler/TableTicker.h +++ b/tools/profiler/TableTicker.h @@ -79,6 +79,7 @@ class TableTicker: public Sampler { mProfileMemory = hasFeature(aFeatures, aFeatureCount, "memory"); mTaskTracer = hasFeature(aFeatures, aFeatureCount, "tasktracer"); mLayersDump = hasFeature(aFeatures, aFeatureCount, "layersdump"); + mDisplayListDump = hasFeature(aFeatures, aFeatureCount, "displaylistdump"); #if defined(XP_WIN) if (mProfilePower) { @@ -210,6 +211,7 @@ class TableTicker: public Sampler { bool ProfileMemory() const { return mProfileMemory; } bool TaskTracer() const { return mTaskTracer; } bool LayersDump() const { return mLayersDump; } + bool DisplayListDump() const { return mDisplayListDump; } protected: // Called within a signal. This function must be reentrant @@ -236,6 +238,7 @@ protected: bool mProfileJava; bool mProfilePower; bool mLayersDump; + bool mDisplayListDump; // Keep the thread filter to check against new thread that // are started while profiling diff --git a/tools/profiler/platform.cpp b/tools/profiler/platform.cpp index 2798aad8774d..6d3d977ddd9b 100644 --- a/tools/profiler/platform.cpp +++ b/tools/profiler/platform.cpp @@ -47,6 +47,7 @@ int sInitCount = 0; // Each init must have a matched shutdown. static bool sIsProfiling = false; // is raced on static bool sIsGPUProfiling = false; // is raced on static bool sIsLayersDump = false; // is raced on +static bool sIsDisplayListDump = false; // is raced on // env variables to control the profiler const char* PROFILER_MODE = "MOZ_PROFILER_MODE"; @@ -703,6 +704,8 @@ const char** mozilla_sampler_get_features() "privacy", // Dump the layer tree with the textures. "layersdump", + // Dump the display list with the textures. + "displaylistdump", // Add main thread I/O to the profile "mainthreadio", // Add RSS collection @@ -802,6 +805,7 @@ void mozilla_sampler_start(int aProfileEntries, double aInterval, sIsProfiling = true; sIsGPUProfiling = t->ProfileGPU(); sIsLayersDump = t->LayersDump(); + sIsDisplayListDump = t->DisplayListDump(); if (Sampler::CanNotifyObservers()) { nsCOMPtr os = mozilla::services::GetObserverService(); @@ -873,6 +877,7 @@ void mozilla_sampler_stop() sIsProfiling = false; sIsGPUProfiling = false; sIsLayersDump = false; + sIsDisplayListDump = false; if (Sampler::CanNotifyObservers()) { nsCOMPtr os = mozilla::services::GetObserverService(); @@ -917,6 +922,10 @@ bool mozilla_sampler_feature_active(const char* aName) return sIsLayersDump; } + if (strcmp(aName, "displaylistdump") == 0) { + return sIsDisplayListDump; + } + return false; }