OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <!-- | 2 <!-- |
3 Copyright (c) 2015 The Chromium Authors. All rights reserved. | 3 Copyright (c) 2015 The Chromium Authors. All rights reserved. |
4 Use of this source code is governed by a BSD-style license that can be | 4 Use of this source code is governed by a BSD-style license that can be |
5 found in the LICENSE file. | 5 found in the LICENSE file. |
6 --> | 6 --> |
7 | 7 |
8 <link rel="import" href="/tracing/base/event.html"> | 8 <link rel="import" href="/tracing/base/event.html"> |
9 <link rel="import" href="/tracing/base/sinebow_color_generator.html"> | 9 <link rel="import" href="/tracing/base/sinebow_color_generator.html"> |
10 <link rel="import" href="/tracing/base/utils.html"> | 10 <link rel="import" href="/tracing/base/utils.html"> |
11 | 11 |
12 <script> | 12 <script> |
13 'use strict'; | 13 'use strict'; |
14 | 14 |
15 tr.exportTo('tr.e.chrome', function() { | 15 tr.exportTo('tr.e.chrome', function() { |
16 const SAME_AS_PARENT = 'same-as-parent'; | 16 const SAME_AS_PARENT = 'same-as-parent'; |
17 | 17 |
18 const TITLES_FOR_USER_FRIENDLY_CATEGORY = { | 18 const TITLES_FOR_USER_FRIENDLY_CATEGORY = { |
19 composite: [ | 19 composite: [ |
20 'CompositingInputsUpdater::update', | 20 'CompositingInputsUpdater::update', |
21 'ThreadProxy::SetNeedsUpdateLayers', | 21 'ThreadProxy::SetNeedsUpdateLayers', |
22 'LayerTreeHost::UpdateLayers::CalcDrawProps', | 22 'LayerTreeHost::UpdateLayers::CalcDrawProps', |
23 'UpdateLayerTree' | 23 'UpdateLayerTree', |
24 ], | 24 ], |
25 | 25 |
26 gc: [ | 26 gc: [ |
27 'minorGC', | 27 'minorGC', |
28 'majorGC', | 28 'majorGC', |
29 'MajorGC', | 29 'MajorGC', |
30 'MinorGC', | 30 'MinorGC', |
31 'V8.GCScavenger', | 31 'V8.GCScavenger', |
32 'V8.GCIncrementalMarking', | 32 'V8.GCIncrementalMarking', |
33 'V8.GCIdleNotification', | 33 'V8.GCIdleNotification', |
34 'V8.GCContext', | 34 'V8.GCContext', |
35 'V8.GCCompactor', | 35 'V8.GCCompactor', |
36 'V8GCController::traceDOMWrappers' | 36 'V8GCController::traceDOMWrappers', |
37 ], | 37 ], |
38 | 38 |
39 iframe_creation: [ | 39 iframe_creation: [ |
40 'WebLocalFrameImpl::createChildframe' | 40 'WebLocalFrameImpl::createChildframe', |
41 ], | 41 ], |
42 | 42 |
43 imageDecode: [ | 43 imageDecode: [ |
44 'Decode Image', | 44 'Decode Image', |
45 'ImageFrameGenerator::decode', | 45 'ImageFrameGenerator::decode', |
46 'ImageFrameGenerator::decodeAndScale' | 46 'ImageFrameGenerator::decodeAndScale', |
| 47 'ImageResourceContent::updateImage', |
47 ], | 48 ], |
48 | 49 |
49 input: [ | 50 input: [ |
50 'HitTest', | 51 'HitTest', |
51 'ScrollableArea::scrollPositionChanged', | 52 'ScrollableArea::scrollPositionChanged', |
52 'EventHandler::handleMouseMoveEvent' | 53 'EventHandler::handleMouseMoveEvent', |
53 ], | 54 ], |
54 | 55 |
55 layout: [ | 56 layout: [ |
| 57 'DisplayItemList::Finalize', |
| 58 'IntersectionObserverController::computeTrackedIntersectionObservations', |
| 59 'LocalFrameView::invalidateTree', |
| 60 'LocalFrameView::layout', |
| 61 'LocalFrameView::performLayout', |
| 62 'LocalFrameView::performPostLayoutTasks', |
| 63 'LocalFrameView::performPreLayoutTasks', |
56 'FrameView::invalidateTree', | 64 'FrameView::invalidateTree', |
57 'FrameView::layout', | 65 'FrameView::layout', |
58 'FrameView::performLayout', | 66 'FrameView::performLayout', |
59 'FrameView::performPostLayoutTasks', | 67 'FrameView::performPostLayoutTasks', |
60 'FrameView::performPreLayoutTasks', | 68 'FrameView::performPreLayoutTasks', |
61 'Layer::updateLayerPositionsAfterLayout', | 69 'Layer::updateLayerPositionsAfterLayout', |
| 70 'LayerTreeHostInProcess::UpdateLayers::BuildPropertyTrees', |
62 'Layout', | 71 'Layout', |
63 'LayoutView::hitTest', | 72 'LayoutView::hitTest', |
| 73 'PaintLayer::updateLayerPositionsAfterLayout', |
64 'ResourceLoadPriorityOptimizer::updateAllImageResourcePriorities', | 74 'ResourceLoadPriorityOptimizer::updateAllImageResourcePriorities', |
65 'WebViewImpl::layout' | 75 'WebViewImpl::layout', |
66 ], | 76 ], |
67 | 77 |
68 parseHTML: [ | 78 parseHTML: [ |
69 'ParseHTML', | 79 'BackgroundHTMLParser::pumpTokenizer', |
| 80 'BackgroundHTMLParser::sendTokensToMainThread', |
70 'HTMLDocumentParser::didReceiveParsedChunkFromBackgroundParser', | 81 'HTMLDocumentParser::didReceiveParsedChunkFromBackgroundParser', |
| 82 'HTMLDocumentParser::documentElementAvailable', |
| 83 'HTMLDocumentParser::notifyPendingTokenizedChunks', |
71 'HTMLDocumentParser::processParsedChunkFromBackgroundParser', | 84 'HTMLDocumentParser::processParsedChunkFromBackgroundParser', |
72 'HTMLDocumentParser::processTokenizedChunkFromBackgroundParser', | 85 'HTMLDocumentParser::processTokenizedChunkFromBackgroundParser', |
| 86 'ParseHTML', |
73 ], | 87 ], |
74 | 88 |
75 raster: [ | 89 raster: [ |
76 'DisplayListRasterSource::PerformSolidColorAnalysis', | 90 'DisplayListRasterSource::PerformSolidColorAnalysis', |
77 'Picture::Raster', | 91 'Picture::Raster', |
78 'RasterBufferImpl::Playback', | 92 'RasterBufferImpl::Playback', |
79 'RasterTask', | 93 'RasterTask', |
80 'RasterizerTaskImpl::RunOnWorkerThread', | 94 'RasterizerTaskImpl::RunOnWorkerThread', |
81 'SkCanvas::drawImageRect()', | 95 'SkCanvas::drawImageRect()', |
82 'SkCanvas::drawPicture()', | 96 'SkCanvas::drawPicture()', |
83 'SkCanvas::drawTextBlob()', | 97 'SkCanvas::drawTextBlob()', |
84 'TileTaskWorkerPool::PlaybackToMemory' | 98 'TileTaskWorkerPool::PlaybackToMemory', |
85 ], | 99 ], |
86 | 100 |
87 record: [ | 101 record: [ |
| 102 'Canvas2DLayerBridge::flushRecordingOnly', |
| 103 'CompositingRequirementsUpdater::updateRecursive', |
88 'ContentLayerDelegate::paintContents', | 104 'ContentLayerDelegate::paintContents', |
89 'DeprecatedPaintLayerCompositor::updateIfNeededRecursive', | 105 'DeprecatedPaintLayerCompositor::updateIfNeededRecursive', |
90 'DeprecatedPaintLayerCompositor::updateLayerPositionsAfterLayout', | 106 'DeprecatedPaintLayerCompositor::updateLayerPositionsAfterLayout', |
| 107 'LocalFrameView::paintTree', |
| 108 'LocalFrameView::prePaint', |
91 'Paint', | 109 'Paint', |
| 110 'PaintController::commitNewDisplayItems', |
| 111 'PaintLayerCompositor::updateIfNeededRecursive', |
92 'Picture::Record', | 112 'Picture::Record', |
93 'PictureLayer::Update', | 113 'PictureLayer::Update', |
94 'RenderLayer::updateLayerPositionsAfterLayout' | 114 'RenderLayer::updateLayerPositionsAfterLayout', |
95 ], | 115 ], |
96 | 116 |
97 style: [ | 117 style: [ |
98 'CSSParserImpl::parseStyleSheet.parse', | 118 'CSSParserImpl::parseStyleSheet.parse', |
99 'CSSParserImpl::parseStyleSheet.tokenize', | 119 'CSSParserImpl::parseStyleSheet.tokenize', |
| 120 'Document::rebuildLayoutTree', |
| 121 'Document::recalcStyle', |
| 122 'Document::updateActiveStyle', |
100 'Document::updateStyle', | 123 'Document::updateStyle', |
101 'Document::updateStyleInvalidationIfNeeded', | 124 'Document::updateStyleInvalidationIfNeeded', |
| 125 'LocalFrameView::updateStyleAndLayoutIfNeededRecursive', |
102 'ParseAuthorStyleSheet', | 126 'ParseAuthorStyleSheet', |
103 'RuleSet::addRulesFromSheet', | 127 'RuleSet::addRulesFromSheet', |
104 'StyleElement::processStyleSheet', | 128 'StyleElement::processStyleSheet', |
105 'StyleEngine::createResolver', | 129 'StyleEngine::createResolver', |
| 130 'StyleEngine::updateActiveStyleSheets', |
106 'StyleSheetContents::parseAuthorStyleSheet', | 131 'StyleSheetContents::parseAuthorStyleSheet', |
107 'UpdateLayoutTree' | 132 'UpdateLayoutTree', |
108 ], | 133 ], |
109 | 134 |
110 script_parse_and_compile: [ | 135 script_parse_and_compile: [ |
| 136 'V8.CompileFullCode', |
| 137 'V8.NewContext', |
| 138 'V8.Parse', |
| 139 'V8.ParseLazy', |
| 140 'V8.RecompileSynchronous', |
| 141 'V8.ScriptCompiler', |
| 142 'v8.compile', |
111 'v8.parseOnBackground', | 143 'v8.parseOnBackground', |
112 'V8.ScriptCompiler' | |
113 ], | 144 ], |
114 | 145 |
115 script_execute: [ | 146 script_execute: [ |
| 147 'EvaluateScript', |
| 148 'FunctionCall', |
| 149 'HTMLParserScriptRunner ExecuteScript', |
116 'V8.Execute', | 150 'V8.Execute', |
117 'WindowProxy::initialize' | 151 'V8.RunMicrotasks', |
| 152 'V8.Task', |
| 153 'WindowProxy::initialize', |
| 154 'v8.callFunction', |
| 155 'v8.run', |
118 ], | 156 ], |
119 | 157 |
120 resource_loading: [ | 158 resource_loading: [ |
| 159 'RenderFrameImpl::didFinishDocumentLoad', |
| 160 'RenderFrameImpl::didFinishLoad', |
| 161 'Resource::appendData', |
| 162 'ResourceDispatcher::OnReceivedData', |
| 163 'ResourceDispatcher::OnReceivedResponse', |
| 164 'ResourceDispatcher::OnRequestComplete', |
121 'ResourceFetcher::requestResource', | 165 'ResourceFetcher::requestResource', |
122 'ResourceDispatcher::OnReceivedData', | 166 'WebURLLoaderImpl::Context::Cancel', |
123 'ResourceDispatcher::OnRequestComplete', | 167 'WebURLLoaderImpl::Context::OnCompletedRequest', |
124 'ResourceDispatcher::OnReceivedResponse', | 168 'WebURLLoaderImpl::Context::OnReceivedData', |
125 'Resource::appendData' | 169 'WebURLLoaderImpl::Context::OnReceivedRedirect', |
| 170 'WebURLLoaderImpl::Context::OnReceivedResponse', |
| 171 'WebURLLoaderImpl::Context::Start', |
| 172 'WebURLLoaderImpl::loadAsynchronously', |
| 173 'WebURLLoaderImpl::loadSynchronously', |
| 174 'content::mojom::URLLoaderClient', |
126 ], | 175 ], |
127 | 176 |
128 // Where do these go? | 177 // Where do these go? |
129 renderer_misc: [ | 178 renderer_misc: [ |
130 'DecodeFont', | 179 'DecodeFont', |
131 'ThreadState::completeSweep' // blink_gc | 180 'ThreadState::completeSweep', // blink_gc |
132 ], | 181 ], |
133 | 182 |
134 // TODO(fmeawad): https://github.com/catapult-project/catapult/issues/2572 | 183 // TODO(fmeawad): https://github.com/catapult-project/catapult/issues/2572 |
135 v8_runtime: [ | 184 v8_runtime: [ |
136 // Dynamically populated. | 185 // Dynamically populated. |
137 ], | 186 ], |
138 | 187 |
139 [SAME_AS_PARENT]: [ | 188 [SAME_AS_PARENT]: [ |
140 'SyncChannel::Send' | 189 'SyncChannel::Send', |
141 ] | 190 ] |
142 }; | 191 }; |
143 | 192 |
144 const COLOR_FOR_USER_FRIENDLY_CATEGORY = new tr.b.SinebowColorGenerator(); | 193 const COLOR_FOR_USER_FRIENDLY_CATEGORY = new tr.b.SinebowColorGenerator(); |
145 const USER_FRIENDLY_CATEGORY_FOR_TITLE = new Map(); | 194 const USER_FRIENDLY_CATEGORY_FOR_TITLE = new Map(); |
146 | 195 |
147 for (const category in TITLES_FOR_USER_FRIENDLY_CATEGORY) { | 196 for (const category in TITLES_FOR_USER_FRIENDLY_CATEGORY) { |
148 TITLES_FOR_USER_FRIENDLY_CATEGORY[category].forEach(function(title) { | 197 TITLES_FOR_USER_FRIENDLY_CATEGORY[category].forEach(function(title) { |
149 USER_FRIENDLY_CATEGORY_FOR_TITLE.set(title, category); | 198 USER_FRIENDLY_CATEGORY_FOR_TITLE.set(title, category); |
150 }); | 199 }); |
151 } | 200 } |
152 | 201 |
153 // keys: event.category part | 202 // keys: event.category part |
154 // values: user friendly category | 203 // values: user friendly category |
155 const USER_FRIENDLY_CATEGORY_FOR_EVENT_CATEGORY = { | 204 const USER_FRIENDLY_CATEGORY_FOR_EVENT_CATEGORY = { |
156 netlog: 'net', | 205 netlog: 'net', |
157 overhead: 'overhead', | 206 overhead: 'overhead', |
158 startup: 'startup', | 207 startup: 'startup', |
159 gpu: 'gpu' | 208 gpu: 'gpu', |
160 }; | 209 }; |
161 | 210 |
162 function ChromeUserFriendlyCategoryDriver() { | 211 function ChromeUserFriendlyCategoryDriver() { |
163 } | 212 } |
164 | 213 |
165 ChromeUserFriendlyCategoryDriver.fromEvent = function(event) { | 214 ChromeUserFriendlyCategoryDriver.fromEvent = function(event) { |
166 let userFriendlyCategory = | 215 let userFriendlyCategory = |
167 USER_FRIENDLY_CATEGORY_FOR_TITLE.get(event.title); | 216 USER_FRIENDLY_CATEGORY_FOR_TITLE.get(event.title); |
168 if (userFriendlyCategory) { | 217 if (userFriendlyCategory) { |
169 if (userFriendlyCategory === SAME_AS_PARENT) { | 218 if (userFriendlyCategory === SAME_AS_PARENT) { |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 // order. | 256 // order. |
208 for (const category of ChromeUserFriendlyCategoryDriver.ALL_TITLES) { | 257 for (const category of ChromeUserFriendlyCategoryDriver.ALL_TITLES) { |
209 ChromeUserFriendlyCategoryDriver.getColor(category); | 258 ChromeUserFriendlyCategoryDriver.getColor(category); |
210 } | 259 } |
211 | 260 |
212 return { | 261 return { |
213 ChromeUserFriendlyCategoryDriver, | 262 ChromeUserFriendlyCategoryDriver, |
214 }; | 263 }; |
215 }); | 264 }); |
216 </script> | 265 </script> |
OLD | NEW |