[tools] Various system-analyzer fixes
- Handle empty script sources - Fix list-panel groups, order by count Bug: v8:10644 Change-Id: I03d3915f709d47429040b591c0271e951eca58e9 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3289642 Commit-Queue: Camillo Bruni <cbruni@chromium.org> Auto-Submit: Camillo Bruni <cbruni@chromium.org> Reviewed-by: Patrick Thier <pthier@chromium.org> Cr-Commit-Position: refs/heads/main@{#78165}
This commit is contained in:
parent
d76dceb803
commit
e24deb89fe
@ -70,7 +70,7 @@ export class SourcePosition {
|
||||
|
||||
export class Script {
|
||||
url;
|
||||
source;
|
||||
source = "";
|
||||
name;
|
||||
sourcePosition = undefined;
|
||||
// Map<line, Map<column, SourcePosition>>
|
||||
@ -106,7 +106,7 @@ export class Script {
|
||||
}
|
||||
|
||||
findFunctionSourcePosition(sourcePosition) {
|
||||
// TODO(cbruni) implmenent
|
||||
// TODO(cbruni): implement
|
||||
return undefined;
|
||||
}
|
||||
|
||||
|
@ -102,6 +102,6 @@ export function groupBy(array, keyFunction, collect = false) {
|
||||
groups.push(group);
|
||||
keyToGroup.set(key, group);
|
||||
}
|
||||
// Sort by count
|
||||
return groups.sort((a, b) => b.count - a.count);
|
||||
// Sort by length
|
||||
return groups.sort((a, b) => b.length - a.length);
|
||||
}
|
@ -112,6 +112,7 @@ DOM.defineCustomElement('view/list-panel',
|
||||
|
||||
createSubgroups(group) {
|
||||
const map = new Map();
|
||||
const tempGroups = [];
|
||||
for (let propertyName of this._propertyNames) {
|
||||
map.set(
|
||||
propertyName,
|
||||
@ -176,9 +177,6 @@ DOM.defineCustomElement('view/list-panel',
|
||||
_render(groups, table) {
|
||||
let last;
|
||||
new LazyTable(table, groups, group => {
|
||||
if (last && last.count < group.length) {
|
||||
console.log(last, group);
|
||||
}
|
||||
last = group;
|
||||
const tr = DOM.tr();
|
||||
tr.group = group;
|
||||
|
Loading…
Reference in New Issue
Block a user