Commit c8e286c9 authored by cbruni's avatar cbruni Committed by Commit bot

[--trace-ic] Print map pointer value too

This might help with some further investigations when using the IC-Explorer.

BUG=

Review-Url: https://codereview.chromium.org/2046943003
Cr-Commit-Position: refs/heads/master@{#36821}
parent e8b10cec
......@@ -126,8 +126,12 @@ void IC::TraceIC(const char* type, Handle<Object> name, State old_state,
casted_nexus<KeyedStoreICNexus>()->GetKeyedAccessStoreMode();
modifier = GetTransitionMarkModifier(mode);
}
PrintF(" (%c->%c%s) ", TransitionMarkFromState(old_state),
TransitionMarkFromState(new_state), modifier);
void* map = nullptr;
if (!receiver_map().is_null()) {
map = reinterpret_cast<void*>(*receiver_map());
}
PrintF(" (%c->%c%s) map=%p ", TransitionMarkFromState(old_state),
TransitionMarkFromState(new_state), modifier, map);
#ifdef OBJECT_PRINT
OFStream os(stdout);
name->Print(os);
......
......@@ -51,6 +51,7 @@ code is governed by a BSD-style license that can be found in the LICENSE file.
if (parts[1] === "patching") return;
this.type = parts[0].substr(1);
this.category = "Other";
this.map = undefined;
if (this.type.indexOf("Store") !== -1) {
this.category = "Store";
} else if (this.type.indexOf("Load") !== -1) {
......@@ -69,6 +70,13 @@ 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.startsWith("map=")) {
this.map = this.map.substring(4);
offset++;
} else {
this.map = undefined;
}
if (this.type !== "CompareIC") {
// if there is no address we have a smi key
var address = parts[++offset];
......@@ -135,7 +143,6 @@ code is governed by a BSD-style license that can be found in the LICENSE file.
next = this.result.indexOf("\n", current);
if (next === -1) break;
i++;
line = this.result.substring(current, next);
current = next + 1;
entry = new Entry(i, line);
......@@ -152,7 +159,7 @@ 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'
'key', 'isNative', 'map'
]
class Group {
......@@ -209,6 +216,14 @@ code is governed by a BSD-style license that can be found in the LICENSE file.
function escapeHtml(unsafe) {
return unsafe.toString()
.replace(/&/g, "&amp;")
.replace(/</g, "&lt;")
.replace(/>/g, "&gt;")
.replace(/"/g, "&quot;")
.replace(/'/g, "&#039;");
}
function updateTable() {
var select = document.getElementById("group-key");
......@@ -248,7 +263,7 @@ code is governed by a BSD-style license that can be found in the LICENSE file.
td(tr, '<span onclick="toggleDetails(this)">details</a>', 'details');
td(tr, entry.percentage + "%", 'percentage');
td(tr, entry.count, 'count');
td(tr, entry.key, 'key');
td(tr, escapeHtml(entry.key), 'key');
fragment.appendChild(tr);
}
var omitted = entries.length - max;
......@@ -282,7 +297,7 @@ code is governed by a BSD-style license that can be found in the LICENSE file.
var group = entry.groups[key];
var div = document.createElement("div")
div.className = 'drilldown-group-title'
div.innerHTML = key + ' [top ' + max + ']';
div.innerHTML = key + ' [top ' + max + ' out of ' + group.length + ']';
var table = document.createElement("table");
display(group.slice(0, max), table, false)
div.appendChild(table);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment