Commit 27868813 authored by mvstanton's avatar mvstanton Committed by Commit bot

[Ic-Processor] Let us know if an IC is in opt. or unopt. code.

Traditionally, we had a prefix for a function name of "~" for
unoptimized code and "*" for optimized code. Restore this prefix
in v8/tools/ic-processor. It's really cool to know if an IC was
called from optimized code (often a hint of poor performance!).

NOTRY=true
R=cbruni@chromium.org

Review-Url: https://codereview.chromium.org/2835923004
Cr-Commit-Position: refs/heads/master@{#44846}
parent fc6d4a1f
......@@ -168,7 +168,7 @@ IcProcessor.prototype.formatName = function(entry) {
var re = /(.*):[0-9]+:[0-9]+$/;
var array = re.exec(name);
if (!array) return name;
return array[1];
return entry.getState() + array[1];
}
IcProcessor.prototype.processPropertyIC = function (
......
......@@ -508,12 +508,19 @@ Profile.DynamicFuncCodeEntry = function(size, type, func, state) {
Profile.DynamicFuncCodeEntry.STATE_PREFIX = ["", "~", "*"];
/**
* Returns state.
*/
Profile.DynamicFuncCodeEntry.prototype.getState = function() {
return Profile.DynamicFuncCodeEntry.STATE_PREFIX[this.state];
};
/**
* Returns node name.
*/
Profile.DynamicFuncCodeEntry.prototype.getName = function() {
var name = this.func.getName();
return this.type + ': ' + Profile.DynamicFuncCodeEntry.STATE_PREFIX[this.state] + name;
return this.type + ': ' + this.getState() + name;
};
......
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