| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/heap/heap.h" | 5 #include "src/heap/heap.h" |
| 6 | 6 |
| 7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
| 8 #include "src/api.h" | 8 #include "src/api.h" |
| 9 #include "src/ast/scopeinfo.h" | 9 #include "src/ast/scopeinfo.h" |
| 10 #include "src/base/bits.h" | 10 #include "src/base/bits.h" |
| (...skipping 659 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 670 UpdateMaximumCommitted(); | 670 UpdateMaximumCommitted(); |
| 671 | 671 |
| 672 isolate_->counters()->alive_after_last_gc()->Set( | 672 isolate_->counters()->alive_after_last_gc()->Set( |
| 673 static_cast<int>(SizeOfObjects())); | 673 static_cast<int>(SizeOfObjects())); |
| 674 | 674 |
| 675 isolate_->counters()->string_table_capacity()->Set( | 675 isolate_->counters()->string_table_capacity()->Set( |
| 676 string_table()->Capacity()); | 676 string_table()->Capacity()); |
| 677 isolate_->counters()->number_of_symbols()->Set( | 677 isolate_->counters()->number_of_symbols()->Set( |
| 678 string_table()->NumberOfElements()); | 678 string_table()->NumberOfElements()); |
| 679 | 679 |
| 680 if (full_codegen_bytes_generated_ + crankshaft_codegen_bytes_generated_ > 0) { | |
| 681 isolate_->counters()->codegen_fraction_crankshaft()->AddSample( | |
| 682 static_cast<int>((crankshaft_codegen_bytes_generated_ * 100.0) / | |
| 683 (crankshaft_codegen_bytes_generated_ + | |
| 684 full_codegen_bytes_generated_))); | |
| 685 } | |
| 686 | |
| 687 if (CommittedMemory() > 0) { | 680 if (CommittedMemory() > 0) { |
| 688 isolate_->counters()->external_fragmentation_total()->AddSample( | 681 isolate_->counters()->external_fragmentation_total()->AddSample( |
| 689 static_cast<int>(100 - (SizeOfObjects() * 100.0) / CommittedMemory())); | 682 static_cast<int>(100 - (SizeOfObjects() * 100.0) / CommittedMemory())); |
| 690 | 683 |
| 691 isolate_->counters()->heap_fraction_new_space()->AddSample(static_cast<int>( | 684 isolate_->counters()->heap_fraction_new_space()->AddSample(static_cast<int>( |
| 692 (new_space()->CommittedMemory() * 100.0) / CommittedMemory())); | 685 (new_space()->CommittedMemory() * 100.0) / CommittedMemory())); |
| 693 isolate_->counters()->heap_fraction_old_space()->AddSample(static_cast<int>( | 686 isolate_->counters()->heap_fraction_old_space()->AddSample(static_cast<int>( |
| 694 (old_space()->CommittedMemory() * 100.0) / CommittedMemory())); | 687 (old_space()->CommittedMemory() * 100.0) / CommittedMemory())); |
| 695 isolate_->counters()->heap_fraction_code_space()->AddSample( | 688 isolate_->counters()->heap_fraction_code_space()->AddSample( |
| 696 static_cast<int>((code_space()->CommittedMemory() * 100.0) / | 689 static_cast<int>((code_space()->CommittedMemory() * 100.0) / |
| (...skipping 5750 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6447 } | 6440 } |
| 6448 | 6441 |
| 6449 | 6442 |
| 6450 // static | 6443 // static |
| 6451 int Heap::GetStaticVisitorIdForMap(Map* map) { | 6444 int Heap::GetStaticVisitorIdForMap(Map* map) { |
| 6452 return StaticVisitorBase::GetVisitorId(map); | 6445 return StaticVisitorBase::GetVisitorId(map); |
| 6453 } | 6446 } |
| 6454 | 6447 |
| 6455 } // namespace internal | 6448 } // namespace internal |
| 6456 } // namespace v8 | 6449 } // namespace v8 |
| OLD | NEW |