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

Side by Side Diff: src/objects.h

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 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 4807 matching lines...) Expand 10 before | Expand all | Expand 10 after
4818 kLastCodeAge = kAfterLastCodeAge - 1, 4818 kLastCodeAge = kAfterLastCodeAge - 1,
4819 kCodeAgeCount = kAfterLastCodeAge - 1 4819 kCodeAgeCount = kAfterLastCodeAge - 1
4820 }; 4820 };
4821 #undef DECLARE_CODE_AGE_ENUM 4821 #undef DECLARE_CODE_AGE_ENUM
4822 4822
4823 // Code aging 4823 // Code aging
4824 static void MakeCodeAgeSequenceYoung(byte* sequence); 4824 static void MakeCodeAgeSequenceYoung(byte* sequence);
4825 void MakeOlder(MarkingParity); 4825 void MakeOlder(MarkingParity);
4826 static bool IsYoungSequence(byte* sequence); 4826 static bool IsYoungSequence(byte* sequence);
4827 bool IsOld(); 4827 bool IsOld();
4828 int GetAge();
4828 4829
4829 void PrintDeoptLocation(int bailout_id); 4830 void PrintDeoptLocation(int bailout_id);
4830 4831
4831 #ifdef VERIFY_HEAP 4832 #ifdef VERIFY_HEAP
4832 void VerifyEmbeddedMapsDependency(); 4833 void VerifyEmbeddedMapsDependency();
4833 #endif 4834 #endif
4834 4835
4835 // Max loop nesting marker used to postpose OSR. We don't take loop 4836 // Max loop nesting marker used to postpose OSR. We don't take loop
4836 // nesting that is deeper than 5 levels into account. 4837 // nesting that is deeper than 5 levels into account.
4837 static const int kMaxLoopNestingMarker = 6; 4838 static const int kMaxLoopNestingMarker = 6;
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
4959 4960
4960 // This constant should be encodable in an ARM instruction. 4961 // This constant should be encodable in an ARM instruction.
4961 static const int kFlagsNotUsedInLookup = 4962 static const int kFlagsNotUsedInLookup =
4962 TypeField::kMask | CacheHolderField::kMask; 4963 TypeField::kMask | CacheHolderField::kMask;
4963 4964
4964 private: 4965 private:
4965 friend class RelocIterator; 4966 friend class RelocIterator;
4966 4967
4967 // Code aging 4968 // Code aging
4968 byte* FindCodeAgeSequence(); 4969 byte* FindCodeAgeSequence();
4969 static void GetCodeAgeAndParity(Code* code, Age* age, 4970 static void GetCodeAgeAndParity(Code* code, Age* age,
4970 MarkingParity* parity); 4971 MarkingParity* parity);
4971 static void GetCodeAgeAndParity(byte* sequence, Age* age, 4972 static void GetCodeAgeAndParity(byte* sequence, Age* age,
4972 MarkingParity* parity); 4973 MarkingParity* parity);
4973 static Code* GetCodeAgeStub(Age age, MarkingParity parity); 4974 static Code* GetCodeAgeStub(Age age, MarkingParity parity);
4974 4975
4975 // Code aging -- platform-specific 4976 // Code aging -- platform-specific
4976 static void PatchPlatformCodeAge(byte* sequence, Age age, 4977 static void PatchPlatformCodeAge(byte* sequence, Age age,
4977 MarkingParity parity); 4978 MarkingParity parity);
4978 4979
4979 DISALLOW_IMPLICIT_CONSTRUCTORS(Code); 4980 DISALLOW_IMPLICIT_CONSTRUCTORS(Code);
4980 }; 4981 };
(...skipping 4682 matching lines...) Expand 10 before | Expand all | Expand 10 after
9663 } else { 9664 } else {
9664 value &= ~(1 << bit_position); 9665 value &= ~(1 << bit_position);
9665 } 9666 }
9666 return value; 9667 return value;
9667 } 9668 }
9668 }; 9669 };
9669 9670
9670 } } // namespace v8::internal 9671 } } // namespace v8::internal
9671 9672
9672 #endif // V8_OBJECTS_H_ 9673 #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