diff options
author | Michaël Zasso <targos@protonmail.com> | 2018-12-04 08:20:37 +0100 |
---|---|---|
committer | Michaël Zasso <targos@protonmail.com> | 2018-12-06 15:23:33 +0100 |
commit | 9b4bf7de6c9a7c25f116c7a502384c20b5cfaea3 (patch) | |
tree | 2b0c843168dafb939d8df8a15b2aa72b76dee51d /deps/v8/tools/profile.js | |
parent | b8fbe69db1292307adb2c2b2e0d5ef48c4ab2faf (diff) | |
download | android-node-v8-9b4bf7de6c9a7c25f116c7a502384c20b5cfaea3.tar.gz android-node-v8-9b4bf7de6c9a7c25f116c7a502384c20b5cfaea3.tar.bz2 android-node-v8-9b4bf7de6c9a7c25f116c7a502384c20b5cfaea3.zip |
deps: update V8 to 7.1.302.28
PR-URL: https://github.com/nodejs/node/pull/23423
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Diffstat (limited to 'deps/v8/tools/profile.js')
-rw-r--r-- | deps/v8/tools/profile.js | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/deps/v8/tools/profile.js b/deps/v8/tools/profile.js index 74b4b3bf66..ef362712fe 100644 --- a/deps/v8/tools/profile.js +++ b/deps/v8/tools/profile.js @@ -892,16 +892,24 @@ JsonProfile.prototype.addStaticCode = function( JsonProfile.prototype.addCode = function( kind, name, timestamp, start, size) { + let codeId = this.codeEntries_.length; + // Find out if we have a static code entry for the code. If yes, we will + // make sure it is written to the JSON file just once. + let staticEntry = this.codeMap_.findAddress(start); + if (staticEntry && staticEntry.entry.type === 'CPP') { + codeId = staticEntry.entry.codeId; + } + var entry = new CodeMap.CodeEntry(size, name, 'CODE'); this.codeMap_.addCode(start, entry); - entry.codeId = this.codeEntries_.length; - this.codeEntries_.push({ + entry.codeId = codeId; + this.codeEntries_[codeId] = { name : entry.name, timestamp: timestamp, type : entry.type, kind : kind - }); + }; return entry; }; @@ -975,7 +983,7 @@ JsonProfile.prototype.addSourcePositions = function( if (!entry) return; var codeId = entry.codeId; - // Resolve the inlined fucntions list. + // Resolve the inlined functions list. if (inlinedFunctions.length > 0) { inlinedFunctions = inlinedFunctions.substring(1).split("S"); for (var i = 0; i < inlinedFunctions.length; i++) { |