[tools] Tweaks to binary_size.
- Group symbols with no path by C++ namespace. - Fix layout in Firefox. - Don't remove paths containing only one symbol. Change-Id: I951e2df0b46919bc40ae0e1db641f7422310e45d Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/425153 Reviewed-by: Brian Quinlan <bquinlan@google.com> Commit-Queue: Ryan Macnak <rmacnak@google.com>
This commit is contained in:
committed by
Commit Queue
parent
dbf7f40b15
commit
b86d7de6f0
@@ -16,7 +16,7 @@ class Symbol {
|
||||
for (var i = 0; i < children.length; i++) {
|
||||
children[i] = children[i].compressTrivialPaths();
|
||||
}
|
||||
if ((type == "path") && (children.length == 1)) {
|
||||
if ((type == "path") && (children.length == 1) && (children[0].type == "path")) {
|
||||
return children[0];
|
||||
}
|
||||
return this;
|
||||
@@ -146,6 +146,17 @@ main(List<String> args) {
|
||||
var vmSize = int.parse(columns[2]);
|
||||
var fileSize = int.parse(columns[3]);
|
||||
|
||||
if (path.startsWith("[")) {
|
||||
if (path == name) {
|
||||
path = "";
|
||||
} else if (name.contains("::")) {
|
||||
path = "(no path)/" + name.substring(0, name.lastIndexOf("::")).replaceAll("::", "/");
|
||||
name = name.substring(name.lastIndexOf("::") + 2);
|
||||
} else {
|
||||
path = "(no path)";
|
||||
}
|
||||
}
|
||||
|
||||
path = prettyPath(path);
|
||||
|
||||
var s = new Symbol();
|
||||
@@ -373,8 +384,12 @@ function createTreemapTile(v, width, height, depth) {
|
||||
}
|
||||
|
||||
function showDominatorTree(v) {
|
||||
// Add the content div to the document first so the browser will calculate
|
||||
// Add a filler div to the document first so the browser will calculate
|
||||
// the available width and height.
|
||||
let fill = document.createElement("div");
|
||||
fill.style.width = "100%";
|
||||
fill.style.height = "100%";
|
||||
setBody(fill);
|
||||
let w = document.body.offsetWidth;
|
||||
let h = document.body.offsetHeight;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user