Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authortheanarkh <2923878201@qq.com>2022-04-29 18:21:41 +0300
committerGitHub <noreply@github.com>2022-04-29 18:21:41 +0300
commit000a0c853bb294cf6214a7e204fcedd15fa97c7a (patch)
tree895263913250c663da8b07ed731c775639797e3d /lib
parent27ecf1d94cc0c6eaae09e30b3c8a1251d1b4dd46 (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.js7
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],
};
}