summaryrefslogtreecommitdiff
path: root/chromium/v8/tools/map-processor.js
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2020-10-12 14:27:29 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2020-10-13 09:35:20 +0000
commitc30a6232df03e1efbd9f3b226777b07e087a1122 (patch)
treee992f45784689f373bcc38d1b79a239ebe17ee23 /chromium/v8/tools/map-processor.js
parent7b5b123ac58f58ffde0f4f6e488bcd09aa4decd3 (diff)
downloadqtwebengine-chromium-85-based.tar.gz
BASELINE: Update Chromium to 85.0.4183.14085-based
Change-Id: Iaa42f4680837c57725b1344f108c0196741f6057 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/v8/tools/map-processor.js')
-rw-r--r--chromium/v8/tools/map-processor.js41
1 files changed, 27 insertions, 14 deletions
diff --git a/chromium/v8/tools/map-processor.js b/chromium/v8/tools/map-processor.js
index d743cba383a..9b261c7d1b8 100644
--- a/chromium/v8/tools/map-processor.js
+++ b/chromium/v8/tools/map-processor.js
@@ -43,17 +43,17 @@ class MapProcessor extends LogReader {
processor: this.processFunctionMove
},
'map-create': {
- parsers: [parseInt, parseInt, parseString],
+ parsers: [parseInt, parseString],
processor: this.processMapCreate
},
'map': {
- parsers: [parseString, parseInt, parseInt, parseInt, parseInt, parseInt,
+ parsers: [parseString, parseInt, parseString, parseString, parseInt, parseInt,
parseString, parseString, parseString
],
processor: this.processMap
},
'map-details': {
- parsers: [parseInt, parseInt, parseString],
+ parsers: [parseInt, parseString, parseString],
processor: this.processMapDetails
}
};
@@ -183,19 +183,16 @@ class MapProcessor extends LogReader {
this.getExistingMap(id, time).deprecate();
}
- processMapCreate(time, id, string) {
+ processMapCreate(time, id) {
// map-create events might override existing maps if the addresses get
- // rcycled. Hence we do not check for existing maps.
+ // recycled. Hence we do not check for existing maps.
let map = this.createMap(id, time);
- map.description = string;
}
processMapDetails(time, id, string) {
//TODO(cbruni): fix initial map logging.
let map = this.getExistingMap(id, time);
- if (!map.description) {
- //map.description = string;
- }
+ map.description = string;
}
createMap(id, time) {
@@ -205,8 +202,8 @@ class MapProcessor extends LogReader {
}
getExistingMap(id, time) {
- if (id === 0) return undefined;
- let map = V8Map.get(id);
+ if (id === "0x000000000000") return undefined;
+ let map = V8Map.get(id, time);
if (map === undefined) {
console.error("No map details provided: id=" + id);
// Manually patch in a map to continue running.
@@ -334,18 +331,34 @@ class V8Map {
return parents;
}
- static get(id) {
- return this.cache.get(id);
+
+ static get(id, time = undefined) {
+ let maps = this.cache.get(id);
+ if(maps){
+ for (let i = 0; i < maps.length; i++) {
+ //TODO: Implement time based map search
+ if(maps[i].time === time){
+ return maps[i];
+ }
+ }
+ // default return the latest
+ return maps[maps.length-1];
+ }
}
static set(id, map) {
- this.cache.set(id, map);
+ if(this.cache.has(id)){
+ this.cache.get(id).push(map);
+ } else {
+ this.cache.set(id, [map]);
+ }
}
}
V8Map.cache = new Map();
+
// ===========================================================================
class Edge {
constructor(type, name, reason, time, from, to) {