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

Side by Side Diff: src/objects.h

Issue 23480031: Enable preaging of code objects when --optimize-for-size. (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: <sigh> upload only the one commit... Created 7 years, 3 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 5126 matching lines...) Expand 10 before | Expand all | Expand 10 after
5137 DECLARE_PRINTER(Code) 5137 DECLARE_PRINTER(Code)
5138 DECLARE_VERIFIER(Code) 5138 DECLARE_VERIFIER(Code)
5139 5139
5140 void ClearInlineCaches(); 5140 void ClearInlineCaches();
5141 void ClearTypeFeedbackCells(Heap* heap); 5141 void ClearTypeFeedbackCells(Heap* heap);
5142 5142
5143 BailoutId TranslatePcOffsetToAstId(uint32_t pc_offset); 5143 BailoutId TranslatePcOffsetToAstId(uint32_t pc_offset);
5144 5144
5145 #define DECLARE_CODE_AGE_ENUM(X) k##X##CodeAge, 5145 #define DECLARE_CODE_AGE_ENUM(X) k##X##CodeAge,
5146 enum Age { 5146 enum Age {
5147 kNotExecutedCodeAge = -2,
5148 kExecutedOnceCodeAge = -1,
5147 kNoAge = 0, 5149 kNoAge = 0,
5148 CODE_AGE_LIST(DECLARE_CODE_AGE_ENUM) 5150 CODE_AGE_LIST(DECLARE_CODE_AGE_ENUM)
5149 kAfterLastCodeAge, 5151 kAfterLastCodeAge,
5150 kLastCodeAge = kAfterLastCodeAge - 1, 5152 kLastCodeAge = kAfterLastCodeAge - 1,
5151 kCodeAgeCount = kAfterLastCodeAge - 1 5153 kCodeAgeCount = kAfterLastCodeAge - 1,
5154 kPreAgedCodeAge = kQuinquagenarianCodeAge,
danno 2013/09/26 16:29:06 // This is probably clearer if it is kIsOldCodeAge
rmcilroy 2013/09/30 19:38:43 Done.
5155 kIsOldCodeAge = kSexagenarianCodeAge
5152 }; 5156 };
5153 #undef DECLARE_CODE_AGE_ENUM 5157 #undef DECLARE_CODE_AGE_ENUM
5154 5158
5155 // Code aging. Indicates how many full GCs this code has survived without 5159 // Code aging. Indicates how many full GCs this code has survived without
5156 // being entered through the prologue. Used to determine when it is 5160 // being entered through the prologue. Used to determine when it is
5157 // relatively safe to flush this code object and replace it with the lazy 5161 // relatively safe to flush this code object and replace it with the lazy
5158 // compilation stub. 5162 // compilation stub.
5159 static void MakeCodeAgeSequenceYoung(byte* sequence, Isolate* isolate); 5163 static void MakeCodeAgeSequenceYoung(byte* sequence, Isolate* isolate);
5164 static void MarkCodeAsExecuted(byte* sequence, Isolate* isolate);
5160 void MakeOlder(MarkingParity); 5165 void MakeOlder(MarkingParity);
5161 static bool IsYoungSequence(byte* sequence); 5166 static bool IsYoungSequence(byte* sequence);
5162 bool IsOld(); 5167 bool IsOld();
5163 int GetAge(); 5168 Age GetAge();
5169 static inline Code* GetPreAgedCodeAgeStub(Isolate* isolate) {
5170 return GetCodeAgeStub(isolate, kNotExecutedCodeAge, NO_MARKING_PARITY);
5171 }
5164 5172
5165 void PrintDeoptLocation(int bailout_id); 5173 void PrintDeoptLocation(int bailout_id);
5166 bool CanDeoptAt(Address pc); 5174 bool CanDeoptAt(Address pc);
5167 5175
5168 #ifdef VERIFY_HEAP 5176 #ifdef VERIFY_HEAP
5169 void VerifyEmbeddedMapsDependency(); 5177 void VerifyEmbeddedMapsDependency();
5170 #endif 5178 #endif
5171 5179
5172 // Max loop nesting marker used to postpose OSR. We don't take loop 5180 // Max loop nesting marker used to postpose OSR. We don't take loop
5173 // nesting that is deeper than 5 levels into account. 5181 // nesting that is deeper than 5 levels into account.
(...skipping 5075 matching lines...) Expand 10 before | Expand all | Expand 10 after
10249 } else { 10257 } else {
10250 value &= ~(1 << bit_position); 10258 value &= ~(1 << bit_position);
10251 } 10259 }
10252 return value; 10260 return value;
10253 } 10261 }
10254 }; 10262 };
10255 10263
10256 } } // namespace v8::internal 10264 } } // namespace v8::internal
10257 10265
10258 #endif // V8_OBJECTS_H_ 10266 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/builtins.h ('k') | src/objects.cc » ('j') | test/cctest/test-heap.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698