| Index: src/heap/heap.cc
|
| diff --git a/src/heap/heap.cc b/src/heap/heap.cc
|
| index cbc6d72ad839a31822e64cbd93df6503ccca5133..b0a7225b6e402fe415a1850020ea02bd7770c24c 100644
|
| --- a/src/heap/heap.cc
|
| +++ b/src/heap/heap.cc
|
| @@ -4448,6 +4448,15 @@ void Heap::MemoryPressureNotification(MemoryPressureLevel level,
|
| }
|
| }
|
|
|
| +void Heap::CollectCodeStatistics() {
|
| + PagedSpace::ResetCodeAndMetadataStatistics(isolate());
|
| + // We do not look for code in new space, or map space. If code
|
| + // somehow ends up in those spaces, we would miss it here.
|
| + code_space_->CollectCodeStatistics();
|
| + old_space_->CollectCodeStatistics();
|
| + lo_space_->CollectCodeStatistics();
|
| +}
|
| +
|
| #ifdef DEBUG
|
|
|
| void Heap::Print() {
|
| @@ -4462,11 +4471,7 @@ void Heap::Print() {
|
|
|
| void Heap::ReportCodeStatistics(const char* title) {
|
| PrintF(">>>>>> Code Stats (%s) >>>>>>\n", title);
|
| - PagedSpace::ResetCodeStatistics(isolate());
|
| - // We do not look for code in new space, map space, or old space. If code
|
| - // somehow ends up in those spaces, we would miss it here.
|
| - code_space_->CollectCodeStatistics();
|
| - lo_space_->CollectCodeStatistics();
|
| + CollectCodeStatistics();
|
| PagedSpace::ReportCodeStatistics(isolate());
|
| }
|
|
|
|
|