Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4878)

Unified Diff: cc/trees/proxy_impl.cc

Issue 2819723002: cc: Add more info to the BeginMainFrame dump. (Closed)
Patch Set: more tracing Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« cc/scheduler/begin_frame_source.cc ('K') | « cc/tiles/tile_manager.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/proxy_impl.cc
diff --git a/cc/trees/proxy_impl.cc b/cc/trees/proxy_impl.cc
index 197ac4fe44067a115db609de324ff6a63eb10d32..9ae42661e286bbcb00df6497dcdb6ce007e8aee2 100644
--- a/cc/trees/proxy_impl.cc
+++ b/cc/trees/proxy_impl.cc
@@ -232,19 +232,26 @@ NOINLINE void ProxyImpl::DumpForBeginMainFrameHang() {
DCHECK(IsImplThread());
DCHECK(scheduler_);
- char stack_string[20000] = "";
- base::debug::Alias(&stack_string);
+ auto state = base::MakeUnique<base::trace_event::TracedValue>();
+
+ state->SetBoolean("commit_completion_waits_for_activation",
+ commit_completion_waits_for_activation_);
+ state->SetBoolean("commit_completion_event", !!commit_completion_event_);
+ state->SetBoolean("activation_completion_event",
+ !!activation_completion_event_);
- std::unique_ptr<base::trace_event::ConvertableToTraceFormat> scheduler_state =
- scheduler_->AsValue();
- strncat(stack_string, scheduler_state->ToString().c_str(),
- arraysize(stack_string) - strlen(stack_string) - 1);
+ state->BeginDictionary("scheduler_state");
+ scheduler_->AsValueInto(state.get());
+ state->EndDictionary();
- std::unique_ptr<base::trace_event::ConvertableToTraceFormat>
- tile_manager_state =
- layer_tree_host_impl_->tile_manager()->ActivationStateAsValue();
- strncat(stack_string, tile_manager_state->ToString().c_str(),
- arraysize(stack_string) - strlen(stack_string) - 1);
+ state->BeginDictionary("tile_manager_state");
+ layer_tree_host_impl_->tile_manager()->ActivationStateAsValueInto(
+ state.get());
+ state->EndDictionary();
+
+ char stack_string[50000] = "";
+ base::debug::Alias(&stack_string);
+ strncpy(stack_string, state->ToString().c_str(), arraysize(stack_string) - 1);
base::debug::DumpWithoutCrashing();
}
« cc/scheduler/begin_frame_source.cc ('K') | « cc/tiles/tile_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698