diff options
author | theanarkh <2923878201@qq.com> | 2022-04-29 18:21:41 +0300 |
---|---|---|
committer | Michaƫl Zasso <targos@protonmail.com> | 2022-05-02 15:39:32 +0300 |
commit | 4af0fbd41ea344868c75f4c7c3eece40e664e9ef (patch) | |
tree | 18ce06492d0e2eaf7de84eb2783cb4c871f70e03 /lib | |
parent | a0638a23b099b5ca174680324e856533d765be09 (diff) |
v8: export cpu_profiler_metadata_size in getHeapCodeStatistics
PR-URL: https://github.com/nodejs/node/pull/42818
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/v8.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/v8.js b/lib/v8.js index e899da46849..40db7808fcd 100644 --- a/lib/v8.js +++ b/lib/v8.js @@ -121,7 +121,8 @@ const { // Properties for heap code statistics buffer extraction. kCodeAndMetadataSizeIndex, kBytecodeAndMetadataSizeIndex, - kExternalScriptSourceSizeIndex + kExternalScriptSourceSizeIndex, + kCPUProfilerMetaDataSizeIndex, } = binding; const kNumberOfHeapSpaces = kHeapSpaces.length; @@ -209,6 +210,7 @@ function getHeapSpaceStatistics() { * code_and_metadata_size: number; * bytecode_and_metadata_size: number; * external_script_source_size: number; + * cpu_profiler_metadata_size: number; * }} */ function getHeapCodeStatistics() { @@ -218,7 +220,8 @@ function getHeapCodeStatistics() { return { code_and_metadata_size: buffer[kCodeAndMetadataSizeIndex], bytecode_and_metadata_size: buffer[kBytecodeAndMetadataSizeIndex], - external_script_source_size: buffer[kExternalScriptSourceSizeIndex] + external_script_source_size: buffer[kExternalScriptSourceSizeIndex], + cpu_profiler_metadata_size: buffer[kCPUProfilerMetaDataSizeIndex], }; } |