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

Side by Side Diff: src/heap.h

Issue 149403003: A64: Synchronize with r19234. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/flag-definitions.h ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 V(Smi, getter_stub_deopt_pc_offset, GetterStubDeoptPCOffset) \ 195 V(Smi, getter_stub_deopt_pc_offset, GetterStubDeoptPCOffset) \
196 V(Smi, setter_stub_deopt_pc_offset, SetterStubDeoptPCOffset) \ 196 V(Smi, setter_stub_deopt_pc_offset, SetterStubDeoptPCOffset) \
197 V(Cell, undefined_cell, UndefineCell) \ 197 V(Cell, undefined_cell, UndefineCell) \
198 V(JSObject, observation_state, ObservationState) \ 198 V(JSObject, observation_state, ObservationState) \
199 V(Map, external_map, ExternalMap) \ 199 V(Map, external_map, ExternalMap) \
200 V(Symbol, frozen_symbol, FrozenSymbol) \ 200 V(Symbol, frozen_symbol, FrozenSymbol) \
201 V(Symbol, elements_transition_symbol, ElementsTransitionSymbol) \ 201 V(Symbol, elements_transition_symbol, ElementsTransitionSymbol) \
202 V(SeededNumberDictionary, empty_slow_element_dictionary, \ 202 V(SeededNumberDictionary, empty_slow_element_dictionary, \
203 EmptySlowElementDictionary) \ 203 EmptySlowElementDictionary) \
204 V(Symbol, observed_symbol, ObservedSymbol) \ 204 V(Symbol, observed_symbol, ObservedSymbol) \
205 V(FixedArray, materialized_objects, MaterializedObjects) 205 V(FixedArray, materialized_objects, MaterializedObjects) \
206 V(FixedArray, allocation_sites_scratchpad, AllocationSitesScratchpad)
206 207
207 #define ROOT_LIST(V) \ 208 #define ROOT_LIST(V) \
208 STRONG_ROOT_LIST(V) \ 209 STRONG_ROOT_LIST(V) \
209 V(StringTable, string_table, StringTable) 210 V(StringTable, string_table, StringTable)
210 211
211 // Heap roots that are known to be immortal immovable, for which we can safely 212 // Heap roots that are known to be immortal immovable, for which we can safely
212 // skip write barriers. 213 // skip write barriers.
213 #define IMMORTAL_IMMOVABLE_ROOT_LIST(V) \ 214 #define IMMORTAL_IMMOVABLE_ROOT_LIST(V) \
214 V(byte_array_map) \ 215 V(byte_array_map) \
215 V(free_space_map) \ 216 V(free_space_map) \
(...skipping 1900 matching lines...) Expand 10 before | Expand all | Expand 10 after
2116 void ProcessPretenuringFeedback(); 2117 void ProcessPretenuringFeedback();
2117 2118
2118 // Checks whether a global GC is necessary 2119 // Checks whether a global GC is necessary
2119 GarbageCollector SelectGarbageCollector(AllocationSpace space, 2120 GarbageCollector SelectGarbageCollector(AllocationSpace space,
2120 const char** reason); 2121 const char** reason);
2121 2122
2122 // Performs garbage collection operation. 2123 // Performs garbage collection operation.
2123 // Returns whether there is a chance that another major GC could 2124 // Returns whether there is a chance that another major GC could
2124 // collect more garbage. 2125 // collect more garbage.
2125 bool CollectGarbage( 2126 bool CollectGarbage(
2126 AllocationSpace space,
2127 GarbageCollector collector, 2127 GarbageCollector collector,
2128 const char* gc_reason, 2128 const char* gc_reason,
2129 const char* collector_reason, 2129 const char* collector_reason,
2130 const GCCallbackFlags gc_callback_flags = kNoGCCallbackFlags); 2130 const GCCallbackFlags gc_callback_flags = kNoGCCallbackFlags);
2131 2131
2132 // Performs garbage collection 2132 // Performs garbage collection
2133 // Returns whether there is a chance another major GC could 2133 // Returns whether there is a chance another major GC could
2134 // collect more garbage. 2134 // collect more garbage.
2135 bool PerformGarbageCollection( 2135 bool PerformGarbageCollection(
2136 GarbageCollector collector, 2136 GarbageCollector collector,
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
2279 // Allocates a small number to string cache. 2279 // Allocates a small number to string cache.
2280 MUST_USE_RESULT MaybeObject* AllocateInitialNumberStringCache(); 2280 MUST_USE_RESULT MaybeObject* AllocateInitialNumberStringCache();
2281 // Creates and installs the full-sized number string cache. 2281 // Creates and installs the full-sized number string cache.
2282 void AllocateFullSizeNumberStringCache(); 2282 void AllocateFullSizeNumberStringCache();
2283 // Get the length of the number to string cache based on the max semispace 2283 // Get the length of the number to string cache based on the max semispace
2284 // size. 2284 // size.
2285 int FullSizeNumberStringCacheLength(); 2285 int FullSizeNumberStringCacheLength();
2286 // Flush the number to string cache. 2286 // Flush the number to string cache.
2287 void FlushNumberStringCache(); 2287 void FlushNumberStringCache();
2288 2288
2289 // Allocates a fixed-size allocation sites scratchpad.
2290 MUST_USE_RESULT MaybeObject* AllocateAllocationSitesScratchpad();
2291
2292 // Sets used allocation sites entries to undefined.
2293 void FlushAllocationSitesScratchpad();
2294
2295 // Initializes the allocation sites scratchpad with undefined values.
2296 void InitializeAllocationSitesScratchpad();
2297
2298 // Adds an allocation site to the scratchpad if there is space left.
2299 void AddAllocationSiteToScratchpad(AllocationSite* site);
2300
2289 void UpdateSurvivalRateTrend(int start_new_space_size); 2301 void UpdateSurvivalRateTrend(int start_new_space_size);
2290 2302
2291 enum SurvivalRateTrend { INCREASING, STABLE, DECREASING, FLUCTUATING }; 2303 enum SurvivalRateTrend { INCREASING, STABLE, DECREASING, FLUCTUATING };
2292 2304
2293 static const int kYoungSurvivalRateHighThreshold = 90; 2305 static const int kYoungSurvivalRateHighThreshold = 90;
2294 static const int kYoungSurvivalRateLowThreshold = 10; 2306 static const int kYoungSurvivalRateLowThreshold = 10;
2295 static const int kYoungSurvivalRateAllowedDeviation = 15; 2307 static const int kYoungSurvivalRateAllowedDeviation = 15;
2296 2308
2297 static const int kOldSurvivalRateLowThreshold = 20; 2309 static const int kOldSurvivalRateLowThreshold = 20;
2298 2310
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
2451 2463
2452 // If the --deopt_every_n_garbage_collections flag is set to a positive value, 2464 // If the --deopt_every_n_garbage_collections flag is set to a positive value,
2453 // this variable holds the number of garbage collections since the last 2465 // this variable holds the number of garbage collections since the last
2454 // deoptimization triggered by garbage collection. 2466 // deoptimization triggered by garbage collection.
2455 int gcs_since_last_deopt_; 2467 int gcs_since_last_deopt_;
2456 2468
2457 #ifdef VERIFY_HEAP 2469 #ifdef VERIFY_HEAP
2458 int no_weak_object_verification_scope_depth_; 2470 int no_weak_object_verification_scope_depth_;
2459 #endif 2471 #endif
2460 2472
2461
2462 static const int kAllocationSiteScratchpadSize = 256; 2473 static const int kAllocationSiteScratchpadSize = 256;
2463 int allocation_sites_scratchpad_length; 2474 int allocation_sites_scratchpad_length_;
2464 AllocationSite* allocation_sites_scratchpad[kAllocationSiteScratchpadSize];
2465 2475
2466 static const int kMaxMarkSweepsInIdleRound = 7; 2476 static const int kMaxMarkSweepsInIdleRound = 7;
2467 static const int kIdleScavengeThreshold = 5; 2477 static const int kIdleScavengeThreshold = 5;
2468 2478
2469 // Shared state read by the scavenge collector and set by ScavengeObject. 2479 // Shared state read by the scavenge collector and set by ScavengeObject.
2470 PromotionQueue promotion_queue_; 2480 PromotionQueue promotion_queue_;
2471 2481
2472 // Flag is set when the heap has been configured. The heap can be repeatedly 2482 // Flag is set when the heap has been configured. The heap can be repeatedly
2473 // configured through the API until it is set up. 2483 // configured through the API until it is set up.
2474 bool configured_; 2484 bool configured_;
(...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after
3081 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. 3091 DisallowHeapAllocation no_allocation; // i.e. no gc allowed.
3082 3092
3083 private: 3093 private:
3084 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); 3094 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer);
3085 }; 3095 };
3086 #endif // DEBUG 3096 #endif // DEBUG
3087 3097
3088 } } // namespace v8::internal 3098 } } // namespace v8::internal
3089 3099
3090 #endif // V8_HEAP_H_ 3100 #endif // V8_HEAP_H_
OLDNEW
« no previous file with comments | « src/flag-definitions.h ('k') | src/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698