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); |
} |