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

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 1983 matching lines...) Expand 10 before | Expand all | Expand 10 after
1994 // script. Kill the whole layoutObject if someone managed to get into here in 1994 // script. Kill the whole layoutObject if someone managed to get into here in
1995 // states not allowing tree mutations. 1995 // states not allowing tree mutations.
1996 RELEASE_ASSERT(lifecycle().stateAllowsTreeMutations()); 1996 RELEASE_ASSERT(lifecycle().stateAllowsTreeMutations());
1997 1997
1998 TRACE_EVENT_BEGIN1("blink,devtools.timeline", "UpdateLayoutTree", "beginData", 1998 TRACE_EVENT_BEGIN1("blink,devtools.timeline", "UpdateLayoutTree", "beginData",
1999 InspectorRecalculateStylesEvent::data(frame())); 1999 InspectorRecalculateStylesEvent::data(frame()));
2000 2000
2001 unsigned startElementCount = styleEngine().styleForElementCount(); 2001 unsigned startElementCount = styleEngine().styleForElementCount();
2002 2002
2003 InspectorInstrumentation::willRecalculateStyle(this); 2003 InspectorInstrumentation::willRecalculateStyle(this);
2004 PerformanceMonitor::willRecalculateStyle(this);
2005 2004
2006 DocumentAnimations::updateAnimationTimingIfNeeded(*this); 2005 DocumentAnimations::updateAnimationTimingIfNeeded(*this);
2007 evaluateMediaQueryListIfNeeded(); 2006 evaluateMediaQueryListIfNeeded();
2008 updateUseShadowTreesIfNeeded(); 2007 updateUseShadowTreesIfNeeded();
2009 updateDistribution(); 2008 updateDistribution();
2010 updateActiveStyle(); 2009 updateActiveStyle();
2011 updateStyleInvalidationIfNeeded(); 2010 updateStyleInvalidationIfNeeded();
2012 2011
2013 // FIXME: We should update style on our ancestor chain before proceeding 2012 // FIXME: We should update style on our ancestor chain before proceeding
2014 // however doing so currently causes several tests to crash, as 2013 // however doing so currently causes several tests to crash, as
(...skipping 25 matching lines...) Expand all
2040 unsigned elementCount = 2039 unsigned elementCount =
2041 styleEngine().styleForElementCount() - startElementCount; 2040 styleEngine().styleForElementCount() - startElementCount;
2042 2041
2043 TRACE_EVENT_END1("blink,devtools.timeline", "UpdateLayoutTree", 2042 TRACE_EVENT_END1("blink,devtools.timeline", "UpdateLayoutTree",
2044 "elementCount", elementCount); 2043 "elementCount", elementCount);
2045 2044
2046 #if DCHECK_IS_ON() 2045 #if DCHECK_IS_ON()
2047 assertLayoutTreeUpdated(*this); 2046 assertLayoutTreeUpdated(*this);
2048 #endif 2047 #endif
2049 InspectorInstrumentation::didRecalculateStyle(this); 2048 InspectorInstrumentation::didRecalculateStyle(this);
2050 PerformanceMonitor::didRecalculateStyle(this);
2051 } 2049 }
2052 2050
2053 void Document::updateActiveStyle() { 2051 void Document::updateActiveStyle() {
2054 DCHECK(isActive()); 2052 DCHECK(isActive());
2055 DCHECK(isMainThread()); 2053 DCHECK(isMainThread());
2056 TRACE_EVENT0("blink", "Document::updateActiveStyle"); 2054 TRACE_EVENT0("blink", "Document::updateActiveStyle");
2057 styleEngine().updateActiveStyle(); 2055 styleEngine().updateActiveStyle();
2058 } 2056 }
2059 2057
2060 void Document::updateStyle() { 2058 void Document::updateStyle() {
(...skipping 4600 matching lines...) Expand 10 before | Expand all | Expand 10 after
6661 } 6659 }
6662 6660
6663 void showLiveDocumentInstances() { 6661 void showLiveDocumentInstances() {
6664 WeakDocumentSet& set = liveDocumentSet(); 6662 WeakDocumentSet& set = liveDocumentSet();
6665 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 6663 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
6666 for (blink::Document* document : set) 6664 for (blink::Document* document : set)
6667 fprintf(stderr, "- Document %p URL: %s\n", document, 6665 fprintf(stderr, "- Document %p URL: %s\n", document,
6668 document->url().getString().utf8().data()); 6666 document->url().getString().utf8().data());
6669 } 6667 }
6670 #endif 6668 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.cpp ('k') | third_party/WebKit/Source/core/frame/FrameView.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698