OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
442 | 442 |
443 ReportStatisticsBeforeGC(); | 443 ReportStatisticsBeforeGC(); |
444 #endif // DEBUG | 444 #endif // DEBUG |
445 | 445 |
446 store_buffer()->GCPrologue(); | 446 store_buffer()->GCPrologue(); |
447 } | 447 } |
448 | 448 |
449 | 449 |
450 intptr_t Heap::SizeOfObjects() { | 450 intptr_t Heap::SizeOfObjects() { |
451 intptr_t total = 0; | 451 intptr_t total = 0; |
452 AllSpaces spaces; | 452 AllSpaces spaces(this); |
453 for (Space* space = spaces.next(); space != NULL; space = spaces.next()) { | 453 for (Space* space = spaces.next(); space != NULL; space = spaces.next()) { |
454 total += space->SizeOfObjects(); | 454 total += space->SizeOfObjects(); |
455 } | 455 } |
456 return total; | 456 return total; |
457 } | 457 } |
458 | 458 |
459 | 459 |
460 void Heap::RepairFreeListsAfterBoot() { | 460 void Heap::RepairFreeListsAfterBoot() { |
461 PagedSpaces spaces; | 461 PagedSpaces spaces(this); |
462 for (PagedSpace* space = spaces.next(); | 462 for (PagedSpace* space = spaces.next(); |
463 space != NULL; | 463 space != NULL; |
464 space = spaces.next()) { | 464 space = spaces.next()) { |
465 space->RepairFreeListsAfterBoot(); | 465 space->RepairFreeListsAfterBoot(); |
466 } | 466 } |
467 } | 467 } |
468 | 468 |
469 | 469 |
470 void Heap::GarbageCollectionEpilogue() { | 470 void Heap::GarbageCollectionEpilogue() { |
471 store_buffer()->GCEpilogue(); | 471 store_buffer()->GCEpilogue(); |
(...skipping 5058 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5530 | 5530 |
5531 return finished; | 5531 return finished; |
5532 } | 5532 } |
5533 | 5533 |
5534 | 5534 |
5535 #ifdef DEBUG | 5535 #ifdef DEBUG |
5536 | 5536 |
5537 void Heap::Print() { | 5537 void Heap::Print() { |
5538 if (!HasBeenSetUp()) return; | 5538 if (!HasBeenSetUp()) return; |
5539 isolate()->PrintStack(); | 5539 isolate()->PrintStack(); |
5540 AllSpaces spaces; | 5540 AllSpaces spaces(this); |
5541 for (Space* space = spaces.next(); space != NULL; space = spaces.next()) | 5541 for (Space* space = spaces.next(); space != NULL; space = spaces.next()) { |
5542 space->Print(); | 5542 space->Print(); |
| 5543 } |
5543 } | 5544 } |
5544 | 5545 |
5545 | 5546 |
5546 void Heap::ReportCodeStatistics(const char* title) { | 5547 void Heap::ReportCodeStatistics(const char* title) { |
5547 PrintF(">>>>>> Code Stats (%s) >>>>>>\n", title); | 5548 PrintF(">>>>>> Code Stats (%s) >>>>>>\n", title); |
5548 PagedSpace::ResetCodeStatistics(); | 5549 PagedSpace::ResetCodeStatistics(); |
5549 // We do not look for code in new space, map space, or old space. If code | 5550 // We do not look for code in new space, map space, or old space. If code |
5550 // somehow ends up in those spaces, we would miss it here. | 5551 // somehow ends up in those spaces, we would miss it here. |
5551 code_space_->CollectCodeStatistics(); | 5552 code_space_->CollectCodeStatistics(); |
5552 lo_space_->CollectCodeStatistics(); | 5553 lo_space_->CollectCodeStatistics(); |
(...skipping 607 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6160 *stats->cell_space_capacity = cell_space_->Capacity(); | 6161 *stats->cell_space_capacity = cell_space_->Capacity(); |
6161 *stats->lo_space_size = lo_space_->Size(); | 6162 *stats->lo_space_size = lo_space_->Size(); |
6162 isolate_->global_handles()->RecordStats(stats); | 6163 isolate_->global_handles()->RecordStats(stats); |
6163 *stats->memory_allocator_size = isolate()->memory_allocator()->Size(); | 6164 *stats->memory_allocator_size = isolate()->memory_allocator()->Size(); |
6164 *stats->memory_allocator_capacity = | 6165 *stats->memory_allocator_capacity = |
6165 isolate()->memory_allocator()->Size() + | 6166 isolate()->memory_allocator()->Size() + |
6166 isolate()->memory_allocator()->Available(); | 6167 isolate()->memory_allocator()->Available(); |
6167 *stats->os_error = OS::GetLastError(); | 6168 *stats->os_error = OS::GetLastError(); |
6168 isolate()->memory_allocator()->Available(); | 6169 isolate()->memory_allocator()->Available(); |
6169 if (take_snapshot) { | 6170 if (take_snapshot) { |
6170 HeapIterator iterator; | 6171 HeapIterator iterator(this); |
6171 for (HeapObject* obj = iterator.next(); | 6172 for (HeapObject* obj = iterator.next(); |
6172 obj != NULL; | 6173 obj != NULL; |
6173 obj = iterator.next()) { | 6174 obj = iterator.next()) { |
6174 InstanceType type = obj->map()->instance_type(); | 6175 InstanceType type = obj->map()->instance_type(); |
6175 ASSERT(0 <= type && type <= LAST_TYPE); | 6176 ASSERT(0 <= type && type <= LAST_TYPE); |
6176 stats->objects_per_type[type]++; | 6177 stats->objects_per_type[type]++; |
6177 stats->size_per_type[type] += obj->Size(); | 6178 stats->size_per_type[type] += obj->Size(); |
6178 } | 6179 } |
6179 } | 6180 } |
6180 } | 6181 } |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6405 incremental_marking()->TearDown(); | 6406 incremental_marking()->TearDown(); |
6406 | 6407 |
6407 isolate_->memory_allocator()->TearDown(); | 6408 isolate_->memory_allocator()->TearDown(); |
6408 | 6409 |
6409 delete relocation_mutex_; | 6410 delete relocation_mutex_; |
6410 } | 6411 } |
6411 | 6412 |
6412 | 6413 |
6413 void Heap::Shrink() { | 6414 void Heap::Shrink() { |
6414 // Try to shrink all paged spaces. | 6415 // Try to shrink all paged spaces. |
6415 PagedSpaces spaces; | 6416 PagedSpaces spaces(this); |
6416 for (PagedSpace* space = spaces.next(); | 6417 for (PagedSpace* space = spaces.next(); |
6417 space != NULL; | 6418 space != NULL; |
6418 space = spaces.next()) { | 6419 space = spaces.next()) { |
6419 space->ReleaseAllUnusedPages(); | 6420 space->ReleaseAllUnusedPages(); |
6420 } | 6421 } |
6421 } | 6422 } |
6422 | 6423 |
6423 | 6424 |
6424 void Heap::AddGCPrologueCallback(GCPrologueCallback callback, GCType gc_type) { | 6425 void Heap::AddGCPrologueCallback(GCPrologueCallback callback, GCType gc_type) { |
6425 ASSERT(callback != NULL); | 6426 ASSERT(callback != NULL); |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6478 PrintHandleVisitor v; | 6479 PrintHandleVisitor v; |
6479 isolate_->handle_scope_implementer()->Iterate(&v); | 6480 isolate_->handle_scope_implementer()->Iterate(&v); |
6480 } | 6481 } |
6481 | 6482 |
6482 #endif | 6483 #endif |
6483 | 6484 |
6484 | 6485 |
6485 Space* AllSpaces::next() { | 6486 Space* AllSpaces::next() { |
6486 switch (counter_++) { | 6487 switch (counter_++) { |
6487 case NEW_SPACE: | 6488 case NEW_SPACE: |
6488 return HEAP->new_space(); | 6489 return heap_->new_space(); |
6489 case OLD_POINTER_SPACE: | 6490 case OLD_POINTER_SPACE: |
6490 return HEAP->old_pointer_space(); | 6491 return heap_->old_pointer_space(); |
6491 case OLD_DATA_SPACE: | 6492 case OLD_DATA_SPACE: |
6492 return HEAP->old_data_space(); | 6493 return heap_->old_data_space(); |
6493 case CODE_SPACE: | 6494 case CODE_SPACE: |
6494 return HEAP->code_space(); | 6495 return heap_->code_space(); |
6495 case MAP_SPACE: | 6496 case MAP_SPACE: |
6496 return HEAP->map_space(); | 6497 return heap_->map_space(); |
6497 case CELL_SPACE: | 6498 case CELL_SPACE: |
6498 return HEAP->cell_space(); | 6499 return heap_->cell_space(); |
6499 case LO_SPACE: | 6500 case LO_SPACE: |
6500 return HEAP->lo_space(); | 6501 return heap_->lo_space(); |
6501 default: | 6502 default: |
6502 return NULL; | 6503 return NULL; |
6503 } | 6504 } |
6504 } | 6505 } |
6505 | 6506 |
6506 | 6507 |
6507 PagedSpace* PagedSpaces::next() { | 6508 PagedSpace* PagedSpaces::next() { |
6508 switch (counter_++) { | 6509 switch (counter_++) { |
6509 case OLD_POINTER_SPACE: | 6510 case OLD_POINTER_SPACE: |
6510 return HEAP->old_pointer_space(); | 6511 return heap_->old_pointer_space(); |
6511 case OLD_DATA_SPACE: | 6512 case OLD_DATA_SPACE: |
6512 return HEAP->old_data_space(); | 6513 return heap_->old_data_space(); |
6513 case CODE_SPACE: | 6514 case CODE_SPACE: |
6514 return HEAP->code_space(); | 6515 return heap_->code_space(); |
6515 case MAP_SPACE: | 6516 case MAP_SPACE: |
6516 return HEAP->map_space(); | 6517 return heap_->map_space(); |
6517 case CELL_SPACE: | 6518 case CELL_SPACE: |
6518 return HEAP->cell_space(); | 6519 return heap_->cell_space(); |
6519 default: | 6520 default: |
6520 return NULL; | 6521 return NULL; |
6521 } | 6522 } |
6522 } | 6523 } |
6523 | 6524 |
6524 | 6525 |
6525 | 6526 |
6526 OldSpace* OldSpaces::next() { | 6527 OldSpace* OldSpaces::next() { |
6527 switch (counter_++) { | 6528 switch (counter_++) { |
6528 case OLD_POINTER_SPACE: | 6529 case OLD_POINTER_SPACE: |
6529 return HEAP->old_pointer_space(); | 6530 return heap_->old_pointer_space(); |
6530 case OLD_DATA_SPACE: | 6531 case OLD_DATA_SPACE: |
6531 return HEAP->old_data_space(); | 6532 return heap_->old_data_space(); |
6532 case CODE_SPACE: | 6533 case CODE_SPACE: |
6533 return HEAP->code_space(); | 6534 return heap_->code_space(); |
6534 default: | 6535 default: |
6535 return NULL; | 6536 return NULL; |
6536 } | 6537 } |
6537 } | 6538 } |
6538 | 6539 |
6539 | 6540 |
6540 SpaceIterator::SpaceIterator() | 6541 SpaceIterator::SpaceIterator(Heap* heap) |
6541 : current_space_(FIRST_SPACE), | 6542 : heap_(heap), |
| 6543 current_space_(FIRST_SPACE), |
6542 iterator_(NULL), | 6544 iterator_(NULL), |
6543 size_func_(NULL) { | 6545 size_func_(NULL) { |
6544 } | 6546 } |
6545 | 6547 |
6546 | 6548 |
6547 SpaceIterator::SpaceIterator(HeapObjectCallback size_func) | 6549 SpaceIterator::SpaceIterator(Heap* heap, HeapObjectCallback size_func) |
6548 : current_space_(FIRST_SPACE), | 6550 : heap_(heap), |
| 6551 current_space_(FIRST_SPACE), |
6549 iterator_(NULL), | 6552 iterator_(NULL), |
6550 size_func_(size_func) { | 6553 size_func_(size_func) { |
6551 } | 6554 } |
6552 | 6555 |
6553 | 6556 |
6554 SpaceIterator::~SpaceIterator() { | 6557 SpaceIterator::~SpaceIterator() { |
6555 // Delete active iterator if any. | 6558 // Delete active iterator if any. |
6556 delete iterator_; | 6559 delete iterator_; |
6557 } | 6560 } |
6558 | 6561 |
(...skipping 19 matching lines...) Expand all Loading... |
6578 return CreateIterator(); | 6581 return CreateIterator(); |
6579 } | 6582 } |
6580 | 6583 |
6581 | 6584 |
6582 // Create an iterator for the space to iterate. | 6585 // Create an iterator for the space to iterate. |
6583 ObjectIterator* SpaceIterator::CreateIterator() { | 6586 ObjectIterator* SpaceIterator::CreateIterator() { |
6584 ASSERT(iterator_ == NULL); | 6587 ASSERT(iterator_ == NULL); |
6585 | 6588 |
6586 switch (current_space_) { | 6589 switch (current_space_) { |
6587 case NEW_SPACE: | 6590 case NEW_SPACE: |
6588 iterator_ = new SemiSpaceIterator(HEAP->new_space(), size_func_); | 6591 iterator_ = new SemiSpaceIterator(heap_->new_space(), size_func_); |
6589 break; | 6592 break; |
6590 case OLD_POINTER_SPACE: | 6593 case OLD_POINTER_SPACE: |
6591 iterator_ = new HeapObjectIterator(HEAP->old_pointer_space(), size_func_); | 6594 iterator_ = |
| 6595 new HeapObjectIterator(heap_->old_pointer_space(), size_func_); |
6592 break; | 6596 break; |
6593 case OLD_DATA_SPACE: | 6597 case OLD_DATA_SPACE: |
6594 iterator_ = new HeapObjectIterator(HEAP->old_data_space(), size_func_); | 6598 iterator_ = new HeapObjectIterator(heap_->old_data_space(), size_func_); |
6595 break; | 6599 break; |
6596 case CODE_SPACE: | 6600 case CODE_SPACE: |
6597 iterator_ = new HeapObjectIterator(HEAP->code_space(), size_func_); | 6601 iterator_ = new HeapObjectIterator(heap_->code_space(), size_func_); |
6598 break; | 6602 break; |
6599 case MAP_SPACE: | 6603 case MAP_SPACE: |
6600 iterator_ = new HeapObjectIterator(HEAP->map_space(), size_func_); | 6604 iterator_ = new HeapObjectIterator(heap_->map_space(), size_func_); |
6601 break; | 6605 break; |
6602 case CELL_SPACE: | 6606 case CELL_SPACE: |
6603 iterator_ = new HeapObjectIterator(HEAP->cell_space(), size_func_); | 6607 iterator_ = new HeapObjectIterator(heap_->cell_space(), size_func_); |
6604 break; | 6608 break; |
6605 case LO_SPACE: | 6609 case LO_SPACE: |
6606 iterator_ = new LargeObjectIterator(HEAP->lo_space(), size_func_); | 6610 iterator_ = new LargeObjectIterator(heap_->lo_space(), size_func_); |
6607 break; | 6611 break; |
6608 } | 6612 } |
6609 | 6613 |
6610 // Return the newly allocated iterator; | 6614 // Return the newly allocated iterator; |
6611 ASSERT(iterator_ != NULL); | 6615 ASSERT(iterator_ != NULL); |
6612 return iterator_; | 6616 return iterator_; |
6613 } | 6617 } |
6614 | 6618 |
6615 | 6619 |
6616 class HeapObjectsFilter { | 6620 class HeapObjectsFilter { |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6667 Heap* heap = Isolate::Current()->heap(); | 6671 Heap* heap = Isolate::Current()->heap(); |
6668 MarkingVisitor visitor; | 6672 MarkingVisitor visitor; |
6669 heap->IterateRoots(&visitor, VISIT_ALL); | 6673 heap->IterateRoots(&visitor, VISIT_ALL); |
6670 visitor.TransitiveClosure(); | 6674 visitor.TransitiveClosure(); |
6671 } | 6675 } |
6672 | 6676 |
6673 AssertNoAllocation no_alloc; | 6677 AssertNoAllocation no_alloc; |
6674 }; | 6678 }; |
6675 | 6679 |
6676 | 6680 |
6677 HeapIterator::HeapIterator() | 6681 HeapIterator::HeapIterator(Heap* heap) |
6678 : filtering_(HeapIterator::kNoFiltering), | 6682 : heap_(heap), |
| 6683 filtering_(HeapIterator::kNoFiltering), |
6679 filter_(NULL) { | 6684 filter_(NULL) { |
6680 Init(); | 6685 Init(); |
6681 } | 6686 } |
6682 | 6687 |
6683 | 6688 |
6684 HeapIterator::HeapIterator(HeapIterator::HeapObjectsFiltering filtering) | 6689 HeapIterator::HeapIterator(Heap* heap, |
6685 : filtering_(filtering), | 6690 HeapIterator::HeapObjectsFiltering filtering) |
| 6691 : heap_(heap), |
| 6692 filtering_(filtering), |
6686 filter_(NULL) { | 6693 filter_(NULL) { |
6687 Init(); | 6694 Init(); |
6688 } | 6695 } |
6689 | 6696 |
6690 | 6697 |
6691 HeapIterator::~HeapIterator() { | 6698 HeapIterator::~HeapIterator() { |
6692 Shutdown(); | 6699 Shutdown(); |
6693 } | 6700 } |
6694 | 6701 |
6695 | 6702 |
6696 void HeapIterator::Init() { | 6703 void HeapIterator::Init() { |
6697 // Start the iteration. | 6704 // Start the iteration. |
6698 space_iterator_ = new SpaceIterator; | 6705 space_iterator_ = new SpaceIterator(heap_); |
6699 switch (filtering_) { | 6706 switch (filtering_) { |
6700 case kFilterUnreachable: | 6707 case kFilterUnreachable: |
6701 filter_ = new UnreachableObjectsFilter; | 6708 filter_ = new UnreachableObjectsFilter; |
6702 break; | 6709 break; |
6703 default: | 6710 default: |
6704 break; | 6711 break; |
6705 } | 6712 } |
6706 object_iterator_ = space_iterator_->next(); | 6713 object_iterator_ = space_iterator_->next(); |
6707 } | 6714 } |
6708 | 6715 |
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6953 // determining the source for leaks of global objects. | 6960 // determining the source for leaks of global objects. |
6954 void Heap::TracePathToGlobal() { | 6961 void Heap::TracePathToGlobal() { |
6955 PathTracer tracer(PathTracer::kAnyGlobalObject, | 6962 PathTracer tracer(PathTracer::kAnyGlobalObject, |
6956 PathTracer::FIND_ALL, | 6963 PathTracer::FIND_ALL, |
6957 VISIT_ALL); | 6964 VISIT_ALL); |
6958 IterateRoots(&tracer, VISIT_ONLY_STRONG); | 6965 IterateRoots(&tracer, VISIT_ONLY_STRONG); |
6959 } | 6966 } |
6960 #endif | 6967 #endif |
6961 | 6968 |
6962 | 6969 |
6963 static intptr_t CountTotalHolesSize() { | 6970 static intptr_t CountTotalHolesSize(Heap* heap) { |
6964 intptr_t holes_size = 0; | 6971 intptr_t holes_size = 0; |
6965 OldSpaces spaces; | 6972 OldSpaces spaces(heap); |
6966 for (OldSpace* space = spaces.next(); | 6973 for (OldSpace* space = spaces.next(); |
6967 space != NULL; | 6974 space != NULL; |
6968 space = spaces.next()) { | 6975 space = spaces.next()) { |
6969 holes_size += space->Waste() + space->Available(); | 6976 holes_size += space->Waste() + space->Available(); |
6970 } | 6977 } |
6971 return holes_size; | 6978 return holes_size; |
6972 } | 6979 } |
6973 | 6980 |
6974 | 6981 |
6975 GCTracer::GCTracer(Heap* heap, | 6982 GCTracer::GCTracer(Heap* heap, |
(...skipping 15 matching lines...) Expand all Loading... |
6991 collector_reason_(collector_reason) { | 6998 collector_reason_(collector_reason) { |
6992 if (!FLAG_trace_gc && !FLAG_print_cumulative_gc_stat) return; | 6999 if (!FLAG_trace_gc && !FLAG_print_cumulative_gc_stat) return; |
6993 start_time_ = OS::TimeCurrentMillis(); | 7000 start_time_ = OS::TimeCurrentMillis(); |
6994 start_object_size_ = heap_->SizeOfObjects(); | 7001 start_object_size_ = heap_->SizeOfObjects(); |
6995 start_memory_size_ = heap_->isolate()->memory_allocator()->Size(); | 7002 start_memory_size_ = heap_->isolate()->memory_allocator()->Size(); |
6996 | 7003 |
6997 for (int i = 0; i < Scope::kNumberOfScopes; i++) { | 7004 for (int i = 0; i < Scope::kNumberOfScopes; i++) { |
6998 scopes_[i] = 0; | 7005 scopes_[i] = 0; |
6999 } | 7006 } |
7000 | 7007 |
7001 in_free_list_or_wasted_before_gc_ = CountTotalHolesSize(); | 7008 in_free_list_or_wasted_before_gc_ = CountTotalHolesSize(heap); |
7002 | 7009 |
7003 allocated_since_last_gc_ = | 7010 allocated_since_last_gc_ = |
7004 heap_->SizeOfObjects() - heap_->alive_after_last_gc_; | 7011 heap_->SizeOfObjects() - heap_->alive_after_last_gc_; |
7005 | 7012 |
7006 if (heap_->last_gc_end_timestamp_ > 0) { | 7013 if (heap_->last_gc_end_timestamp_ > 0) { |
7007 spent_in_mutator_ = Max(start_time_ - heap_->last_gc_end_timestamp_, 0.0); | 7014 spent_in_mutator_ = Max(start_time_ - heap_->last_gc_end_timestamp_, 0.0); |
7008 } | 7015 } |
7009 | 7016 |
7010 steps_count_ = heap_->incremental_marking()->steps_count(); | 7017 steps_count_ = heap_->incremental_marking()->steps_count(); |
7011 steps_took_ = heap_->incremental_marking()->steps_took(); | 7018 steps_took_ = heap_->incremental_marking()->steps_took(); |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7118 static_cast<int>(scopes_[Scope::MC_UPDATE_POINTERS_TO_EVACUATED])); | 7125 static_cast<int>(scopes_[Scope::MC_UPDATE_POINTERS_TO_EVACUATED])); |
7119 PrintF("intracompaction_ptrs=%d ", static_cast<int>(scopes_[ | 7126 PrintF("intracompaction_ptrs=%d ", static_cast<int>(scopes_[ |
7120 Scope::MC_UPDATE_POINTERS_BETWEEN_EVACUATED])); | 7127 Scope::MC_UPDATE_POINTERS_BETWEEN_EVACUATED])); |
7121 PrintF("misc_compaction=%d ", | 7128 PrintF("misc_compaction=%d ", |
7122 static_cast<int>(scopes_[Scope::MC_UPDATE_MISC_POINTERS])); | 7129 static_cast<int>(scopes_[Scope::MC_UPDATE_MISC_POINTERS])); |
7123 | 7130 |
7124 PrintF("total_size_before=%" V8_PTR_PREFIX "d ", start_object_size_); | 7131 PrintF("total_size_before=%" V8_PTR_PREFIX "d ", start_object_size_); |
7125 PrintF("total_size_after=%" V8_PTR_PREFIX "d ", heap_->SizeOfObjects()); | 7132 PrintF("total_size_after=%" V8_PTR_PREFIX "d ", heap_->SizeOfObjects()); |
7126 PrintF("holes_size_before=%" V8_PTR_PREFIX "d ", | 7133 PrintF("holes_size_before=%" V8_PTR_PREFIX "d ", |
7127 in_free_list_or_wasted_before_gc_); | 7134 in_free_list_or_wasted_before_gc_); |
7128 PrintF("holes_size_after=%" V8_PTR_PREFIX "d ", CountTotalHolesSize()); | 7135 PrintF("holes_size_after=%" V8_PTR_PREFIX "d ", CountTotalHolesSize(heap_)); |
7129 | 7136 |
7130 PrintF("allocated=%" V8_PTR_PREFIX "d ", allocated_since_last_gc_); | 7137 PrintF("allocated=%" V8_PTR_PREFIX "d ", allocated_since_last_gc_); |
7131 PrintF("promoted=%" V8_PTR_PREFIX "d ", promoted_objects_size_); | 7138 PrintF("promoted=%" V8_PTR_PREFIX "d ", promoted_objects_size_); |
7132 PrintF("nodes_died_in_new=%d ", nodes_died_in_new_space_); | 7139 PrintF("nodes_died_in_new=%d ", nodes_died_in_new_space_); |
7133 PrintF("nodes_copied_in_new=%d ", nodes_copied_in_new_space_); | 7140 PrintF("nodes_copied_in_new=%d ", nodes_copied_in_new_space_); |
7134 PrintF("nodes_promoted=%d ", nodes_promoted_); | 7141 PrintF("nodes_promoted=%d ", nodes_promoted_); |
7135 | 7142 |
7136 if (collector_ == SCAVENGER) { | 7143 if (collector_ == SCAVENGER) { |
7137 PrintF("stepscount=%d ", steps_count_since_last_gc_); | 7144 PrintF("stepscount=%d ", steps_count_since_last_gc_); |
7138 PrintF("stepstook=%d ", static_cast<int>(steps_took_since_last_gc_)); | 7145 PrintF("stepstook=%d ", static_cast<int>(steps_took_since_last_gc_)); |
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7530 static_cast<int>(object_sizes_last_time_[index])); | 7537 static_cast<int>(object_sizes_last_time_[index])); |
7531 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(ADJUST_LAST_TIME_OBJECT_COUNT) | 7538 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(ADJUST_LAST_TIME_OBJECT_COUNT) |
7532 #undef ADJUST_LAST_TIME_OBJECT_COUNT | 7539 #undef ADJUST_LAST_TIME_OBJECT_COUNT |
7533 | 7540 |
7534 memcpy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); | 7541 memcpy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); |
7535 memcpy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); | 7542 memcpy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); |
7536 ClearObjectStats(); | 7543 ClearObjectStats(); |
7537 } | 7544 } |
7538 | 7545 |
7539 } } // namespace v8::internal | 7546 } } // namespace v8::internal |
OLD | NEW |