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

Side by Side Diff: src/heap.h

Issue 2983001: Revert revisions 5041 and 5042 introducing virtual scavenge... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 5 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/factory.cc ('k') | src/heap.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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 756 matching lines...) Expand 10 before | Expand all | Expand 10 after
767 // Interpret marks as a bitvector of dirty marks for regions of size 767 // Interpret marks as a bitvector of dirty marks for regions of size
768 // Page::kRegionSize aligned by Page::kRegionAlignmentMask and covering 768 // Page::kRegionSize aligned by Page::kRegionAlignmentMask and covering
769 // memory interval from start to top. For each dirty region call a 769 // memory interval from start to top. For each dirty region call a
770 // visit_dirty_region callback. Return updated bitvector of dirty marks. 770 // visit_dirty_region callback. Return updated bitvector of dirty marks.
771 static uint32_t IterateDirtyRegions(uint32_t marks, 771 static uint32_t IterateDirtyRegions(uint32_t marks,
772 Address start, 772 Address start,
773 Address end, 773 Address end,
774 DirtyRegionCallback visit_dirty_region, 774 DirtyRegionCallback visit_dirty_region,
775 ObjectSlotCallback callback); 775 ObjectSlotCallback callback);
776 776
777 // Iterate pointers to from semispace of new space found in memory interval 777 // Iterate pointers to new space found in memory interval from start to end.
778 // from start to end.
779 // Update dirty marks for page containing start address. 778 // Update dirty marks for page containing start address.
780 static void IterateAndMarkPointersToFromSpace(Address start, 779 static void IterateAndMarkPointersToNewSpace(Address start,
781 Address end, 780 Address end,
782 ObjectSlotCallback callback); 781 ObjectSlotCallback callback);
783 782
784 // Iterate pointers to new space found in memory interval from start to end. 783 // Iterate pointers to new space found in memory interval from start to end.
785 // Return true if pointers to new space was found. 784 // Return true if pointers to new space was found.
786 static bool IteratePointersInDirtyRegion(Address start, 785 static bool IteratePointersInDirtyRegion(Address start,
787 Address end, 786 Address end,
788 ObjectSlotCallback callback); 787 ObjectSlotCallback callback);
789 788
790 789
791 // Iterate pointers to new space found in memory interval from start to end. 790 // Iterate pointers to new space found in memory interval from start to end.
792 // This interval is considered to belong to the map space. 791 // This interval is considered to belong to the map space.
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
979 978
980 static Object* NumberToString(Object* number, 979 static Object* NumberToString(Object* number,
981 bool check_number_string_cache = true); 980 bool check_number_string_cache = true);
982 981
983 static Map* MapForExternalArrayType(ExternalArrayType array_type); 982 static Map* MapForExternalArrayType(ExternalArrayType array_type);
984 static RootListIndex RootIndexForExternalArrayType( 983 static RootListIndex RootIndexForExternalArrayType(
985 ExternalArrayType array_type); 984 ExternalArrayType array_type);
986 985
987 static void RecordStats(HeapStats* stats); 986 static void RecordStats(HeapStats* stats);
988 987
989 static Scavenger GetScavenger(int instance_type, int instance_size);
990
991 // Copy block of memory from src to dst. Size of block should be aligned 988 // Copy block of memory from src to dst. Size of block should be aligned
992 // by pointer size. 989 // by pointer size.
993 static inline void CopyBlock(Address dst, Address src, int byte_size); 990 static inline void CopyBlock(Address dst, Address src, int byte_size);
994 991
995 static inline void CopyBlockToOldSpaceAndUpdateRegionMarks(Address dst, 992 static inline void CopyBlockToOldSpaceAndUpdateRegionMarks(Address dst,
996 Address src, 993 Address src,
997 int byte_size); 994 int byte_size);
998 995
999 // Optimized version of memmove for blocks with pointer size aligned sizes and 996 // Optimized version of memmove for blocks with pointer size aligned sizes and
1000 // pointer size aligned addresses. 997 // pointer size aligned addresses.
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
1228 static void MarkCompactPrologue(bool is_compacting); 1225 static void MarkCompactPrologue(bool is_compacting);
1229 static void MarkCompactEpilogue(bool is_compacting); 1226 static void MarkCompactEpilogue(bool is_compacting);
1230 1227
1231 // Completely clear the Instanceof cache (to stop it keeping objects alive 1228 // Completely clear the Instanceof cache (to stop it keeping objects alive
1232 // around a GC). 1229 // around a GC).
1233 static void CompletelyClearInstanceofCache() { 1230 static void CompletelyClearInstanceofCache() {
1234 set_instanceof_cache_map(the_hole_value()); 1231 set_instanceof_cache_map(the_hole_value());
1235 set_instanceof_cache_function(the_hole_value()); 1232 set_instanceof_cache_function(the_hole_value());
1236 } 1233 }
1237 1234
1235 // Helper function used by CopyObject to copy a source object to an
1236 // allocated target object and update the forwarding pointer in the source
1237 // object. Returns the target object.
1238 static inline HeapObject* MigrateObject(HeapObject* source,
1239 HeapObject* target,
1240 int size);
1241
1238 #if defined(DEBUG) || defined(ENABLE_LOGGING_AND_PROFILING) 1242 #if defined(DEBUG) || defined(ENABLE_LOGGING_AND_PROFILING)
1243 // Record the copy of an object in the NewSpace's statistics.
1244 static void RecordCopiedObject(HeapObject* obj);
1245
1239 // Record statistics before and after garbage collection. 1246 // Record statistics before and after garbage collection.
1240 static void ReportStatisticsBeforeGC(); 1247 static void ReportStatisticsBeforeGC();
1241 static void ReportStatisticsAfterGC(); 1248 static void ReportStatisticsAfterGC();
1242 #endif 1249 #endif
1243 1250
1244 // Slow part of scavenge object. 1251 // Slow part of scavenge object.
1245 static void ScavengeObjectSlow(HeapObject** p, HeapObject* object); 1252 static void ScavengeObjectSlow(HeapObject** p, HeapObject* object);
1246 1253
1247 // Initializes a function with a shared part and prototype. 1254 // Initializes a function with a shared part and prototype.
1248 // Returns the function. 1255 // Returns the function.
(...skipping 728 matching lines...) Expand 10 before | Expand all | Expand 10 after
1977 1984
1978 // To speed up scavenge collections new space string are kept 1985 // To speed up scavenge collections new space string are kept
1979 // separate from old space strings. 1986 // separate from old space strings.
1980 static List<Object*> new_space_strings_; 1987 static List<Object*> new_space_strings_;
1981 static List<Object*> old_space_strings_; 1988 static List<Object*> old_space_strings_;
1982 }; 1989 };
1983 1990
1984 } } // namespace v8::internal 1991 } } // namespace v8::internal
1985 1992
1986 #endif // V8_HEAP_H_ 1993 #endif // V8_HEAP_H_
OLDNEW
« no previous file with comments | « src/factory.cc ('k') | src/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698