Chromium Code Reviews| Index: src/mark-compact.cc |
| diff --git a/src/mark-compact.cc b/src/mark-compact.cc |
| index dc2db4b096b76ddb7c36532a51be7106c9b6838b..3a4c0c4664b1f685e84a345374b9ace17ffeb706 100644 |
| --- a/src/mark-compact.cc |
| +++ b/src/mark-compact.cc |
| @@ -1004,7 +1004,8 @@ void CodeFlusher::ProcessJSFunctionCandidates() { |
| if (!code_mark.Get()) { |
| if (FLAG_trace_code_flushing && shared->is_compiled()) { |
| SmartArrayPointer<char> name = shared->DebugName()->ToCString(); |
| - PrintF("[code-flushing clears: %s]\n", *name); |
| + int age = FLAG_age_code ? code->GetAge() : shared->code_age(); |
| + PrintF("[code-flushing clears: %s - age: %d]\n", *name, age); |
|
Michael Starzinger
2013/06/11 17:30:07
Won't this age be constant since we at a certain a
Hannes Payer (out of office)
2013/06/12 08:56:32
True, an assert is more appropriate.
|
| } |
| shared->set_code(lazy_compile); |
| candidate->set_code(lazy_compile); |
| @@ -1045,7 +1046,8 @@ void CodeFlusher::ProcessSharedFunctionInfoCandidates() { |
| if (!code_mark.Get()) { |
| if (FLAG_trace_code_flushing && candidate->is_compiled()) { |
| SmartArrayPointer<char> name = candidate->DebugName()->ToCString(); |
| - PrintF("[code-flushing clears: %s]\n", *name); |
| + int age = FLAG_age_code ? code->GetAge() : candidate->code_age(); |
| + PrintF("[code-flushing clears: %s - age: %d]\n", *name, age); |
| } |
| candidate->set_code(lazy_compile); |
| } |
| @@ -1132,7 +1134,10 @@ void CodeFlusher::EvictCandidate(SharedFunctionInfo* shared_info) { |
| if (FLAG_trace_code_flushing) { |
| SmartArrayPointer<char> name = shared_info->DebugName()->ToCString(); |
| - PrintF("[code-flushing abandons function-info: %s]\n", *name); |
| + int age = FLAG_age_code ? |
| + shared_info->code()->GetAge() : shared_info->code_age(); |
| + PrintF("[code-flushing abandons function-info: %s - age: %d]\n", |
| + *name, age); |
| } |
| SharedFunctionInfo* candidate = shared_function_info_candidates_head_; |
| @@ -1168,7 +1173,9 @@ void CodeFlusher::EvictCandidate(JSFunction* function) { |
| if (FLAG_trace_code_flushing) { |
| SmartArrayPointer<char> name = function->shared()->DebugName()->ToCString(); |
| - PrintF("[code-flushing abandons closure: %s]\n", *name); |
| + int age = FLAG_age_code ? |
| + function->shared()->code()->GetAge() : function->shared()->code_age(); |
| + PrintF("[code-flushing abandons closure: %s - age: %d]\n", *name, age); |
| } |
| JSFunction* candidate = jsfunction_candidates_head_; |