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

Side by Side Diff: src/heap.h

Issue 7044082: Minor cleanup of StoreBuffer related heap iteration methods. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/gc
Patch Set: Created 9 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 | « no previous file | src/heap.cc » ('j') | src/store-buffer.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 // Forward declarations. 221 // Forward declarations.
222 class GCTracer; 222 class GCTracer;
223 class HeapStats; 223 class HeapStats;
224 class Isolate; 224 class Isolate;
225 class WeakObjectRetainer; 225 class WeakObjectRetainer;
226 226
227 227
228 typedef String* (*ExternalStringTableUpdaterCallback)(Heap* heap, 228 typedef String* (*ExternalStringTableUpdaterCallback)(Heap* heap,
229 Object** pointer); 229 Object** pointer);
230 230
231 typedef void (*PointerRegionCallback)(Heap* heap,
232 Address start,
233 Address end,
234 ObjectSlotCallback copy_object_func);
235
236 class StoreBufferRebuilder { 231 class StoreBufferRebuilder {
237 public: 232 public:
238 explicit StoreBufferRebuilder(StoreBuffer* store_buffer) 233 explicit StoreBufferRebuilder(StoreBuffer* store_buffer)
239 : store_buffer_(store_buffer) { 234 : store_buffer_(store_buffer) {
240 } 235 }
241 236
242 void Callback(MemoryChunk* page, StoreBufferEvent event); 237 void Callback(MemoryChunk* page, StoreBufferEvent event);
243 238
244 private: 239 private:
245 StoreBuffer* store_buffer_; 240 StoreBuffer* store_buffer_;
(...skipping 710 matching lines...) Expand 10 before | Expand all | Expand 10 after
956 } 951 }
957 Object* global_contexts_list() { return global_contexts_list_; } 952 Object* global_contexts_list() { return global_contexts_list_; }
958 953
959 // Iterates over all roots in the heap. 954 // Iterates over all roots in the heap.
960 void IterateRoots(ObjectVisitor* v, VisitMode mode); 955 void IterateRoots(ObjectVisitor* v, VisitMode mode);
961 // Iterates over all strong roots in the heap. 956 // Iterates over all strong roots in the heap.
962 void IterateStrongRoots(ObjectVisitor* v, VisitMode mode); 957 void IterateStrongRoots(ObjectVisitor* v, VisitMode mode);
963 // Iterates over all the other roots in the heap. 958 // Iterates over all the other roots in the heap.
964 void IterateWeakRoots(ObjectVisitor* v, VisitMode mode); 959 void IterateWeakRoots(ObjectVisitor* v, VisitMode mode);
965 960
966 // For each region of pointers on a page in use from an old space call
967 // visit_pointer_region callback.
968 // If either visit_pointer_region or callback can cause an allocation
969 // in old space and changes in allocation watermark then
970 // can_preallocate_during_iteration should be set to true.
971 // All pages will be marked as having invalid watermark upon
972 // iteration completion.
973 void IteratePointers(
974 PagedSpace* space,
975 PointerRegionCallback visit_pointer_region,
976 ObjectSlotCallback callback);
977 static void IteratePointersOnPage(
978 PagedSpace* space,
979 PointerRegionCallback visit_pointer_region,
980 ObjectSlotCallback callback,
981 Page* page);
982
983 // Iterate pointers to from semispace of new space found in memory interval 961 // Iterate pointers to from semispace of new space found in memory interval
984 // from start to end. 962 // from start to end.
985 void IterateAndMarkPointersToFromSpace(Address start, 963 void IterateAndMarkPointersToFromSpace(Address start,
986 Address end, 964 Address end,
987 ObjectSlotCallback callback); 965 ObjectSlotCallback callback);
988 966
989 // Iterate pointers to new space found in memory interval from start to end. 967 // Iterate pointers to new space found in memory interval from start to end.
990 static void IteratePointersToNewSpace(Heap* heap, 968 static void IteratePointersToNewSpace(Heap* heap,
991 Address start, 969 Address start,
992 Address end, 970 Address end,
(...skipping 1363 matching lines...) Expand 10 before | Expand all | Expand 10 after
2356 2334
2357 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); 2335 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer);
2358 }; 2336 };
2359 #endif // DEBUG || LIVE_OBJECT_LIST 2337 #endif // DEBUG || LIVE_OBJECT_LIST
2360 2338
2361 } } // namespace v8::internal 2339 } } // namespace v8::internal
2362 2340
2363 #undef HEAP 2341 #undef HEAP
2364 2342
2365 #endif // V8_HEAP_H_ 2343 #endif // V8_HEAP_H_
OLDNEW
« no previous file with comments | « no previous file | src/heap.cc » ('j') | src/store-buffer.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698