Remove redundant trace events (#32812)
diff --git a/flow/raster_cache.cc b/flow/raster_cache.cc
index 68072b6..b5d1689 100644
--- a/flow/raster_cache.cc
+++ b/flow/raster_cache.cc
@@ -511,10 +511,7 @@
void RasterCache::CleanupAfterFrame() {
picture_metrics_ = {};
layer_metrics_ = {};
- {
- TRACE_EVENT0("flutter", "RasterCache::SweepCaches");
- SweepOneCacheAfterFrame(cache_, picture_metrics_, layer_metrics_);
- }
+ SweepOneCacheAfterFrame(cache_, picture_metrics_, layer_metrics_);
TraceStatsToTimeline();
}
diff --git a/fml/message_loop_impl.cc b/fml/message_loop_impl.cc
index e16509b..914375a 100644
--- a/fml/message_loop_impl.cc
+++ b/fml/message_loop_impl.cc
@@ -11,7 +11,6 @@
#include "flutter/fml/build_config.h"
#include "flutter/fml/logging.h"
-#include "flutter/fml/trace_event.h"
#if FML_OS_MACOSX
#include "flutter/fml/platform/darwin/message_loop_darwin.h"
@@ -118,8 +117,6 @@
}
void MessageLoopImpl::FlushTasks(FlushType type) {
- TRACE_EVENT0("fml", "MessageLoop::FlushTasks");
-
const auto now = fml::TimePoint::Now();
fml::closure invocation;
do {
diff --git a/lib/ui/volatile_path_tracker.cc b/lib/ui/volatile_path_tracker.cc
index 9b91ef0..073395b 100644
--- a/lib/ui/volatile_path_tracker.cc
+++ b/lib/ui/volatile_path_tracker.cc
@@ -27,13 +27,6 @@
if (!enabled_) {
return;
}
-#if !FLUTTER_RELEASE
- std::string total_count = std::to_string(paths_.size());
- TRACE_EVENT1("flutter", "VolatilePathTracker::OnFrame", "total_count",
- total_count.c_str());
-#else
- TRACE_EVENT0("flutter", "VolatilePathTracker::OnFrame");
-#endif
paths_.erase(std::remove_if(paths_.begin(), paths_.end(),
[](std::weak_ptr<TrackedPath> weak_path) {
@@ -50,12 +43,6 @@
return false;
}),
paths_.end());
-
-#if !FLUTTER_RELEASE
- std::string post_removal_count = std::to_string(paths_.size());
- TRACE_EVENT_INSTANT1("flutter", "VolatilePathTracker::OnFrame",
- "remaining_count", post_removal_count.c_str());
-#endif
}
} // namespace flutter
diff --git a/runtime/runtime_controller.cc b/runtime/runtime_controller.cc
index 80dfff0..e82f339 100644
--- a/runtime/runtime_controller.cc
+++ b/runtime/runtime_controller.cc
@@ -227,8 +227,7 @@
bool RuntimeController::DispatchPlatformMessage(
std::unique_ptr<PlatformMessage> message) {
if (auto* platform_configuration = GetPlatformConfigurationIfAvailable()) {
- TRACE_EVENT1("flutter", "RuntimeController::DispatchPlatformMessage",
- "mode", "basic");
+ TRACE_EVENT0("flutter", "RuntimeController::DispatchPlatformMessage");
platform_configuration->DispatchPlatformMessage(std::move(message));
return true;
}
@@ -239,8 +238,7 @@
bool RuntimeController::DispatchPointerDataPacket(
const PointerDataPacket& packet) {
if (auto* platform_configuration = GetPlatformConfigurationIfAvailable()) {
- TRACE_EVENT1("flutter", "RuntimeController::DispatchPointerDataPacket",
- "mode", "basic");
+ TRACE_EVENT0("flutter", "RuntimeController::DispatchPointerDataPacket");
platform_configuration->get_window(0)->DispatchPointerDataPacket(packet);
return true;
}
diff --git a/shell/common/animator.cc b/shell/common/animator.cc
index a668448..8da760b 100644
--- a/shell/common/animator.cc
+++ b/shell/common/animator.cc
@@ -57,16 +57,6 @@
});
}
-// This Parity is used by the timeline component to correctly align
-// GPU Workloads events with their respective Framework Workload.
-const char* Animator::FrameParity() {
- if (!frame_timings_recorder_) {
- return "even";
- }
- uint64_t frame_number = frame_timings_recorder_->GetFrameNumber();
- return (frame_number % 2) ? "even" : "odd";
-}
-
static fml::TimePoint FxlToDartOrEarlier(fml::TimePoint time) {
auto dart_now = fml::TimeDelta::FromMicroseconds(Dart_TimelineGetMicros());
fml::TimePoint fxl_now = fml::TimePoint::Now();
@@ -121,12 +111,8 @@
const fml::TimePoint frame_target_time =
frame_timings_recorder_->GetVsyncTargetTime();
dart_frame_deadline_ = FxlToDartOrEarlier(frame_target_time);
- {
- TRACE_EVENT2("flutter", "Framework Workload", "mode", "basic", "frame",
- FrameParity());
- uint64_t frame_number = frame_timings_recorder_->GetFrameNumber();
- delegate_.OnAnimatorBeginFrame(frame_target_time, frame_number);
- }
+ uint64_t frame_number = frame_timings_recorder_->GetFrameNumber();
+ delegate_.OnAnimatorBeginFrame(frame_target_time, frame_number);
if (!frame_scheduled_ && has_rendered_) {
// Under certain workloads (such as our parent view resizing us, which is
diff --git a/shell/common/animator.h b/shell/common/animator.h
index 23bf222..4acf86e 100644
--- a/shell/common/animator.h
+++ b/shell/common/animator.h
@@ -94,8 +94,6 @@
void AwaitVSync();
- const char* FrameParity();
-
// Clear |trace_flow_ids_| if |frame_scheduled_| is false.
void ScheduleMaybeClearTraceFlowIds();
diff --git a/shell/common/engine.cc b/shell/common/engine.cc
index 74fa38f..7b3589e 100644
--- a/shell/common/engine.cc
+++ b/shell/common/engine.cc
@@ -244,7 +244,6 @@
}
void Engine::BeginFrame(fml::TimePoint frame_time, uint64_t frame_number) {
- TRACE_EVENT0("flutter", "Engine::BeginFrame");
runtime_controller_->BeginFrame(frame_time, frame_number);
}
diff --git a/shell/common/pipeline.h b/shell/common/pipeline.h
index 676f7b7..44090aa 100644
--- a/shell/common/pipeline.h
+++ b/shell/common/pipeline.h
@@ -165,10 +165,7 @@
items_count = queue_.size();
}
- {
- TRACE_EVENT0("flutter", "PipelineConsume");
- consumer(std::move(resource));
- }
+ consumer(std::move(resource));
empty_.Signal();
--inflight_;
diff --git a/shell/common/rasterizer.cc b/shell/common/rasterizer.cc
index 6cfd45f..faf6214 100644
--- a/shell/common/rasterizer.cc
+++ b/shell/common/rasterizer.cc
@@ -492,7 +492,6 @@
RasterStatus Rasterizer::DrawToSurface(
FrameTimingsRecorder& frame_timings_recorder,
flutter::LayerTree& layer_tree) {
- TRACE_EVENT0("flutter", "Rasterizer::DrawToSurface");
FML_DCHECK(surface_);
RasterStatus raster_status;
@@ -517,7 +516,6 @@
RasterStatus Rasterizer::DrawToSurfaceUnsafe(
FrameTimingsRecorder& frame_timings_recorder,
flutter::LayerTree& layer_tree) {
- TRACE_EVENT0("flutter", "Rasterizer::DrawToSurfaceUnsafe");
FML_DCHECK(surface_);
compositor_context_->ui_time().SetLapTime(
@@ -629,7 +627,6 @@
FireNextFrameCallbackIfPresent();
if (surface_->GetContext()) {
- TRACE_EVENT0("flutter", "PerformDeferredSkiaCleanup");
surface_->GetContext()->performDeferredCleanup(kSkiaCleanupExpiration);
}