diff --git a/tools/mac-nm b/tools/mac-nm index cc5f6c742a..af76fc3c9e 100755 --- a/tools/mac-nm +++ b/tools/mac-nm @@ -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 diff --git a/tools/profview/profile-utils.js b/tools/profview/profile-utils.js index fd0a086d6a..e1410550a7 100644 --- a/tools/profview/profile-utils.js +++ b/tools/profview/profile-utils.js @@ -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" ]); diff --git a/tools/profview/profview.js b/tools/profview/profview.js index 60fc05e727..4dd3fbf9d0 100644 --- a/tools/profview/profview.js +++ b/tools/profview/profview.js @@ -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_BASELINE"], - color: "#b3005b", - backgroundColor: "#ff9e80", - text: "JS Baseline" - }, - { - kinds: ["JS_UNOPT", "BC"], + kinds: ["JS_IGNITION", "BC"], color: "#dd2c00", backgroundColor: "#ff9e80", - text: "JS Unoptimized" + text: "JS Ignition" + }, + { + kinds: ["JS_SPARKPLUG"], + color: "#b3005b", + backgroundColor: "#ff9e80", + text: "JS Sparkplug" + }, + { + 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); }