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

Side by Side Diff: src/heap/heap.h

Issue 1420423009: [heap] Black allocation. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 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
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_HEAP_HEAP_H_ 5 #ifndef V8_HEAP_HEAP_H_
6 #define V8_HEAP_HEAP_H_ 6 #define V8_HEAP_HEAP_H_
7 7
8 #include <cmath> 8 #include <cmath>
9 #include <map> 9 #include <map>
10 10
(...skipping 1020 matching lines...) Expand 10 before | Expand all | Expand 10 after
1031 // Iterates over all roots in the heap. 1031 // Iterates over all roots in the heap.
1032 void IterateRoots(ObjectVisitor* v, VisitMode mode); 1032 void IterateRoots(ObjectVisitor* v, VisitMode mode);
1033 // Iterates over all strong roots in the heap. 1033 // Iterates over all strong roots in the heap.
1034 void IterateStrongRoots(ObjectVisitor* v, VisitMode mode); 1034 void IterateStrongRoots(ObjectVisitor* v, VisitMode mode);
1035 // Iterates over entries in the smi roots list. Only interesting to the 1035 // Iterates over entries in the smi roots list. Only interesting to the
1036 // serializer/deserializer, since GC does not care about smis. 1036 // serializer/deserializer, since GC does not care about smis.
1037 void IterateSmiRoots(ObjectVisitor* v); 1037 void IterateSmiRoots(ObjectVisitor* v);
1038 // Iterates over all the other roots in the heap. 1038 // Iterates over all the other roots in the heap.
1039 void IterateWeakRoots(ObjectVisitor* v, VisitMode mode); 1039 void IterateWeakRoots(ObjectVisitor* v, VisitMode mode);
1040 1040
1041 // Iterate pointers to from semispace of new space found in memory interval 1041 // Iterate pointers of promoted objects.
1042 // from start to end within |object|. 1042 void IteratePromotedObject(HeapObject* target, int size,
1043 void IteratePointersToFromSpace(HeapObject* target, int size, 1043 ObjectSlotCallback callback);
1044 ObjectSlotCallback callback);
1045 1044
1046 void IterateAndMarkPointersToFromSpace(HeapObject* object, Address start, 1045 void IteratePromotedObjectPointers(HeapObject* object, Address start,
1047 Address end, bool record_slots, 1046 Address end, bool record_slots,
1048 ObjectSlotCallback callback); 1047 ObjectSlotCallback callback);
1049 1048
1050 // =========================================================================== 1049 // ===========================================================================
1051 // Store buffer API. ========================================================= 1050 // Store buffer API. =========================================================
1052 // =========================================================================== 1051 // ===========================================================================
1053 1052
1054 // Write barrier support for object[offset] = o; 1053 // Write barrier support for object[offset] = o;
1055 inline void RecordWrite(Object* object, int offset, Object* o); 1054 inline void RecordWrite(Object* object, int offset, Object* o);
1056 1055
1057 Address* store_buffer_top_address() { 1056 Address* store_buffer_top_address() {
1058 return reinterpret_cast<Address*>(&roots_[kStoreBufferTopRootIndex]); 1057 return reinterpret_cast<Address*>(&roots_[kStoreBufferTopRootIndex]);
(...skipping 13 matching lines...) Expand all
1072 // stopped. 1071 // stopped.
1073 void StartIncrementalMarking(int gc_flags = kNoGCFlags, 1072 void StartIncrementalMarking(int gc_flags = kNoGCFlags,
1074 const GCCallbackFlags gc_callback_flags = 1073 const GCCallbackFlags gc_callback_flags =
1075 GCCallbackFlags::kNoGCCallbackFlags, 1074 GCCallbackFlags::kNoGCCallbackFlags,
1076 const char* reason = nullptr); 1075 const char* reason = nullptr);
1077 1076
1078 void FinalizeIncrementalMarkingIfComplete(const char* comment); 1077 void FinalizeIncrementalMarkingIfComplete(const char* comment);
1079 1078
1080 bool TryFinalizeIdleIncrementalMarking(double idle_time_in_ms); 1079 bool TryFinalizeIdleIncrementalMarking(double idle_time_in_ms);
1081 1080
1081 void RegisterReservationsForBlackAllocation(Reservation* reservations);
1082
1082 IncrementalMarking* incremental_marking() { return incremental_marking_; } 1083 IncrementalMarking* incremental_marking() { return incremental_marking_; }
1083 1084
1084 // =========================================================================== 1085 // ===========================================================================
1085 // External string table API. ================================================ 1086 // External string table API. ================================================
1086 // =========================================================================== 1087 // ===========================================================================
1087 1088
1088 // Registers an external string. 1089 // Registers an external string.
1089 inline void RegisterExternalString(String* string); 1090 inline void RegisterExternalString(String* string);
1090 1091
1091 // Finalizes an external string by deleting the associated external 1092 // Finalizes an external string by deleting the associated external
(...skipping 1103 matching lines...) Expand 10 before | Expand all | Expand 10 after
2195 // Used for testing purposes. 2196 // Used for testing purposes.
2196 bool force_oom_; 2197 bool force_oom_;
2197 2198
2198 // Classes in "heap" can be friends. 2199 // Classes in "heap" can be friends.
2199 friend class AlwaysAllocateScope; 2200 friend class AlwaysAllocateScope;
2200 friend class GCCallbacksScope; 2201 friend class GCCallbacksScope;
2201 friend class GCTracer; 2202 friend class GCTracer;
2202 friend class HeapIterator; 2203 friend class HeapIterator;
2203 friend class IdleScavengeObserver; 2204 friend class IdleScavengeObserver;
2204 friend class IncrementalMarking; 2205 friend class IncrementalMarking;
2205 friend class IteratePointersToFromSpaceVisitor; 2206 friend class IteratePromotedObjectsVisitor;
2206 friend class MarkCompactCollector; 2207 friend class MarkCompactCollector;
2207 friend class MarkCompactMarkingVisitor; 2208 friend class MarkCompactMarkingVisitor;
2208 friend class NewSpace; 2209 friend class NewSpace;
2209 friend class ObjectStatsVisitor; 2210 friend class ObjectStatsVisitor;
2210 friend class Page; 2211 friend class Page;
2211 friend class Scavenger; 2212 friend class Scavenger;
2212 friend class StoreBuffer; 2213 friend class StoreBuffer;
2213 2214
2214 // The allocator interface. 2215 // The allocator interface.
2215 friend class Factory; 2216 friend class Factory;
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
2621 2622
2622 private: 2623 private:
2623 friend class NewSpace; 2624 friend class NewSpace;
2624 DISALLOW_COPY_AND_ASSIGN(InlineAllocationObserver); 2625 DISALLOW_COPY_AND_ASSIGN(InlineAllocationObserver);
2625 }; 2626 };
2626 2627
2627 } // namespace internal 2628 } // namespace internal
2628 } // namespace v8 2629 } // namespace v8
2629 2630
2630 #endif // V8_HEAP_HEAP_H_ 2631 #endif // V8_HEAP_HEAP_H_
OLDNEW
« no previous file with comments | « src/flag-definitions.h ('k') | src/heap/heap.cc » ('j') | src/heap/heap.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698