mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-09 04:25:38 +00:00
Bug 1406296 (part 1) - Remove the profiler's "displaylistdump" feature. r=mstange.
It's not useful. --HG-- extra : rebase_source : b18244b6f1e28b29f1f71a4cca55781316e2cdc5
This commit is contained in:
parent
98c0c61998
commit
706daca552
@ -23,7 +23,6 @@
|
||||
"id": "ProfilerFeature",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"displaylistdump",
|
||||
"gpu",
|
||||
"java",
|
||||
"js",
|
||||
|
@ -108,13 +108,6 @@ ContentClient::PrintInfo(std::stringstream& aStream, const char* aPrefix)
|
||||
{
|
||||
aStream << aPrefix;
|
||||
aStream << nsPrintfCString("ContentClient (0x%p)", this).get();
|
||||
|
||||
if (PROFILER_FEATURE_ACTIVE(ProfilerFeature::DisplayListDump)) {
|
||||
nsAutoCString pfx(aPrefix);
|
||||
pfx += " ";
|
||||
|
||||
Dump(aStream, pfx.get(), false);
|
||||
}
|
||||
}
|
||||
|
||||
// We pass a null pointer for the ContentClient Forwarder argument, which means
|
||||
|
@ -1399,13 +1399,6 @@ TiledContentClient::PrintInfo(std::stringstream& aStream, const char* aPrefix)
|
||||
{
|
||||
aStream << aPrefix;
|
||||
aStream << nsPrintfCString("%sTiledContentClient (0x%p)", mName, this).get();
|
||||
|
||||
if (PROFILER_FEATURE_ACTIVE(ProfilerFeature::DisplayListDump)) {
|
||||
nsAutoCString pfx(aPrefix);
|
||||
pfx += " ";
|
||||
|
||||
Dump(aStream, pfx.get(), false);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -3762,15 +3762,13 @@ nsLayoutUtils::PaintFrame(gfxContext* aRenderingContext, nsIFrame* aFrame,
|
||||
Telemetry::AccumulateTimeDelta(Telemetry::PAINT_BUILD_DISPLAYLIST_TIME,
|
||||
startBuildDisplayList);
|
||||
|
||||
bool profilerNeedsDisplayList =
|
||||
PROFILER_FEATURE_ACTIVE(ProfilerFeature::DisplayListDump);
|
||||
bool consoleNeedsDisplayList = gfxUtils::DumpDisplayList() || gfxEnv::DumpPaint();
|
||||
#ifdef MOZ_DUMP_PAINTING
|
||||
FILE* savedDumpFile = gfxUtils::sDumpPaintFile;
|
||||
#endif
|
||||
|
||||
UniquePtr<std::stringstream> ss;
|
||||
if (consoleNeedsDisplayList || profilerNeedsDisplayList) {
|
||||
if (consoleNeedsDisplayList) {
|
||||
ss = MakeUnique<std::stringstream>();
|
||||
#ifdef MOZ_DUMP_PAINTING
|
||||
if (gfxEnv::DumpPaintToFile()) {
|
||||
@ -3807,11 +3805,7 @@ nsLayoutUtils::PaintFrame(gfxContext* aRenderingContext, nsIFrame* aFrame,
|
||||
if (gfxEnv::DumpPaint() || gfxEnv::DumpPaintItems()) {
|
||||
// Flush stream now to avoid reordering dump output relative to
|
||||
// messages dumped by PaintRoot below.
|
||||
if (profilerNeedsDisplayList && !consoleNeedsDisplayList) {
|
||||
PROFILER_TRACING("log", ss->str().c_str(), TRACING_EVENT);
|
||||
} else {
|
||||
fprint_stderr(gfxUtils::sDumpPaintFile, *ss);
|
||||
}
|
||||
fprint_stderr(gfxUtils::sDumpPaintFile, *ss);
|
||||
ss = MakeUnique<std::stringstream>();
|
||||
}
|
||||
}
|
||||
@ -3870,7 +3864,7 @@ nsLayoutUtils::PaintFrame(gfxContext* aRenderingContext, nsIFrame* aFrame,
|
||||
pixelCount, rasterizeTime, paintedInLastSecond);
|
||||
}
|
||||
|
||||
if (consoleNeedsDisplayList || profilerNeedsDisplayList) {
|
||||
if (consoleNeedsDisplayList) {
|
||||
*ss << "Painting --- after optimization:\n";
|
||||
nsFrame::PrintDisplayList(&builder, list, *ss, gfxEnv::DumpPaintToFile());
|
||||
|
||||
@ -3880,11 +3874,7 @@ nsLayoutUtils::PaintFrame(gfxContext* aRenderingContext, nsIFrame* aFrame,
|
||||
gfxEnv::DumpPaintToFile());
|
||||
}
|
||||
|
||||
if (profilerNeedsDisplayList && !consoleNeedsDisplayList) {
|
||||
PROFILER_TRACING("log", ss->str().c_str(), TRACING_EVENT);
|
||||
} else {
|
||||
fprint_stderr(gfxUtils::sDumpPaintFile, *ss);
|
||||
}
|
||||
fprint_stderr(gfxUtils::sDumpPaintFile, *ss);
|
||||
|
||||
#ifdef MOZ_DUMP_PAINTING
|
||||
if (gfxEnv::DumpPaintToFile()) {
|
||||
|
@ -97,45 +97,42 @@ class TimeStamp;
|
||||
// Any changes to this list should also be applied to the feature list in
|
||||
// browser/components/extensions/schemas/geckoProfiler.json.
|
||||
#define PROFILER_FOR_EACH_FEATURE(macro) \
|
||||
/* Dump the display list with the textures. */ \
|
||||
macro(0, "displaylistdump", DisplayListDump) \
|
||||
\
|
||||
/* GPU Profiling (may not be supported by the GL). */ \
|
||||
macro(1, "gpu", GPU) \
|
||||
macro(0, "gpu", GPU) \
|
||||
\
|
||||
/* Profile Java code (Android only). */ \
|
||||
macro(2, "java", Java) \
|
||||
macro(1, "java", Java) \
|
||||
\
|
||||
/* Get the JS engine to emit pseudostack entries in prologues/epilogues */ \
|
||||
macro(3, "js", JS) \
|
||||
macro(2, "js", JS) \
|
||||
\
|
||||
/* Dump the layer tree with the textures. */ \
|
||||
macro(4, "layersdump", LayersDump) \
|
||||
macro(3, "layersdump", LayersDump) \
|
||||
\
|
||||
/* Include the C++ leaf node if not stackwalking. */ \
|
||||
/* The DevTools profiler doesn't want the native addresses. */ \
|
||||
macro(5, "leaf", Leaf) \
|
||||
macro(4, "leaf", Leaf) \
|
||||
\
|
||||
/* Add main thread I/O to the profile. */ \
|
||||
macro(6, "mainthreadio", MainThreadIO) \
|
||||
macro(5, "mainthreadio", MainThreadIO) \
|
||||
\
|
||||
/* Add memory measurements (e.g. RSS). */ \
|
||||
macro(7, "memory", Memory) \
|
||||
macro(6, "memory", Memory) \
|
||||
\
|
||||
/* Do not include user-identifiable information. */ \
|
||||
macro(8, "privacy", Privacy) \
|
||||
macro(7, "privacy", Privacy) \
|
||||
\
|
||||
/* Restyle profiling. */ \
|
||||
macro(9, "restyle", Restyle) \
|
||||
macro(8, "restyle", Restyle) \
|
||||
\
|
||||
/* Walk the C++ stack. Not available on all platforms. */ \
|
||||
macro(10, "stackwalk", StackWalk) \
|
||||
macro(9, "stackwalk", StackWalk) \
|
||||
\
|
||||
/* Start profiling with feature TaskTracer. */ \
|
||||
macro(11, "tasktracer", TaskTracer) \
|
||||
macro(10, "tasktracer", TaskTracer) \
|
||||
\
|
||||
/* Profile the registered secondary threads. */ \
|
||||
macro(12, "threads", Threads)
|
||||
macro(11, "threads", Threads)
|
||||
|
||||
struct ProfilerFeature
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user