| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 1c9d354 commit bf86741
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -307,6 +307,8 @@ static const char* GetGCTypeName(v8::GCType gc_type) { | |||
| 307 | 307 | switch (gc_type) { | |
| 308 | 308 | case v8::GCType::kGCTypeScavenge: | |
| 309 | 309 | return "Scavenge"; | |
| 310 | + case v8::GCType::kGCTypeMinorMarkSweep: | ||
| 311 | + return "MinorMarkSweep"; | ||
| 310 | 312 | case v8::GCType::kGCTypeMarkSweepCompact: | |
| 311 | 313 | return "MarkSweepCompact"; | |
| 312 | 314 | case v8::GCType::kGCTypeIncrementalMarking: | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,16 @@ | |||
| 1 | + // Flags: --expose-gc --minor-ms | ||
| 2 | + 'use strict'; | ||
| 3 | + | ||
| 4 | + require('../common'); | ||
| 5 | + const assert = require('assert'); | ||
| 6 | + const { GCProfiler } = require('v8'); | ||
| 7 | + | ||
| 8 | + const profiler = new GCProfiler(); | ||
| 9 | + profiler.start(); | ||
| 10 | + global.gc({ type: 'minor', execution: 'sync' }); | ||
| 11 | + | ||
| 12 | + const profile = profiler.stop(); | ||
| 13 | + assert.deepStrictEqual( | ||
| 14 | + profile.statistics.map(({ gcType }) => gcType), | ||
| 15 | + ['MinorMarkSweep'], | ||
| 16 | + ); | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments