@@ -447,8 +447,7 @@ static void PrintGCStatistics(JSONWriter* writer, Isolate* isolate) {
447
447
448
448
writer->json_objectstart (" heapSpaces" );
449
449
// Loop through heap spaces
450
- size_t i;
451
- for (i = 0 ; i < isolate->NumberOfHeapSpaces () - 1 ; i++) {
450
+ for (size_t i = 0 ; i < isolate->NumberOfHeapSpaces (); i++) {
452
451
isolate->GetHeapSpaceStatistics (&v8_heap_space_stats, i);
453
452
writer->json_objectstart (v8_heap_space_stats.space_name ());
454
453
writer->json_keyvalue (" memorySize" , v8_heap_space_stats.space_size ());
@@ -464,19 +463,7 @@ static void PrintGCStatistics(JSONWriter* writer, Isolate* isolate) {
464
463
" available" , v8_heap_space_stats.space_available_size ());
465
464
writer->json_objectend ();
466
465
}
467
- isolate->GetHeapSpaceStatistics (&v8_heap_space_stats, i);
468
- writer->json_objectstart (v8_heap_space_stats.space_name ());
469
- writer->json_keyvalue (" memorySize" , v8_heap_space_stats.space_size ());
470
- writer->json_keyvalue (
471
- " committedMemory" , v8_heap_space_stats.physical_space_size ());
472
- writer->json_keyvalue (
473
- " capacity" ,
474
- v8_heap_space_stats.space_used_size () +
475
- v8_heap_space_stats.space_available_size ());
476
- writer->json_keyvalue (" used" , v8_heap_space_stats.space_used_size ());
477
- writer->json_keyvalue (
478
- " available" , v8_heap_space_stats.space_available_size ());
479
- writer->json_objectend ();
466
+
480
467
writer->json_objectend ();
481
468
writer->json_objectend ();
482
469
}
0 commit comments