summaryrefslogtreecommitdiff
path: root/deps/v8/tools/system-analyzer/ic-model.mjs
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/tools/system-analyzer/ic-model.mjs')
-rw-r--r--deps/v8/tools/system-analyzer/ic-model.mjs13
1 files changed, 6 insertions, 7 deletions
diff --git a/deps/v8/tools/system-analyzer/ic-model.mjs b/deps/v8/tools/system-analyzer/ic-model.mjs
index 8340e9b756..2bb40b6853 100644
--- a/deps/v8/tools/system-analyzer/ic-model.mjs
+++ b/deps/v8/tools/system-analyzer/ic-model.mjs
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-import Processor from "./processor.mjs";
+import {IcLogEntry} from './log/ic.mjs';
// For compatibility with console scripts:
print = console.log;
@@ -23,11 +23,11 @@ export class Group {
}
createSubGroups() {
+ // TODO: use Map
this.groups = {};
- for (let i = 0; i < Processor.kProperties.length; i++) {
- let subProperty = Processor.kProperties[i];
- if (this.property == subProperty) continue;
- this.groups[subProperty] = Group.groupBy(this.entries, subProperty);
+ for (const propertyName of IcLogEntry.propertyNames) {
+ if (this.property == propertyName) continue;
+ this.groups[propertyName] = Group.groupBy(this.entries, propertyName);
}
}
@@ -51,8 +51,7 @@ export class Group {
group.percentage = Math.round(group.count / length * 100 * 100) / 100;
result.push(group);
}
- result.sort((a, b) => { return b.count - a.count });
+ result.sort((a, b) => {return b.count - a.count});
return result;
}
-
}