Bug 1406296 (part 2) - Remove the profiler's "layersdump" feature. r=mstange.

Because it just doesn't control any behaviour within the profiler, and it just
duplicates gfxPrefs::LayersDumpTexture().

With this gone, PROFILER_FEATURE_ACTIVE can also be removed.

--HG--
extra : rebase_source : d6718894b8a9332cf73729ea6b7bd2de348817bd
This commit is contained in:
Nicholas Nethercote 2017-10-06 17:34:22 +11:00
parent 706daca552
commit 4bedc03a3d
6 changed files with 11 additions and 25 deletions

View File

@ -26,7 +26,6 @@
"gpu",
"java",
"js",
"layersdump",
"leaf",
"mainthreadio",
"memory",

View File

@ -1396,8 +1396,7 @@ TextureClient::PrintInfo(std::stringstream& aStream, const char* aPrefix)
AppendToString(aStream, mFlags, " [flags=", "]");
#ifdef MOZ_DUMP_PAINTING
if (gfxPrefs::LayersDumpTexture() ||
PROFILER_FEATURE_ACTIVE(ProfilerFeature::LayersDump)) {
if (gfxPrefs::LayersDumpTexture()) {
nsAutoCString pfx(aPrefix);
pfx += " ";

View File

@ -865,10 +865,6 @@ LayerManagerComposite::Render(const nsIntRegion& aInvalidRegion, const nsIntRegi
// Dump to console
if (gfxPrefs::LayersDump()) {
this->Dump(/* aSorted= */true);
} else if (PROFILER_FEATURE_ACTIVE(ProfilerFeature::LayersDump)) {
std::stringstream ss;
Dump(ss);
PROFILER_TRACING("log", ss.str().c_str(), TRACING_EVENT);
}
// Dump to LayerScope Viewer

View File

@ -410,8 +410,7 @@ TextureHost::PrintInfo(std::stringstream& aStream, const char* aPrefix)
}
AppendToString(aStream, mFlags, " [flags=", "]");
#ifdef MOZ_DUMP_PAINTING
if (gfxPrefs::LayersDumpTexture() ||
PROFILER_FEATURE_ACTIVE(ProfilerFeature::LayersDump)) {
if (gfxPrefs::LayersDumpTexture()) {
nsAutoCString pfx(aPrefix);
pfx += " ";

View File

@ -626,8 +626,7 @@ TiledContentHost::PrintInfo(std::stringstream& aStream, const char* aPrefix)
aStream << nsPrintfCString("TiledContentHost (0x%p)", this).get();
#if defined(MOZ_DUMP_PAINTING)
if (gfxPrefs::LayersDumpTexture() ||
PROFILER_FEATURE_ACTIVE(ProfilerFeature::LayersDump)) {
if (gfxPrefs::LayersDumpTexture()) {
nsAutoCString pfx(aPrefix);
pfx += " ";

View File

@ -37,8 +37,6 @@
#define PROFILER_SET_JS_CONTEXT(cx)
#define PROFILER_CLEAR_JS_CONTEXT()
#define PROFILER_FEATURE_ACTIVE(feature) false
#define AUTO_PROFILER_LABEL(label, category)
#define AUTO_PROFILER_LABEL_DYNAMIC(label, category, dynamicStr)
@ -106,33 +104,30 @@ class TimeStamp;
/* Get the JS engine to emit pseudostack entries in prologues/epilogues */ \
macro(2, "js", JS) \
\
/* Dump the layer tree with the textures. */ \
macro(3, "layersdump", LayersDump) \
\
/* Include the C++ leaf node if not stackwalking. */ \
/* The DevTools profiler doesn't want the native addresses. */ \
macro(4, "leaf", Leaf) \
macro(3, "leaf", Leaf) \
\
/* Add main thread I/O to the profile. */ \
macro(5, "mainthreadio", MainThreadIO) \
macro(4, "mainthreadio", MainThreadIO) \
\
/* Add memory measurements (e.g. RSS). */ \
macro(6, "memory", Memory) \
macro(5, "memory", Memory) \
\
/* Do not include user-identifiable information. */ \
macro(7, "privacy", Privacy) \
macro(6, "privacy", Privacy) \
\
/* Restyle profiling. */ \
macro(8, "restyle", Restyle) \
macro(7, "restyle", Restyle) \
\
/* Walk the C++ stack. Not available on all platforms. */ \
macro(9, "stackwalk", StackWalk) \
macro(8, "stackwalk", StackWalk) \
\
/* Start profiling with feature TaskTracer. */ \
macro(10, "tasktracer", TaskTracer) \
macro(9, "tasktracer", TaskTracer) \
\
/* Profile the registered secondary threads. */ \
macro(11, "threads", Threads)
macro(10, "threads", Threads)
struct ProfilerFeature
{
@ -286,7 +281,6 @@ uint32_t profiler_get_available_features();
// active. Returns false if the profiler is inactive. Note: the return value
// can become immediately out-of-date, much like the return value of
// profiler_is_active().
#define PROFILER_FEATURE_ACTIVE(feature) profiler_feature_active(feature)
bool profiler_feature_active(uint32_t aFeature);
// Get the params used to start the profiler. Returns 0 and an empty vector