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 5607 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5618 static_cast<intptr_t>(FLAG_max_old_space_size) * MB, | 5618 static_cast<intptr_t>(FLAG_max_old_space_size) * MB, |
5619 static_cast<intptr_t>(FLAG_max_executable_size) * MB); | 5619 static_cast<intptr_t>(FLAG_max_executable_size) * MB); |
5620 } | 5620 } |
5621 | 5621 |
5622 | 5622 |
5623 void Heap::RecordStats(HeapStats* stats, bool take_snapshot) { | 5623 void Heap::RecordStats(HeapStats* stats, bool take_snapshot) { |
5624 *stats->start_marker = HeapStats::kStartMarker; | 5624 *stats->start_marker = HeapStats::kStartMarker; |
5625 *stats->end_marker = HeapStats::kEndMarker; | 5625 *stats->end_marker = HeapStats::kEndMarker; |
5626 *stats->new_space_size = new_space_.SizeAsInt(); | 5626 *stats->new_space_size = new_space_.SizeAsInt(); |
5627 *stats->new_space_capacity = static_cast<int>(new_space_.Capacity()); | 5627 *stats->new_space_capacity = static_cast<int>(new_space_.Capacity()); |
5628 *stats->old_pointer_space_size = old_pointer_space_->Size(); | 5628 *stats->old_pointer_space_size = old_pointer_space_->SizeOfObjects(); |
5629 *stats->old_pointer_space_capacity = old_pointer_space_->Capacity(); | 5629 *stats->old_pointer_space_capacity = old_pointer_space_->Capacity(); |
5630 *stats->old_data_space_size = old_data_space_->Size(); | 5630 *stats->old_data_space_size = old_data_space_->SizeOfObjects(); |
5631 *stats->old_data_space_capacity = old_data_space_->Capacity(); | 5631 *stats->old_data_space_capacity = old_data_space_->Capacity(); |
5632 *stats->code_space_size = code_space_->Size(); | 5632 *stats->code_space_size = code_space_->SizeOfObjects(); |
5633 *stats->code_space_capacity = code_space_->Capacity(); | 5633 *stats->code_space_capacity = code_space_->Capacity(); |
5634 *stats->map_space_size = map_space_->Size(); | 5634 *stats->map_space_size = map_space_->SizeOfObjects(); |
5635 *stats->map_space_capacity = map_space_->Capacity(); | 5635 *stats->map_space_capacity = map_space_->Capacity(); |
5636 *stats->cell_space_size = cell_space_->Size(); | 5636 *stats->cell_space_size = cell_space_->SizeOfObjects(); |
5637 *stats->cell_space_capacity = cell_space_->Capacity(); | 5637 *stats->cell_space_capacity = cell_space_->Capacity(); |
5638 *stats->lo_space_size = lo_space_->Size(); | 5638 *stats->lo_space_size = lo_space_->Size(); |
5639 isolate_->global_handles()->RecordStats(stats); | 5639 isolate_->global_handles()->RecordStats(stats); |
5640 *stats->memory_allocator_size = isolate()->memory_allocator()->Size(); | 5640 *stats->memory_allocator_size = isolate()->memory_allocator()->Size(); |
5641 *stats->memory_allocator_capacity = | 5641 *stats->memory_allocator_capacity = |
5642 isolate()->memory_allocator()->Size() + | 5642 isolate()->memory_allocator()->Size() + |
5643 isolate()->memory_allocator()->Available(); | 5643 isolate()->memory_allocator()->Available(); |
5644 *stats->os_error = OS::GetLastError(); | 5644 *stats->os_error = OS::GetLastError(); |
5645 isolate()->memory_allocator()->Available(); | 5645 isolate()->memory_allocator()->Available(); |
5646 if (take_snapshot) { | 5646 if (take_snapshot) { |
(...skipping 1318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6965 isolate_->heap()->store_buffer()->Compact(); | 6965 isolate_->heap()->store_buffer()->Compact(); |
6966 isolate_->heap()->store_buffer()->Filter(MemoryChunk::ABOUT_TO_BE_FREED); | 6966 isolate_->heap()->store_buffer()->Filter(MemoryChunk::ABOUT_TO_BE_FREED); |
6967 for (chunk = chunks_queued_for_free_; chunk != NULL; chunk = next) { | 6967 for (chunk = chunks_queued_for_free_; chunk != NULL; chunk = next) { |
6968 next = chunk->next_chunk(); | 6968 next = chunk->next_chunk(); |
6969 isolate_->memory_allocator()->Free(chunk); | 6969 isolate_->memory_allocator()->Free(chunk); |
6970 } | 6970 } |
6971 chunks_queued_for_free_ = NULL; | 6971 chunks_queued_for_free_ = NULL; |
6972 } | 6972 } |
6973 | 6973 |
6974 } } // namespace v8::internal | 6974 } } // namespace v8::internal |
OLD | NEW |