Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(367)

Unified Diff: src/heap/heap.cc

Issue 2082863003: Refactor the functions related to collecting code statistics to a new class. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/heap/code-stats.cc ('k') | src/heap/spaces.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/heap.cc
diff --git a/src/heap/heap.cc b/src/heap/heap.cc
index 5605291a7dff5bf55c833a9491955c31313e2f56..71bd1a916b7d46da9012d2bdcc3454070a5a0c0b 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -18,6 +18,7 @@
#include "src/deoptimizer.h"
#include "src/global-handles.h"
#include "src/heap/array-buffer-tracker-inl.h"
+#include "src/heap/code-stats.h"
#include "src/heap/gc-idle-time-handler.h"
#include "src/heap/gc-tracer.h"
#include "src/heap/incremental-marking.h"
@@ -4467,12 +4468,12 @@ void Heap::MemoryPressureNotification(MemoryPressureLevel level,
}
void Heap::CollectCodeStatistics() {
- PagedSpace::ResetCodeAndMetadataStatistics(isolate());
+ CodeStatistics::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();
+ CodeStatistics::CollectCodeStatistics(code_space_, isolate());
+ CodeStatistics::CollectCodeStatistics(old_space_, isolate());
+ CodeStatistics::CollectCodeStatistics(lo_space_, isolate());
}
#ifdef DEBUG
@@ -4490,7 +4491,7 @@ void Heap::Print() {
void Heap::ReportCodeStatistics(const char* title) {
PrintF(">>>>>> Code Stats (%s) >>>>>>\n", title);
CollectCodeStatistics();
- PagedSpace::ReportCodeStatistics(isolate());
+ CodeStatistics::ReportCodeStatistics(isolate());
}
« no previous file with comments | « src/heap/code-stats.cc ('k') | src/heap/spaces.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698