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

Unified Diff: tools/ic-explorer.html

Issue 2451173002: [tools] Support more map information in --trace-ic and ic-explorer.html (Closed)
Patch Set: parenthesis to the rescue Created 4 years, 2 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 | « src/ic/ic.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/ic-explorer.html
diff --git a/tools/ic-explorer.html b/tools/ic-explorer.html
index 6e0a7fd733cf27ecb38f1d48de790287cfae4f48..02214e3ee997cea274d8ff74f6e509b25721e111 100644
--- a/tools/ic-explorer.html
+++ b/tools/ic-explorer.html
@@ -40,6 +40,11 @@ code is governed by a BSD-style license that can be found in the LICENSE file.
"use strict"
var entries = [];
+ var properties = ['type', 'category', 'file', 'filePosition', 'state',
+ 'key', 'isNative', 'map', 'propertiesMode', 'numberOfOwnProperties',
+ 'instanceType'
+ ]
+
class Entry {
constructor(id, line) {
this.id = id;
@@ -50,8 +55,11 @@ code is governed by a BSD-style license that can be found in the LICENSE file.
if (parts[0][0] !== "[") return;
if (parts[1] === "patching") return;
this.type = parts[0].substr(1);
- this.category = "Other";
- this.map = undefined;
+ this.category = "unknown";
+ this.map = "unknown";
+ this.propertiesMode = "unknown";
+ this.numberOfOwnProperties = 0;
+ this.instanceType = "unknown";
if (this.type.indexOf("Store") !== -1) {
this.category = "Store";
} else if (this.type.indexOf("Load") !== -1) {
@@ -70,13 +78,22 @@ code is governed by a BSD-style license that can be found in the LICENSE file.
var offset = this.parsePositionAndFile(parts, 2);
if (offset == -1) return
this.state = parts[++offset];
- this.map = parts[offset + 1];
- if (this.map !== undefined && this.map.startsWith("map=")) {
- this.map = this.map.substring(4);
- offset++;
- } else {
- this.map = undefined;
- }
+ var mapPart = parts[offset + 1];
+ if (mapPart !== undefined && mapPart.startsWith("map=")) {
+ if (mapPart[4] == "(") {
+ if (mapPart.endsWith(")")) {
+ this.map = mapPart.substr(5, mapPart.length-6);
+ } else {
+ this.map = mapPart.substr(5);
+ }
+ offset++;
+ offset = this.parseMapProperties(parts, offset);
+ } else {
+ this.map = mapPart.substr(4);
+ offset++;
+ }
+ if (this.map == "(nil)") this.map = "unknown";
+ }
if (this.type !== "CompareIC") {
// if there is no address we have a smi key
var address = parts[++offset];
@@ -108,6 +125,17 @@ code is governed by a BSD-style license that can be found in the LICENSE file.
this.isValid = true;
}
+ parseMapProperties(parts, offset) {
+ var next = parts[++offset];
+ if (!next.startsWith('dict')) return offset;
+ this.propertiesMode =
+ next.substr(5) == "0" ? "fast" : "slow";
+ this.numberOfOwnProperties = parts[++offset].substr(4);
+ next = parts[++offset];
+ this.instanceType = next.substr(5, next.length-6);
+ return offset;
+ }
+
parsePositionAndFile(parts, start) {
// find the position of 'at' in the parts array.
var offset = start;
@@ -157,11 +185,6 @@ code is governed by a BSD-style license that can be found in the LICENSE file.
}
-
- var properties = ['type', 'category', 'file', 'filePosition', 'state',
- 'key', 'isNative', 'map'
- ]
-
class Group {
constructor(property, key, entry) {
this.property = property;
@@ -332,10 +355,14 @@ code is governed by a BSD-style license that can be found in the LICENSE file.
select.add(option);
}
}
+
+ function handleOnLoad() {
+ document.querySelector("#uploadInput").focus();
+ }
</script>
</head>
-<body>
+<body onload="handleOnLoad()">
<h1>
<span style="color: #00FF00">I</span>
<span style="color: #FF00FF">C</span>
« no previous file with comments | « src/ic/ic.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698