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

Side by Side Diff: src/heap/objects-visiting-inl.h

Issue 677043002: Flush code faster when doing emergency GCs. Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Change ReleaseUnoptimizedCode test to a harder test that fails without this CL Created 6 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/heap/mark-compact.cc ('k') | src/objects.h » ('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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_OBJECTS_VISITING_INL_H_ 5 #ifndef V8_OBJECTS_VISITING_INL_H_
6 #define V8_OBJECTS_VISITING_INL_H_ 6 #define V8_OBJECTS_VISITING_INL_H_
7 7
8 8
9 namespace v8 { 9 namespace v8 {
10 namespace internal { 10 namespace internal {
(...skipping 731 matching lines...) Expand 10 before | Expand all | Expand 10 after
742 if (!IsValidNonBuiltinContext(function->context())) { 742 if (!IsValidNonBuiltinContext(function->context())) {
743 return false; 743 return false;
744 } 744 }
745 745
746 // We do not (yet) flush code for optimized functions. 746 // We do not (yet) flush code for optimized functions.
747 if (function->code() != shared_info->code()) { 747 if (function->code() != shared_info->code()) {
748 return false; 748 return false;
749 } 749 }
750 750
751 // Check age of optimized code. 751 // Check age of optimized code.
752 if (FLAG_age_code && !function->code()->IsOld()) { 752 if (FLAG_age_code && !function->code()->IsOld(heap)) {
753 return false; 753 return false;
754 } 754 }
755 755
756 return IsFlushable(heap, shared_info); 756 return IsFlushable(heap, shared_info);
757 } 757 }
758 758
759 759
760 template <typename StaticVisitor> 760 template <typename StaticVisitor>
761 bool StaticMarkingVisitor<StaticVisitor>::IsFlushable( 761 bool StaticMarkingVisitor<StaticVisitor>::IsFlushable(
762 Heap* heap, SharedFunctionInfo* shared_info) { 762 Heap* heap, SharedFunctionInfo* shared_info) {
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
800 return false; 800 return false;
801 } 801 }
802 802
803 // If this is a function initialized with %SetCode then the one-to-one 803 // If this is a function initialized with %SetCode then the one-to-one
804 // relation between SharedFunctionInfo and Code is broken. 804 // relation between SharedFunctionInfo and Code is broken.
805 if (shared_info->dont_flush()) { 805 if (shared_info->dont_flush()) {
806 return false; 806 return false;
807 } 807 }
808 808
809 // Check age of code. If code aging is disabled we never flush. 809 // Check age of code. If code aging is disabled we never flush.
810 if (!FLAG_age_code || !shared_info->code()->IsOld()) { 810 if (!FLAG_age_code || !shared_info->code()->IsOld(heap)) {
811 return false; 811 return false;
812 } 812 }
813 813
814 return true; 814 return true;
815 } 815 }
816 816
817 817
818 template <typename StaticVisitor> 818 template <typename StaticVisitor>
819 void StaticMarkingVisitor<StaticVisitor>::VisitSharedFunctionInfoStrongCode( 819 void StaticMarkingVisitor<StaticVisitor>::VisitSharedFunctionInfoStrongCode(
820 Heap* heap, HeapObject* object) { 820 Heap* heap, HeapObject* object) {
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
944 944
945 RelocIterator it(this, mode_mask); 945 RelocIterator it(this, mode_mask);
946 for (; !it.done(); it.next()) { 946 for (; !it.done(); it.next()) {
947 it.rinfo()->template Visit<StaticVisitor>(heap); 947 it.rinfo()->template Visit<StaticVisitor>(heap);
948 } 948 }
949 } 949 }
950 } 950 }
951 } // namespace v8::internal 951 } // namespace v8::internal
952 952
953 #endif // V8_OBJECTS_VISITING_INL_H_ 953 #endif // V8_OBJECTS_VISITING_INL_H_
OLDNEW
« no previous file with comments | « src/heap/mark-compact.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698