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
nm "$@"
else
nm "$@" | sed -n "s/\([0-9a-fA-F]\{8,16\}\) [iItT] \(.*\)/\\1 \\2/p"\
| c++filt -p -i
| c++filt
fi
......@@ -19,52 +19,56 @@ let codeKinds = [
"STUB",
"BUILTIN",
"REGEXP",
"JS_OPT",
"JS_UNOPT",
"JS_TURBOPROP",
"JS_BASELINE",
"JS_IGNITION",
"JS_SPARKPLUG",
"JS_MAGLEV",
"JS_TURBOFAN",
];
function resolveCodeKind(code) {
if (!code || !code.type) {
return "UNKNOWN";
} else if (code.type === "CPP") {
}
const type = code.type;
if (type === "CPP") {
return "CPP";
} else if (code.type === "SHARED_LIB") {
} else if (type === "SHARED_LIB") {
return "LIB";
} else if (code.type === "CODE") {
if (code.kind === "LoadIC" ||
code.kind === "StoreIC" ||
code.kind === "KeyedStoreIC" ||
code.kind === "KeyedLoadIC" ||
code.kind === "LoadGlobalIC" ||
code.kind === "Handler") {
}
const kind = code.kind;
if (type === "CODE") {
if (kind === "LoadIC" ||
kind === "StoreIC" ||
kind === "KeyedStoreIC" ||
kind === "KeyedLoadIC" ||
kind === "LoadGlobalIC" ||
kind === "Handler") {
return "IC";
} else if (code.kind === "BytecodeHandler") {
} else if (kind === "BytecodeHandler") {
return "BC";
} else if (code.kind === "Stub") {
} else if (kind === "Stub") {
return "STUB";
} else if (code.kind === "Builtin") {
} else if (kind === "Builtin") {
return "BUILTIN";
} else if (code.kind === "RegExp") {
} else if (kind === "RegExp") {
return "REGEXP";
}
console.log("Unknown CODE: '" + code.kind + "'.");
console.warn("Unknown CODE: '" + kind + "'.");
return "CODE";
} else if (code.type === "JS") {
if (code.kind === "Builtin") {
return "JS_UNOPT";
} else if (code.kind === "Opt") {
return "JS_OPT";
} else if (code.kind === "Unopt") {
return "JS_UNOPT";
} else if (code.kind === "Baseline") {
return "JS_BASELINE";
} else if (code.kind === "Turboprop") {
} else if (type === "JS") {
if (kind === "Builtin" || kind == "Ignition" || kind === "Unopt") {
return "JS_IGNITION";
} else if (kind === "Baseline" || kind === "Sparkplug") {
return "JS_SPARKPLUG";
} else if (kind === "Maglev") {
return "JS_MAGLEV";
} else if (kind === "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) {
......@@ -271,10 +275,10 @@ function buildCategoryTreeAndLookup() {
}
root.children.push(n);
}
addCategory("JS Optimized", [ "JS_OPT" ]);
addCategory("JS Turboprop", [ "JS_TURBOPROP" ]);
addCategory("JS Baseline", [ "JS_BASELINE" ]);
addCategory("JS Unoptimized", [ "JS_UNOPT", "BC" ]);
addCategory("JS Ignition", [ "JS_IGNITION", "BC" ]);
addCategory("JS Sparkplug", [ "JS_SPARKPLUG" ]);
addCategory("JS Maglev", [ "JS_MAGLEV" ]);
addCategory("JS Turbofan", [ "JS_TURBOFAN" ]);
addCategory("IC", [ "IC" ]);
addCategory("RegExp", [ "REGEXP" ]);
addCategory("Other generated", [ "STUB", "BUILTIN" ]);
......
......@@ -212,29 +212,30 @@ let main = {
const CATEGORY_COLOR = "#f5f5f5";
const bucketDescriptors =
[{
kinds: ["JS_OPT"],
color: "#64dd17",
backgroundColor: "#80e27e",
text: "JS Optimized"
},
[
{
kinds: ["JS_TURBOPROP"],
color: "#693eb8",
backgroundColor: "#a6c452",
text: "JS Turboprop"
kinds: ["JS_IGNITION", "BC"],
color: "#dd2c00",
backgroundColor: "#ff9e80",
text: "JS Ignition"
},
{
kinds: ["JS_BASELINE"],
kinds: ["JS_SPARKPLUG"],
color: "#b3005b",
backgroundColor: "#ff9e80",
text: "JS Baseline"
text: "JS Sparkplug"
},
{
kinds: ["JS_UNOPT", "BC"],
color: "#dd2c00",
backgroundColor: "#ff9e80",
text: "JS Unoptimized"
kinds: ["JS_MAGLEV"],
color: "#693eb8",
backgroundColor: "#d80093",
text: "JS Maglev"
},
{
kinds: ["JS_TURBOFAN"],
color: "#64dd17",
backgroundColor: "#80e27e",
text: "JS Turbofan"
},
{
kinds: ["IC"],
......@@ -348,14 +349,16 @@ function codeTypeToText(type) {
return "Builtin";
case "REGEXP":
return "RegExp";
case "JS_OPT":
return "JS opt";
case "JS_IGNITION":
return "JS Ignition";
case "JS_SPARKPLUG":
return "JS Sparkplug";
case "JS_TURBOPROP":
return "JS Turboprop";
case "JS_BASELINE":
return "JS Baseline";
case "JS_UNOPT":
return "JS unopt";
case "JS_MAGLEV":
return "JS Maglev";
case "JS_TURBOFAN":
return "JS Turbofan";
}
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