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

Side by Side Diff: src/objects.h

Issue 40003002: Add support for tracking NotExectuted/ExecutedOnceCodeAge's when --track_gc_object_stats flag is se… (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix nit Created 7 years, 1 month 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/mark-compact.cc ('k') | src/objects.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 5299 matching lines...) Expand 10 before | Expand all | Expand 10 after
5310 5310
5311 BailoutId TranslatePcOffsetToAstId(uint32_t pc_offset); 5311 BailoutId TranslatePcOffsetToAstId(uint32_t pc_offset);
5312 5312
5313 #define DECLARE_CODE_AGE_ENUM(X) k##X##CodeAge, 5313 #define DECLARE_CODE_AGE_ENUM(X) k##X##CodeAge,
5314 enum Age { 5314 enum Age {
5315 kNotExecutedCodeAge = -2, 5315 kNotExecutedCodeAge = -2,
5316 kExecutedOnceCodeAge = -1, 5316 kExecutedOnceCodeAge = -1,
5317 kNoAgeCodeAge = 0, 5317 kNoAgeCodeAge = 0,
5318 CODE_AGE_LIST(DECLARE_CODE_AGE_ENUM) 5318 CODE_AGE_LIST(DECLARE_CODE_AGE_ENUM)
5319 kAfterLastCodeAge, 5319 kAfterLastCodeAge,
5320 kFirstCodeAge = kNotExecutedCodeAge,
5320 kLastCodeAge = kAfterLastCodeAge - 1, 5321 kLastCodeAge = kAfterLastCodeAge - 1,
5321 kCodeAgeCount = kAfterLastCodeAge - 1, 5322 kCodeAgeCount = kAfterLastCodeAge - kNotExecutedCodeAge - 1,
5322 kIsOldCodeAge = kSexagenarianCodeAge, 5323 kIsOldCodeAge = kSexagenarianCodeAge,
5323 kPreAgedCodeAge = kIsOldCodeAge - 1 5324 kPreAgedCodeAge = kIsOldCodeAge - 1
5324 }; 5325 };
5325 #undef DECLARE_CODE_AGE_ENUM 5326 #undef DECLARE_CODE_AGE_ENUM
5326 5327
5327 // Code aging. Indicates how many full GCs this code has survived without 5328 // Code aging. Indicates how many full GCs this code has survived without
5328 // being entered through the prologue. Used to determine when it is 5329 // being entered through the prologue. Used to determine when it is
5329 // relatively safe to flush this code object and replace it with the lazy 5330 // relatively safe to flush this code object and replace it with the lazy
5330 // compilation stub. 5331 // compilation stub.
5331 static void MakeCodeAgeSequenceYoung(byte* sequence, Isolate* isolate); 5332 static void MakeCodeAgeSequenceYoung(byte* sequence, Isolate* isolate);
5332 static void MarkCodeAsExecuted(byte* sequence, Isolate* isolate); 5333 static void MarkCodeAsExecuted(byte* sequence, Isolate* isolate);
5333 void MakeOlder(MarkingParity); 5334 void MakeOlder(MarkingParity);
5334 static bool IsYoungSequence(byte* sequence); 5335 static bool IsYoungSequence(byte* sequence);
5335 bool IsOld(); 5336 bool IsOld();
5336 Age GetAge(); 5337 Age GetAge();
5338 // Gets the raw code age, including psuedo code-age values such as
5339 // kNotExecutedCodeAge and kExecutedOnceCodeAge.
5340 Age GetRawAge();
5337 static inline Code* GetPreAgedCodeAgeStub(Isolate* isolate) { 5341 static inline Code* GetPreAgedCodeAgeStub(Isolate* isolate) {
5338 return GetCodeAgeStub(isolate, kNotExecutedCodeAge, NO_MARKING_PARITY); 5342 return GetCodeAgeStub(isolate, kNotExecutedCodeAge, NO_MARKING_PARITY);
5339 } 5343 }
5340 5344
5341 void PrintDeoptLocation(int bailout_id); 5345 void PrintDeoptLocation(int bailout_id);
5342 bool CanDeoptAt(Address pc); 5346 bool CanDeoptAt(Address pc);
5343 5347
5344 #ifdef VERIFY_HEAP 5348 #ifdef VERIFY_HEAP
5345 void VerifyEmbeddedObjectsDependency(); 5349 void VerifyEmbeddedObjectsDependency();
5346 #endif 5350 #endif
(...skipping 5093 matching lines...) Expand 10 before | Expand all | Expand 10 after
10440 } else { 10444 } else {
10441 value &= ~(1 << bit_position); 10445 value &= ~(1 << bit_position);
10442 } 10446 }
10443 return value; 10447 return value;
10444 } 10448 }
10445 }; 10449 };
10446 10450
10447 } } // namespace v8::internal 10451 } } // namespace v8::internal
10448 10452
10449 #endif // V8_OBJECTS_H_ 10453 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/mark-compact.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698