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

Unified Diff: src/heap/heap.cc

Issue 1997363002: Adds support for collecting statistics about code and its metadata. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comments from Hannes. Created 4 years, 7 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/heap.h ('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 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());
}
« no previous file with comments | « src/heap/heap.h ('k') | src/heap/spaces.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698