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

Unified Diff: src/mark-compact.cc

Issue 16509005: Implemented function that returns code age. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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 | « no previous file | src/objects.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 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_;
« no previous file with comments | « no previous file | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698