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

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..769a3a80de7a9772b1ed773108020c25164b0887 100644
--- a/src/mark-compact.cc
+++ b/src/mark-compact.cc
@@ -1002,6 +1002,7 @@ void CodeFlusher::ProcessJSFunctionCandidates() {
Code* code = shared->code();
MarkBit code_mark = Marking::MarkBitFrom(code);
if (!code_mark.Get()) {
+ ASSERT(!FLAG_age_code || code->GetAge() >= Code::kSexagenarianCodeAge);
Michael Starzinger 2013/06/12 09:09:32 I don't think this assert is entirely correct, if
Michael Starzinger 2013/06/12 09:12:17 Sorry, should have been ... ASSERT(!FLAG_age_code
if (FLAG_trace_code_flushing && shared->is_compiled()) {
SmartArrayPointer<char> name = shared->DebugName()->ToCString();
PrintF("[code-flushing clears: %s]\n", *name);
@@ -1043,6 +1044,7 @@ void CodeFlusher::ProcessSharedFunctionInfoCandidates() {
Code* code = candidate->code();
MarkBit code_mark = Marking::MarkBitFrom(code);
if (!code_mark.Get()) {
+ ASSERT(!FLAG_age_code || code->GetAge() >= Code::kSexagenarianCodeAge);
danno 2013/06/12 09:08:13 Perhaps add a constant for Code::kOldCodeAge that
Michael Starzinger 2013/06/12 09:09:32 Likewise.
if (FLAG_trace_code_flushing && candidate->is_compiled()) {
SmartArrayPointer<char> name = candidate->DebugName()->ToCString();
PrintF("[code-flushing clears: %s]\n", *name);
« 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