OLD | NEW |
1 <html> | 1 <html> |
2 <!-- | 2 <!-- |
3 Copyright 2016 the V8 project authors. All rights reserved. Use of this source | 3 Copyright 2016 the V8 project authors. All rights reserved. Use of this source |
4 code is governed by a BSD-style license that can be found in the LICENSE file. | 4 code is governed by a BSD-style license that can be found in the LICENSE file. |
5 --> | 5 --> |
6 | 6 |
7 <head> | 7 <head> |
8 <style> | 8 <style> |
9 .entry-details {} | 9 .entry-details {} |
10 | 10 |
(...skipping 22 matching lines...) Expand all Loading... |
33 | 33 |
34 .drilldown-group-title { | 34 .drilldown-group-title { |
35 font-weight: bold; | 35 font-weight: bold; |
36 padding: 0.5em 0 0.2em 0; | 36 padding: 0.5em 0 0.2em 0; |
37 } | 37 } |
38 </style> | 38 </style> |
39 <script> | 39 <script> |
40 "use strict" | 40 "use strict" |
41 var entries = []; | 41 var entries = []; |
42 | 42 |
| 43 var properties = ['type', 'category', 'file', 'filePosition', 'state', |
| 44 'key', 'isNative', 'map', 'propertiesMode', 'numberOfOwnProperties', |
| 45 'instanceType' |
| 46 ] |
| 47 |
43 class Entry { | 48 class Entry { |
44 constructor(id, line) { | 49 constructor(id, line) { |
45 this.id = id; | 50 this.id = id; |
46 this.line = line; | 51 this.line = line; |
47 var parts = line.split(" "); | 52 var parts = line.split(" "); |
48 if (parts.length < 6) return | 53 if (parts.length < 6) return |
49 this.isValid = false; | 54 this.isValid = false; |
50 if (parts[0][0] !== "[") return; | 55 if (parts[0][0] !== "[") return; |
51 if (parts[1] === "patching") return; | 56 if (parts[1] === "patching") return; |
52 this.type = parts[0].substr(1); | 57 this.type = parts[0].substr(1); |
53 this.category = "Other"; | 58 this.category = "unknown"; |
54 this.map = undefined; | 59 this.map = "unknown"; |
| 60 this.propertiesMode = "unknown"; |
| 61 this.numberOfOwnProperties = 0; |
| 62 this.instanceType = "unknown"; |
55 if (this.type.indexOf("Store") !== -1) { | 63 if (this.type.indexOf("Store") !== -1) { |
56 this.category = "Store"; | 64 this.category = "Store"; |
57 } else if (this.type.indexOf("Load") !== -1) { | 65 } else if (this.type.indexOf("Load") !== -1) { |
58 this.category = "Load"; | 66 this.category = "Load"; |
59 } | 67 } |
60 if (this.type.length == 0) return; | 68 if (this.type.length == 0) return; |
61 if (this.type.indexOf('BinaryOpIC(') === 0) { | 69 if (this.type.indexOf('BinaryOpIC(') === 0) { |
62 this.type = "BinaryOpIC"; | 70 this.type = "BinaryOpIC"; |
63 var split = parts[0].split('('); | 71 var split = parts[0].split('('); |
64 this.state = "(" + split[1] + " => " + parts[2]; | 72 this.state = "(" + split[1] + " => " + parts[2]; |
65 var offset = this.parsePositionAndFile(parts, 6); | 73 var offset = this.parsePositionAndFile(parts, 6); |
66 if (offset == -1) return | 74 if (offset == -1) return |
67 if (this.file === undefined) return | 75 if (this.file === undefined) return |
68 this.file = this.file.slice(0, -1); | 76 this.file = this.file.slice(0, -1); |
69 } else { | 77 } else { |
70 var offset = this.parsePositionAndFile(parts, 2); | 78 var offset = this.parsePositionAndFile(parts, 2); |
71 if (offset == -1) return | 79 if (offset == -1) return |
72 this.state = parts[++offset]; | 80 this.state = parts[++offset]; |
73 this.map = parts[offset + 1]; | 81 var mapPart = parts[offset + 1]; |
74 if (this.map !== undefined && this.map.startsWith("map=")) { | 82 if (mapPart !== undefined && mapPart.startsWith("map=")) { |
75 this.map = this.map.substring(4); | 83 if (mapPart[4] == "(") { |
76 offset++; | 84 if (mapPart.endsWith(")")) { |
77 } else { | 85 this.map = mapPart.substr(5, mapPart.length-6); |
78 this.map = undefined; | 86 } else { |
79 } | 87 this.map = mapPart.substr(5); |
| 88 } |
| 89 offset++; |
| 90 offset = this.parseMapProperties(parts, offset); |
| 91 } else { |
| 92 this.map = mapPart.substr(4); |
| 93 offset++; |
| 94 } |
| 95 if (this.map == "(nil)") this.map = "unknown"; |
| 96 } |
80 if (this.type !== "CompareIC") { | 97 if (this.type !== "CompareIC") { |
81 // if there is no address we have a smi key | 98 // if there is no address we have a smi key |
82 var address = parts[++offset]; | 99 var address = parts[++offset]; |
83 if (address !== undefined && address.indexOf("0x") === 0) { | 100 if (address !== undefined && address.indexOf("0x") === 0) { |
84 this.key = parts.slice(++offset).join(" "); | 101 this.key = parts.slice(++offset).join(" "); |
85 } else { | 102 } else { |
86 this.key = address; | 103 this.key = address; |
87 } | 104 } |
88 } | 105 } |
89 } | 106 } |
(...skipping 11 matching lines...) Expand all Loading... |
101 } else if (this.key.endsWith("]")) { | 118 } else if (this.key.endsWith("]")) { |
102 this.key = this.key.slice(0, -1); | 119 this.key = this.key.slice(0, -1); |
103 } | 120 } |
104 if (isStringKey) { | 121 if (isStringKey) { |
105 this.key = this.key + "\""; | 122 this.key = this.key + "\""; |
106 } | 123 } |
107 } | 124 } |
108 this.isValid = true; | 125 this.isValid = true; |
109 } | 126 } |
110 | 127 |
| 128 parseMapProperties(parts, offset) { |
| 129 var next = parts[++offset]; |
| 130 if (!next.startsWith('dict')) return offset; |
| 131 this.propertiesMode = |
| 132 next.substr(5) == "0" ? "fast" : "slow"; |
| 133 this.numberOfOwnProperties = parts[++offset].substr(4); |
| 134 next = parts[++offset]; |
| 135 this.instanceType = next.substr(5, next.length-6); |
| 136 return offset; |
| 137 } |
| 138 |
111 parsePositionAndFile(parts, start) { | 139 parsePositionAndFile(parts, start) { |
112 // find the position of 'at' in the parts array. | 140 // find the position of 'at' in the parts array. |
113 var offset = start; | 141 var offset = start; |
114 for (var i = start + 1; i < parts.length; i++) { | 142 for (var i = start + 1; i < parts.length; i++) { |
115 offset++; | 143 offset++; |
116 if (parts[i] == 'at') break; | 144 if (parts[i] == 'at') break; |
117 } | 145 } |
118 if (parts[offset] !== 'at') return -1; | 146 if (parts[offset] !== 'at') return -1; |
119 this.position = parts.slice(start, offset).join(' '); | 147 this.position = parts.slice(start, offset).join(' '); |
120 offset += 1; | 148 offset += 1; |
(...skipping 29 matching lines...) Expand all Loading... |
150 } | 178 } |
151 | 179 |
152 document.getElementById("count").innerHTML = i; | 180 document.getElementById("count").innerHTML = i; |
153 updateTable(); | 181 updateTable(); |
154 } | 182 } |
155 reader.readAsText(file); | 183 reader.readAsText(file); |
156 initGroupKeySelect(); | 184 initGroupKeySelect(); |
157 } | 185 } |
158 | 186 |
159 | 187 |
160 | |
161 var properties = ['type', 'category', 'file', 'filePosition', 'state', | |
162 'key', 'isNative', 'map' | |
163 ] | |
164 | |
165 class Group { | 188 class Group { |
166 constructor(property, key, entry) { | 189 constructor(property, key, entry) { |
167 this.property = property; | 190 this.property = property; |
168 this.key = key; | 191 this.key = key; |
169 this.count = 1; | 192 this.count = 1; |
170 this.entries = [entry]; | 193 this.entries = [entry]; |
171 this.percentage = undefined; | 194 this.percentage = undefined; |
172 this.groups = undefined; | 195 this.groups = undefined; |
173 } | 196 } |
174 | 197 |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 } | 348 } |
326 | 349 |
327 function initGroupKeySelect() { | 350 function initGroupKeySelect() { |
328 var select = document.getElementById("group-key"); | 351 var select = document.getElementById("group-key"); |
329 for (var i in properties) { | 352 for (var i in properties) { |
330 var option = document.createElement("option"); | 353 var option = document.createElement("option"); |
331 option.text = properties[i]; | 354 option.text = properties[i]; |
332 select.add(option); | 355 select.add(option); |
333 } | 356 } |
334 } | 357 } |
| 358 |
| 359 function handleOnLoad() { |
| 360 document.querySelector("#uploadInput").focus(); |
| 361 } |
335 </script> | 362 </script> |
336 </head> | 363 </head> |
337 | 364 |
338 <body> | 365 <body onload="handleOnLoad()"> |
339 <h1> | 366 <h1> |
340 <span style="color: #00FF00">I</span> | 367 <span style="color: #00FF00">I</span> |
341 <span style="color: #FF00FF">C</span> | 368 <span style="color: #FF00FF">C</span> |
342 <span style="color: #00FFFF">E</span> | 369 <span style="color: #00FFFF">E</span> |
343 </h1> Your IC-Explorer. | 370 </h1> Your IC-Explorer. |
344 | 371 |
345 <div id="legend" style="padding-right: 200px"> | 372 <div id="legend" style="padding-right: 200px"> |
346 <div style="float:right; border-style: solid; border-width: 1px; padding:20
px"> | 373 <div style="float:right; border-style: solid; border-width: 1px; padding:20
px"> |
347 0 uninitialized<br> | 374 0 uninitialized<br> |
348 . premonomorphic<br> | 375 . premonomorphic<br> |
(...skipping 21 matching lines...) Expand all Loading... |
370 </p> | 397 </p> |
371 <p> | 398 <p> |
372 <table id="table" width="100%"> | 399 <table id="table" width="100%"> |
373 <tbody id="table-body"> | 400 <tbody id="table-body"> |
374 </tbody> | 401 </tbody> |
375 </table> | 402 </table> |
376 </p> | 403 </p> |
377 </body> | 404 </body> |
378 | 405 |
379 </html> | 406 </html> |
OLD | NEW |