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

Unified Diff: cc/trees/proxy_impl.cc

Issue 2790173005: cc: Dump scheduler and tile manager state when commit is blocked. (Closed)
Patch Set: vmpstr review 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
« no previous file with comments | « cc/trees/proxy_impl.h ('k') | cc/trees/proxy_main.cc » ('j') | 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 39040a4a9f7ab5528fdf64406211dc6d94b7587b..197ac4fe44067a115db609de324ff6a63eb10d32 100644
--- a/cc/trees/proxy_impl.cc
+++ b/cc/trees/proxy_impl.cc
@@ -4,10 +4,14 @@
#include "cc/trees/proxy_impl.h"
+#include <string.h>
+
#include <algorithm>
#include <string>
#include "base/auto_reset.h"
+#include "base/debug/alias.h"
+#include "base/debug/dump_without_crashing.h"
#include "base/memory/ptr_util.h"
#include "base/trace_event/trace_event.h"
#include "base/trace_event/trace_event_argument.h"
@@ -223,6 +227,28 @@ void ProxyImpl::MainFrameWillHappenOnImplForTesting(
completion->Signal();
}
+// TODO(sunnyps): Remove this code once crbug.com/668892 is fixed.
+NOINLINE void ProxyImpl::DumpForBeginMainFrameHang() {
+ DCHECK(IsImplThread());
+ DCHECK(scheduler_);
+
+ char stack_string[20000] = "";
+ base::debug::Alias(&stack_string);
+
+ 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);
+
+ 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);
+
+ base::debug::DumpWithoutCrashing();
+}
+
void ProxyImpl::NotifyReadyToCommitOnImpl(
CompletionEvent* completion,
LayerTreeHost* layer_tree_host,
« no previous file with comments | « cc/trees/proxy_impl.h ('k') | cc/trees/proxy_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698