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

Unified Diff: src/heap/heap.h

Issue 1659823002: [heap] Slightly optimize Heap::UpdateAllocationSite() (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/heap/heap-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/heap.h
diff --git a/src/heap/heap.h b/src/heap/heap.h
index 07cd73469c71fde4b86a1ed177c5704da8198649..3fdbd63df7252569676c7b5c85143a9451240408 100644
--- a/src/heap/heap.h
+++ b/src/heap/heap.h
@@ -442,17 +442,17 @@ class Heap {
kSmiRootsStart = kStringTableRootIndex + 1
};
+ enum FindMementoMode { kForRuntime, kForGC };
+
+ enum HeapState { NOT_IN_GC, SCAVENGE, MARK_COMPACT };
+
// Indicates whether live bytes adjustment is triggered
// - from within the GC code before sweeping started (SEQUENTIAL_TO_SWEEPER),
// - or from within GC (CONCURRENT_TO_SWEEPER),
// - or mutator code (CONCURRENT_TO_SWEEPER).
enum InvocationMode { SEQUENTIAL_TO_SWEEPER, CONCURRENT_TO_SWEEPER };
- enum PretenuringFeedbackInsertionMode { kCached, kGlobal };
Michael Lippautz 2016/02/02 09:15:35 We already had an enum (dead code) for that purpos
-
- enum FindMementoMode { kForRuntime, kForGC };
-
- enum HeapState { NOT_IN_GC, SCAVENGE, MARK_COMPACT };
+ enum UpdateAllocationSiteMode { kGlobal, kCached };
// Taking this lock prevents the GC from entering a phase that relocates
// object references.
@@ -1361,6 +1361,7 @@ class Heap {
// the corresponding allocation site is immediately updated and an entry
// in the hash map is created. Otherwise the entry (including a the count
// value) is cached on the local pretenuring feedback.
+ template <UpdateAllocationSiteMode mode>
inline void UpdateAllocationSite(HeapObject* object,
HashMap* pretenuring_feedback);
« no previous file with comments | « no previous file | src/heap/heap-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698