Commit f30f3815 authored by Camillo Bruni's avatar Camillo Bruni Committed by V8 LUCI CQ

[tools] Profview fixes

- Use consistent names: Ignition, Sparkplug, Maglev, Turbofan
- Fix parsing Sparkpliug / Baseline entries
- Fix c++filt calls for recent MacOS versions
- Do not visualise Turboprop entries anymore

Change-Id: Id8fc83c0822383d4c552c898b15c720c44b95cd7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3865309Reviewed-by: 's avatarJakob Linke <jgruber@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82822}
parent 2698ad44
...@@ -15,5 +15,5 @@ if [ "`which c++filt`" == "" ]; then ...@@ -15,5 +15,5 @@ if [ "`which c++filt`" == "" ]; then
nm "$@" nm "$@"
else else
nm "$@" | sed -n "s/\([0-9a-fA-F]\{8,16\}\) [iItT] \(.*\)/\\1 \\2/p"\ nm "$@" | sed -n "s/\([0-9a-fA-F]\{8,16\}\) [iItT] \(.*\)/\\1 \\2/p"\
| c++filt -p -i | c++filt
fi fi
...@@ -19,52 +19,56 @@ let codeKinds = [ ...@@ -19,52 +19,56 @@ let codeKinds = [
"STUB", "STUB",
"BUILTIN", "BUILTIN",
"REGEXP", "REGEXP",
"JS_OPT", "JS_IGNITION",
"JS_UNOPT", "JS_SPARKPLUG",
"JS_TURBOPROP", "JS_MAGLEV",
"JS_BASELINE", "JS_TURBOFAN",
]; ];
function resolveCodeKind(code) { function resolveCodeKind(code) {
if (!code || !code.type) { if (!code || !code.type) {
return "UNKNOWN"; return "UNKNOWN";
} else if (code.type === "CPP") { }
const type = code.type;
if (type === "CPP") {
return "CPP"; return "CPP";
} else if (code.type === "SHARED_LIB") { } else if (type === "SHARED_LIB") {
return "LIB"; return "LIB";
} else if (code.type === "CODE") { }
if (code.kind === "LoadIC" || const kind = code.kind;
code.kind === "StoreIC" || if (type === "CODE") {
code.kind === "KeyedStoreIC" || if (kind === "LoadIC" ||
code.kind === "KeyedLoadIC" || kind === "StoreIC" ||
code.kind === "LoadGlobalIC" || kind === "KeyedStoreIC" ||
code.kind === "Handler") { kind === "KeyedLoadIC" ||
kind === "LoadGlobalIC" ||
kind === "Handler") {
return "IC"; return "IC";
} else if (code.kind === "BytecodeHandler") { } else if (kind === "BytecodeHandler") {
return "BC"; return "BC";
} else if (code.kind === "Stub") { } else if (kind === "Stub") {
return "STUB"; return "STUB";
} else if (code.kind === "Builtin") { } else if (kind === "Builtin") {
return "BUILTIN"; return "BUILTIN";
} else if (code.kind === "RegExp") { } else if (kind === "RegExp") {
return "REGEXP"; return "REGEXP";
} }
console.log("Unknown CODE: '" + code.kind + "'."); console.warn("Unknown CODE: '" + kind + "'.");
return "CODE"; return "CODE";
} else if (code.type === "JS") { } else if (type === "JS") {
if (code.kind === "Builtin") { if (kind === "Builtin" || kind == "Ignition" || kind === "Unopt") {
return "JS_UNOPT"; return "JS_IGNITION";
} else if (code.kind === "Opt") { } else if (kind === "Baseline" || kind === "Sparkplug") {
return "JS_OPT"; return "JS_SPARKPLUG";
} else if (code.kind === "Unopt") { } else if (kind === "Maglev") {
return "JS_UNOPT"; return "JS_MAGLEV";
} else if (code.kind === "Baseline") { } else if (kind === "Turboprop") {
return "JS_BASELINE";
} else if (code.kind === "Turboprop") {
return "JS_TURBOPROP"; return "JS_TURBOPROP";
} else if (kind === "Opt" || kind === "Turbofan") {
return "JS_TURBOFAN";
} }
} }
console.log("Unknown code type '" + type + "'."); console.warn("Unknown code type '" + kind + "'.");
} }
function resolveCodeKindAndVmState(code, vmState) { function resolveCodeKindAndVmState(code, vmState) {
...@@ -271,10 +275,10 @@ function buildCategoryTreeAndLookup() { ...@@ -271,10 +275,10 @@ function buildCategoryTreeAndLookup() {
} }
root.children.push(n); root.children.push(n);
} }
addCategory("JS Optimized", [ "JS_OPT" ]); addCategory("JS Ignition", [ "JS_IGNITION", "BC" ]);
addCategory("JS Turboprop", [ "JS_TURBOPROP" ]); addCategory("JS Sparkplug", [ "JS_SPARKPLUG" ]);
addCategory("JS Baseline", [ "JS_BASELINE" ]); addCategory("JS Maglev", [ "JS_MAGLEV" ]);
addCategory("JS Unoptimized", [ "JS_UNOPT", "BC" ]); addCategory("JS Turbofan", [ "JS_TURBOFAN" ]);
addCategory("IC", [ "IC" ]); addCategory("IC", [ "IC" ]);
addCategory("RegExp", [ "REGEXP" ]); addCategory("RegExp", [ "REGEXP" ]);
addCategory("Other generated", [ "STUB", "BUILTIN" ]); addCategory("Other generated", [ "STUB", "BUILTIN" ]);
......
...@@ -212,29 +212,30 @@ let main = { ...@@ -212,29 +212,30 @@ let main = {
const CATEGORY_COLOR = "#f5f5f5"; const CATEGORY_COLOR = "#f5f5f5";
const bucketDescriptors = const bucketDescriptors =
[{ [
kinds: ["JS_OPT"],
color: "#64dd17",
backgroundColor: "#80e27e",
text: "JS Optimized"
},
{ {
kinds: ["JS_TURBOPROP"], kinds: ["JS_IGNITION", "BC"],
color: "#693eb8", color: "#dd2c00",
backgroundColor: "#a6c452", backgroundColor: "#ff9e80",
text: "JS Turboprop" text: "JS Ignition"
}, },
{ {
kinds: ["JS_BASELINE"], kinds: ["JS_SPARKPLUG"],
color: "#b3005b", color: "#b3005b",
backgroundColor: "#ff9e80", backgroundColor: "#ff9e80",
text: "JS Baseline" text: "JS Sparkplug"
}, },
{ {
kinds: ["JS_UNOPT", "BC"], kinds: ["JS_MAGLEV"],
color: "#dd2c00", color: "#693eb8",
backgroundColor: "#ff9e80", backgroundColor: "#d80093",
text: "JS Unoptimized" text: "JS Maglev"
},
{
kinds: ["JS_TURBOFAN"],
color: "#64dd17",
backgroundColor: "#80e27e",
text: "JS Turbofan"
}, },
{ {
kinds: ["IC"], kinds: ["IC"],
...@@ -348,14 +349,16 @@ function codeTypeToText(type) { ...@@ -348,14 +349,16 @@ function codeTypeToText(type) {
return "Builtin"; return "Builtin";
case "REGEXP": case "REGEXP":
return "RegExp"; return "RegExp";
case "JS_OPT": case "JS_IGNITION":
return "JS opt"; return "JS Ignition";
case "JS_SPARKPLUG":
return "JS Sparkplug";
case "JS_TURBOPROP": case "JS_TURBOPROP":
return "JS Turboprop"; return "JS Turboprop";
case "JS_BASELINE": case "JS_MAGLEV":
return "JS Baseline"; return "JS Maglev";
case "JS_UNOPT": case "JS_TURBOFAN":
return "JS unopt"; return "JS Turbofan";
} }
console.error("Unknown type: " + type); console.error("Unknown type: " + type);
} }
......
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