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

Side by Side Diff: third_party/WebKit/Source/core/dom/Document.cpp

Issue 2713553010: Migrate performance monitor to inspector instrumentation. (Closed)
Patch Set: Introduce progress monitor Created 3 years, 9 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All
7 * rights reserved. 7 * rights reserved.
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved.
9 * (http://www.torchmobile.com/) 9 * (http://www.torchmobile.com/)
10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. 10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved.
(...skipping 1979 matching lines...) Expand 10 before | Expand all | Expand 10 after
1990 // script. Kill the whole layoutObject if someone managed to get into here in 1990 // script. Kill the whole layoutObject if someone managed to get into here in
1991 // states not allowing tree mutations. 1991 // states not allowing tree mutations.
1992 RELEASE_ASSERT(lifecycle().stateAllowsTreeMutations()); 1992 RELEASE_ASSERT(lifecycle().stateAllowsTreeMutations());
1993 1993
1994 TRACE_EVENT_BEGIN1("blink,devtools.timeline", "UpdateLayoutTree", "beginData", 1994 TRACE_EVENT_BEGIN1("blink,devtools.timeline", "UpdateLayoutTree", "beginData",
1995 InspectorRecalculateStylesEvent::data(frame())); 1995 InspectorRecalculateStylesEvent::data(frame()));
1996 1996
1997 unsigned startElementCount = styleEngine().styleForElementCount(); 1997 unsigned startElementCount = styleEngine().styleForElementCount();
1998 1998
1999 InspectorInstrumentation::willRecalculateStyle(this); 1999 InspectorInstrumentation::willRecalculateStyle(this);
2000 PerformanceMonitor::willRecalculateStyle(this);
2001 2000
2002 DocumentAnimations::updateAnimationTimingIfNeeded(*this); 2001 DocumentAnimations::updateAnimationTimingIfNeeded(*this);
2003 evaluateMediaQueryListIfNeeded(); 2002 evaluateMediaQueryListIfNeeded();
2004 updateUseShadowTreesIfNeeded(); 2003 updateUseShadowTreesIfNeeded();
2005 updateDistribution(); 2004 updateDistribution();
2006 updateActiveStyle(); 2005 updateActiveStyle();
2007 updateStyleInvalidationIfNeeded(); 2006 updateStyleInvalidationIfNeeded();
2008 2007
2009 // FIXME: We should update style on our ancestor chain before proceeding 2008 // FIXME: We should update style on our ancestor chain before proceeding
2010 // however doing so currently causes several tests to crash, as 2009 // however doing so currently causes several tests to crash, as
(...skipping 25 matching lines...) Expand all
2036 unsigned elementCount = 2035 unsigned elementCount =
2037 styleEngine().styleForElementCount() - startElementCount; 2036 styleEngine().styleForElementCount() - startElementCount;
2038 2037
2039 TRACE_EVENT_END1("blink,devtools.timeline", "UpdateLayoutTree", 2038 TRACE_EVENT_END1("blink,devtools.timeline", "UpdateLayoutTree",
2040 "elementCount", elementCount); 2039 "elementCount", elementCount);
2041 2040
2042 #if DCHECK_IS_ON() 2041 #if DCHECK_IS_ON()
2043 assertLayoutTreeUpdated(*this); 2042 assertLayoutTreeUpdated(*this);
2044 #endif 2043 #endif
2045 InspectorInstrumentation::didRecalculateStyle(this); 2044 InspectorInstrumentation::didRecalculateStyle(this);
2046 PerformanceMonitor::didRecalculateStyle(this);
2047 } 2045 }
2048 2046
2049 void Document::updateActiveStyle() { 2047 void Document::updateActiveStyle() {
2050 DCHECK(isActive()); 2048 DCHECK(isActive());
2051 DCHECK(isMainThread()); 2049 DCHECK(isMainThread());
2052 TRACE_EVENT0("blink", "Document::updateActiveStyle"); 2050 TRACE_EVENT0("blink", "Document::updateActiveStyle");
2053 styleEngine().updateActiveStyle(); 2051 styleEngine().updateActiveStyle();
2054 } 2052 }
2055 2053
2056 void Document::updateStyle() { 2054 void Document::updateStyle() {
(...skipping 4595 matching lines...) Expand 10 before | Expand all | Expand 10 after
6652 } 6650 }
6653 6651
6654 void showLiveDocumentInstances() { 6652 void showLiveDocumentInstances() {
6655 WeakDocumentSet& set = liveDocumentSet(); 6653 WeakDocumentSet& set = liveDocumentSet();
6656 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 6654 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
6657 for (blink::Document* document : set) 6655 for (blink::Document* document : set)
6658 fprintf(stderr, "- Document %p URL: %s\n", document, 6656 fprintf(stderr, "- Document %p URL: %s\n", document,
6659 document->url().getString().utf8().data()); 6657 document->url().getString().utf8().data());
6660 } 6658 }
6661 #endif 6659 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698