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

Unified Diff: src/mark-compact.cc

Issue 27023003: Add histograms to track fraction of heap spaces and percentage of crankshaft code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 2 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
« src/heap.h ('K') | « src/heap.cc ('k') | src/v8-counters.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mark-compact.cc
diff --git a/src/mark-compact.cc b/src/mark-compact.cc
index 65d838cdf95b895a8c86430f452f9b8e1715dcf2..963d95cd486d48efbaa784518bd0f96010e67218 100644
--- a/src/mark-compact.cc
+++ b/src/mark-compact.cc
@@ -1006,10 +1006,14 @@ void CodeFlusher::ProcessJSFunctionCandidates() {
Code* code = shared->code();
MarkBit code_mark = Marking::MarkBitFrom(code);
if (!code_mark.Get()) {
- if (FLAG_trace_code_flushing && shared->is_compiled()) {
- PrintF("[code-flushing clears: ");
- shared->ShortPrint();
- PrintF(" - age: %d]\n", code->GetAge());
+ if (shared->is_compiled()) {
+ isolate_->heap()->DecrementCodeGeneratedBytes(
Michael Starzinger 2013/10/14 09:18:37 IIUC, this tries to keep the new code-bytes counte
rmcilroy 2013/10/14 11:24:14 Ahh right - I thought code would be added to this
+ code->is_crankshafted(), code->instruction_size());
+ if (FLAG_trace_code_flushing) {
+ PrintF("[code-flushing clears: ");
+ shared->ShortPrint();
+ PrintF(" - age: %d]\n", code->GetAge());
+ }
}
shared->set_code(lazy_compile);
candidate->set_code(lazy_compile);
@@ -1053,6 +1057,10 @@ void CodeFlusher::ProcessSharedFunctionInfoCandidates() {
candidate->ShortPrint();
PrintF(" - age: %d]\n", code->GetAge());
}
+ if (candidate->is_compiled()) {
+ isolate_->heap()->DecrementCodeGeneratedBytes(
+ code->is_crankshafted(), code->instruction_size());
+ }
candidate->set_code(lazy_compile);
}
« src/heap.h ('K') | « src/heap.cc ('k') | src/v8-counters.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698