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

Unified Diff: src/heap.h

Issue 143153008: The allocation sites scratchpad becomes a heap data structure. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/v8.h ('k') | src/heap.cc » ('j') | src/heap.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap.h
diff --git a/src/heap.h b/src/heap.h
index 011ffd5e68b0179f4b524e8db227dbc952fe06b9..266cdb9684babcb887958522b7a5596aa181ff82 100644
--- a/src/heap.h
+++ b/src/heap.h
@@ -202,7 +202,8 @@ namespace internal {
V(SeededNumberDictionary, empty_slow_element_dictionary, \
EmptySlowElementDictionary) \
V(Symbol, observed_symbol, ObservedSymbol) \
- V(FixedArray, materialized_objects, MaterializedObjects)
+ V(FixedArray, materialized_objects, MaterializedObjects) \
+ V(FixedArray, allocation_sites_scratchpad, AllocationSitesScratchpad)
#define ROOT_LIST(V) \
STRONG_ROOT_LIST(V) \
@@ -2285,6 +2286,18 @@ class Heap {
// Flush the number to string cache.
void FlushNumberStringCache();
+ // Allocates a fixed-size allocation sites scratchpad.
+ MUST_USE_RESULT MaybeObject* AllocateAllocationSitesScratchpad();
+
+ // Sets used allocation sites entries to undefined.
+ void FlushAllocationSitesScratchpad();
+
+ // Initializes the allocation sites scratchpad with undefined values.
+ void InitializeAllocationSitesScratchpad();
+
+ // Adds an allocation site to the scratchpad if there is space left.
+ void AddAllocationSiteToScratchpad(AllocationSite* site);
+
void UpdateSurvivalRateTrend(int start_new_space_size);
enum SurvivalRateTrend { INCREASING, STABLE, DECREASING, FLUCTUATING };
@@ -2457,10 +2470,8 @@ class Heap {
int no_weak_object_verification_scope_depth_;
#endif
-
static const int kAllocationSiteScratchpadSize = 256;
- int allocation_sites_scratchpad_length;
- AllocationSite* allocation_sites_scratchpad[kAllocationSiteScratchpadSize];
+ int allocation_sites_scratchpad_length_;
static const int kMaxMarkSweepsInIdleRound = 7;
static const int kIdleScavengeThreshold = 5;
« no previous file with comments | « include/v8.h ('k') | src/heap.cc » ('j') | src/heap.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698