Skip to content

Commit 7ba2375

Browse files
committed
src: add kGCTypeMinorMarkCompact gc type
1 parent 8aa02e8 commit 7ba2375

File tree

4 files changed

+7
-1
lines changed

4 files changed

+7
-1
lines changed

doc/api/perf_hooks.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -678,6 +678,7 @@ The value may be one of:
678678
* `perf_hooks.constants.NODE_PERFORMANCE_GC_MINOR`
679679
* `perf_hooks.constants.NODE_PERFORMANCE_GC_INCREMENTAL`
680680
* `perf_hooks.constants.NODE_PERFORMANCE_GC_WEAKCB`
681+
* `perf_hooks.constants.NODE_PERFORMANCE_GC_MINOR_MARK_COMPACT`
681682

682683
### Garbage Collection ('gc') Details
683684

@@ -689,6 +690,7 @@ When `performanceEntry.type` is equal to `'gc'`, the
689690
* `perf_hooks.constants.NODE_PERFORMANCE_GC_MINOR`
690691
* `perf_hooks.constants.NODE_PERFORMANCE_GC_INCREMENTAL`
691692
* `perf_hooks.constants.NODE_PERFORMANCE_GC_WEAKCB`
693+
* `perf_hooks.constants.NODE_PERFORMANCE_GC_MINOR_MARK_COMPACT`
692694
* `flags` {number} One of:
693695
* `perf_hooks.constants.NODE_PERFORMANCE_GC_FLAGS_NO`
694696
* `perf_hooks.constants.NODE_PERFORMANCE_GC_FLAGS_CONSTRUCT_RETAINED`

src/node_perf.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,7 @@ void CreatePerContextProperties(Local<Object> target,
339339
NODE_DEFINE_CONSTANT(constants, NODE_PERFORMANCE_GC_MINOR);
340340
NODE_DEFINE_CONSTANT(constants, NODE_PERFORMANCE_GC_INCREMENTAL);
341341
NODE_DEFINE_CONSTANT(constants, NODE_PERFORMANCE_GC_WEAKCB);
342+
NODE_DEFINE_CONSTANT(constants, NODE_PERFORMANCE_GC_MINOR_MARK_COMPACT);
342343

343344
NODE_DEFINE_CONSTANT(
344345
constants, NODE_PERFORMANCE_GC_FLAGS_NO);

src/node_perf.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ enum PerformanceGCKind {
6464
NODE_PERFORMANCE_GC_MAJOR = v8::GCType::kGCTypeMarkSweepCompact,
6565
NODE_PERFORMANCE_GC_MINOR = v8::GCType::kGCTypeScavenge,
6666
NODE_PERFORMANCE_GC_INCREMENTAL = v8::GCType::kGCTypeIncrementalMarking,
67-
NODE_PERFORMANCE_GC_WEAKCB = v8::GCType::kGCTypeProcessWeakCallbacks
67+
NODE_PERFORMANCE_GC_WEAKCB = v8::GCType::kGCTypeProcessWeakCallbacks,
68+
NODE_PERFORMANCE_GC_MINOR_MARK_COMPACT = v8::GCType::kGCTypeMinorMarkCompact
6869
};
6970

7071
enum PerformanceGCFlags {

src/node_v8.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,8 @@ static const char* GetGCTypeName(v8::GCType gc_type) {
248248
return "IncrementalMarking";
249249
case v8::GCType::kGCTypeProcessWeakCallbacks:
250250
return "ProcessWeakCallbacks";
251+
case v8::GCType::kGCTypeMinorMarkCompact:
252+
return "MinorMarkCompact";
251253
default:
252254
return "Unknown";
253255
}

0 commit comments

Comments
 (0)