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

Side by Side Diff: src/objects.cc

Issue 149393005: Make eager allocation site pretenuring decisions. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/heap-inl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 12715 matching lines...) Expand 10 before | Expand all | Expand 10 after
12726 void AllocationSite::ResetPretenureDecision() { 12726 void AllocationSite::ResetPretenureDecision() {
12727 set_pretenure_decision(kUndecided); 12727 set_pretenure_decision(kUndecided);
12728 set_memento_found_count(0); 12728 set_memento_found_count(0);
12729 set_memento_create_count(0); 12729 set_memento_create_count(0);
12730 } 12730 }
12731 12731
12732 12732
12733 PretenureFlag AllocationSite::GetPretenureMode() { 12733 PretenureFlag AllocationSite::GetPretenureMode() {
12734 PretenureDecision mode = pretenure_decision(); 12734 PretenureDecision mode = pretenure_decision();
12735 // Zombie objects "decide" to be untenured. 12735 // Zombie objects "decide" to be untenured.
12736 return (mode == kTenure && GetHeap()->GetPretenureMode() == TENURED) 12736 return mode == kTenure ? TENURED : NOT_TENURED;
12737 ? TENURED : NOT_TENURED;
12738 } 12737 }
12739 12738
12740 12739
12741 bool AllocationSite::IsNestedSite() { 12740 bool AllocationSite::IsNestedSite() {
12742 ASSERT(FLAG_trace_track_allocation_sites); 12741 ASSERT(FLAG_trace_track_allocation_sites);
12743 Object* current = GetHeap()->allocation_sites_list(); 12742 Object* current = GetHeap()->allocation_sites_list();
12744 while (current->IsAllocationSite()) { 12743 while (current->IsAllocationSite()) {
12745 AllocationSite* current_site = AllocationSite::cast(current); 12744 AllocationSite* current_site = AllocationSite::cast(current);
12746 if (current_site->nested_site() == this) { 12745 if (current_site->nested_site() == this) {
12747 return true; 12746 return true;
(...skipping 3676 matching lines...) Expand 10 before | Expand all | Expand 10 after
16424 #define ERROR_MESSAGES_TEXTS(C, T) T, 16423 #define ERROR_MESSAGES_TEXTS(C, T) T,
16425 static const char* error_messages_[] = { 16424 static const char* error_messages_[] = {
16426 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) 16425 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS)
16427 }; 16426 };
16428 #undef ERROR_MESSAGES_TEXTS 16427 #undef ERROR_MESSAGES_TEXTS
16429 return error_messages_[reason]; 16428 return error_messages_[reason];
16430 } 16429 }
16431 16430
16432 16431
16433 } } // namespace v8::internal 16432 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap-inl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698