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

Side by Side Diff: src/heap.h

Issue 2950003: Virtually dispatched scavengers (Closed)
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
« 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 new space found in memory interval from start to end. 777 // Iterate pointers to from semispace of new space found in memory interval
778 // from start to end.
778 // Update dirty marks for page containing start address. 779 // Update dirty marks for page containing start address.
779 static void IterateAndMarkPointersToNewSpace(Address start, 780 static void IterateAndMarkPointersToFromSpace(Address start,
780 Address end, 781 Address end,
781 ObjectSlotCallback callback); 782 ObjectSlotCallback callback);
782 783
783 // Iterate pointers to new space found in memory interval from start to end. 784 // Iterate pointers to new space found in memory interval from start to end.
784 // Return true if pointers to new space was found. 785 // Return true if pointers to new space was found.
785 static bool IteratePointersInDirtyRegion(Address start, 786 static bool IteratePointersInDirtyRegion(Address start,
786 Address end, 787 Address end,
787 ObjectSlotCallback callback); 788 ObjectSlotCallback callback);
788 789
789 790
790 // Iterate pointers to new space found in memory interval from start to end. 791 // Iterate pointers to new space found in memory interval from start to end.
791 // This interval is considered to belong to the map space. 792 // This interval is considered to belong to the map space.
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
978 979
979 static Object* NumberToString(Object* number, 980 static Object* NumberToString(Object* number,
980 bool check_number_string_cache = true); 981 bool check_number_string_cache = true);
981 982
982 static Map* MapForExternalArrayType(ExternalArrayType array_type); 983 static Map* MapForExternalArrayType(ExternalArrayType array_type);
983 static RootListIndex RootIndexForExternalArrayType( 984 static RootListIndex RootIndexForExternalArrayType(
984 ExternalArrayType array_type); 985 ExternalArrayType array_type);
985 986
986 static void RecordStats(HeapStats* stats); 987 static void RecordStats(HeapStats* stats);
987 988
989 static Scavenger GetScavenger(int instance_type, int instance_size);
990
988 // Copy block of memory from src to dst. Size of block should be aligned 991 // Copy block of memory from src to dst. Size of block should be aligned
989 // by pointer size. 992 // by pointer size.
990 static inline void CopyBlock(Address dst, Address src, int byte_size); 993 static inline void CopyBlock(Address dst, Address src, int byte_size);
991 994
992 static inline void CopyBlockToOldSpaceAndUpdateRegionMarks(Address dst, 995 static inline void CopyBlockToOldSpaceAndUpdateRegionMarks(Address dst,
993 Address src, 996 Address src,
994 int byte_size); 997 int byte_size);
995 998
996 // Optimized version of memmove for blocks with pointer size aligned sizes and 999 // Optimized version of memmove for blocks with pointer size aligned sizes and
997 // pointer size aligned addresses. 1000 // pointer size aligned addresses.
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
1225 static void MarkCompactPrologue(bool is_compacting); 1228 static void MarkCompactPrologue(bool is_compacting);
1226 static void MarkCompactEpilogue(bool is_compacting); 1229 static void MarkCompactEpilogue(bool is_compacting);
1227 1230
1228 // Completely clear the Instanceof cache (to stop it keeping objects alive 1231 // Completely clear the Instanceof cache (to stop it keeping objects alive
1229 // around a GC). 1232 // around a GC).
1230 static void CompletelyClearInstanceofCache() { 1233 static void CompletelyClearInstanceofCache() {
1231 set_instanceof_cache_map(the_hole_value()); 1234 set_instanceof_cache_map(the_hole_value());
1232 set_instanceof_cache_function(the_hole_value()); 1235 set_instanceof_cache_function(the_hole_value());
1233 } 1236 }
1234 1237
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
1242 #if defined(DEBUG) || defined(ENABLE_LOGGING_AND_PROFILING) 1238 #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
1246 // Record statistics before and after garbage collection. 1239 // Record statistics before and after garbage collection.
1247 static void ReportStatisticsBeforeGC(); 1240 static void ReportStatisticsBeforeGC();
1248 static void ReportStatisticsAfterGC(); 1241 static void ReportStatisticsAfterGC();
1249 #endif 1242 #endif
1250 1243
1251 // Slow part of scavenge object. 1244 // Slow part of scavenge object.
1252 static void ScavengeObjectSlow(HeapObject** p, HeapObject* object); 1245 static void ScavengeObjectSlow(HeapObject** p, HeapObject* object);
1253 1246
1254 // Initializes a function with a shared part and prototype. 1247 // Initializes a function with a shared part and prototype.
1255 // Returns the function. 1248 // Returns the function.
(...skipping 728 matching lines...) Expand 10 before | Expand all | Expand 10 after
1984 1977
1985 // To speed up scavenge collections new space string are kept 1978 // To speed up scavenge collections new space string are kept
1986 // separate from old space strings. 1979 // separate from old space strings.
1987 static List<Object*> new_space_strings_; 1980 static List<Object*> new_space_strings_;
1988 static List<Object*> old_space_strings_; 1981 static List<Object*> old_space_strings_;
1989 }; 1982 };
1990 1983
1991 } } // namespace v8::internal 1984 } } // namespace v8::internal
1992 1985
1993 #endif // V8_HEAP_H_ 1986 #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