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

Side by Side Diff: src/objects.h

Issue 96783002: Allocation site pretenuring. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 11 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
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 8139 matching lines...) Expand 10 before | Expand all | Expand 10 after
8150 class ElementsKindBits: public BitField<ElementsKind, 0, 15> {}; 8150 class ElementsKindBits: public BitField<ElementsKind, 0, 15> {};
8151 class UnusedBits: public BitField<int, 15, 14> {}; 8151 class UnusedBits: public BitField<int, 15, 14> {};
8152 class DoNotInlineBit: public BitField<bool, 29, 1> {}; 8152 class DoNotInlineBit: public BitField<bool, 29, 1> {};
8153 8153
8154 // Increments the mementos found counter and returns true when the first 8154 // Increments the mementos found counter and returns true when the first
8155 // memento was found for a given allocation site. 8155 // memento was found for a given allocation site.
8156 inline bool IncrementMementoFoundCount(); 8156 inline bool IncrementMementoFoundCount();
8157 8157
8158 inline void IncrementMementoCreateCount(); 8158 inline void IncrementMementoCreateCount();
8159 8159
8160 PretenureFlag GetPretenureMode() { 8160 PretenureFlag GetPretenureMode();
8161 int mode = pretenure_decision()->value(); 8161
8162 // Zombie objects "decide" to be untenured. 8162 void ResetPretenureDecision();
8163 return (mode == kTenure) ? TENURED : NOT_TENURED;
8164 }
8165 8163
8166 // The pretenuring decision is made during gc, and the zombie state allows 8164 // The pretenuring decision is made during gc, and the zombie state allows
8167 // us to recognize when an allocation site is just being kept alive because 8165 // us to recognize when an allocation site is just being kept alive because
8168 // a later traversal of new space may discover AllocationMementos that point 8166 // a later traversal of new space may discover AllocationMementos that point
8169 // to this AllocationSite. 8167 // to this AllocationSite.
8170 bool IsZombie() { 8168 bool IsZombie() {
8171 return pretenure_decision()->value() == kZombie; 8169 return pretenure_decision()->value() == kZombie;
8172 } 8170 }
8173 8171
8174 inline void MarkZombie(); 8172 inline void MarkZombie();
(...skipping 2452 matching lines...) Expand 10 before | Expand all | Expand 10 after
10627 } else { 10625 } else {
10628 value &= ~(1 << bit_position); 10626 value &= ~(1 << bit_position);
10629 } 10627 }
10630 return value; 10628 return value;
10631 } 10629 }
10632 }; 10630 };
10633 10631
10634 } } // namespace v8::internal 10632 } } // namespace v8::internal
10635 10633
10636 #endif // V8_OBJECTS_H_ 10634 #endif // V8_OBJECTS_H_
OLDNEW
« src/heap-inl.h ('K') | « src/hydrogen.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698