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

Side by Side Diff: src/heap.h

Issue 96783002: Allocation site pretenuring. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years 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') | src/heap.cc » ('J')
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 2168 matching lines...) Expand 10 before | Expand all | Expand 10 after
2179 // Performs a major collection in the whole heap. 2179 // Performs a major collection in the whole heap.
2180 void MarkCompact(GCTracer* tracer); 2180 void MarkCompact(GCTracer* tracer);
2181 2181
2182 // Code to be run before and after mark-compact. 2182 // Code to be run before and after mark-compact.
2183 void MarkCompactPrologue(); 2183 void MarkCompactPrologue();
2184 2184
2185 void ProcessNativeContexts(WeakObjectRetainer* retainer, bool record_slots); 2185 void ProcessNativeContexts(WeakObjectRetainer* retainer, bool record_slots);
2186 void ProcessArrayBuffers(WeakObjectRetainer* retainer, bool record_slots); 2186 void ProcessArrayBuffers(WeakObjectRetainer* retainer, bool record_slots);
2187 void ProcessAllocationSites(WeakObjectRetainer* retainer, bool record_slots); 2187 void ProcessAllocationSites(WeakObjectRetainer* retainer, bool record_slots);
2188 2188
2189 // Deopts all dependent code of the currently registered allocation sites.
2190 void DeoptAllAllocationSitesDependentCode();
2191
2192 // Evaluates local pretenuring and calls DeoptAllAllocationSitesDependentCode
2193 // if too many objects died in the old generation.
2194 void EvaluateLocalPretenuring(int64_t objects_before_gc);
2195
2189 // Called on heap tear-down. 2196 // Called on heap tear-down.
2190 void TearDownArrayBuffers(); 2197 void TearDownArrayBuffers();
2191 2198
2192 // Record statistics before and after garbage collection. 2199 // Record statistics before and after garbage collection.
2193 void ReportStatisticsBeforeGC(); 2200 void ReportStatisticsBeforeGC();
2194 void ReportStatisticsAfterGC(); 2201 void ReportStatisticsAfterGC();
2195 2202
2196 // Slow part of scavenge object. 2203 // Slow part of scavenge object.
2197 static void ScavengeObjectSlow(HeapObject** p, HeapObject* object); 2204 static void ScavengeObjectSlow(HeapObject** p, HeapObject* object);
2198 2205
(...skipping 23 matching lines...) Expand all
2222 void FlushNumberStringCache(); 2229 void FlushNumberStringCache();
2223 2230
2224 void UpdateSurvivalRateTrend(int start_new_space_size); 2231 void UpdateSurvivalRateTrend(int start_new_space_size);
2225 2232
2226 enum SurvivalRateTrend { INCREASING, STABLE, DECREASING, FLUCTUATING }; 2233 enum SurvivalRateTrend { INCREASING, STABLE, DECREASING, FLUCTUATING };
2227 2234
2228 static const int kYoungSurvivalRateHighThreshold = 90; 2235 static const int kYoungSurvivalRateHighThreshold = 90;
2229 static const int kYoungSurvivalRateLowThreshold = 10; 2236 static const int kYoungSurvivalRateLowThreshold = 10;
2230 static const int kYoungSurvivalRateAllowedDeviation = 15; 2237 static const int kYoungSurvivalRateAllowedDeviation = 15;
2231 2238
2239 static const int kOldSurvivalRateLowThreshold = 20;
2240
2232 int young_survivors_after_last_gc_; 2241 int young_survivors_after_last_gc_;
2233 int high_survival_rate_period_length_; 2242 int high_survival_rate_period_length_;
2234 int low_survival_rate_period_length_; 2243 int low_survival_rate_period_length_;
2235 double survival_rate_; 2244 double survival_rate_;
2236 SurvivalRateTrend previous_survival_rate_trend_; 2245 SurvivalRateTrend previous_survival_rate_trend_;
2237 SurvivalRateTrend survival_rate_trend_; 2246 SurvivalRateTrend survival_rate_trend_;
2238 2247
2239 void set_survival_rate_trend(SurvivalRateTrend survival_rate_trend) { 2248 void set_survival_rate_trend(SurvivalRateTrend survival_rate_trend) {
2240 ASSERT(survival_rate_trend != FLUCTUATING); 2249 ASSERT(survival_rate_trend != FLUCTUATING);
2241 previous_survival_rate_trend_ = survival_rate_trend_; 2250 previous_survival_rate_trend_ = survival_rate_trend_;
(...skipping 846 matching lines...) Expand 10 before | Expand all | Expand 10 after
3088 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. 3097 DisallowHeapAllocation no_allocation; // i.e. no gc allowed.
3089 3098
3090 private: 3099 private:
3091 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); 3100 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer);
3092 }; 3101 };
3093 #endif // DEBUG 3102 #endif // DEBUG
3094 3103
3095 } } // namespace v8::internal 3104 } } // namespace v8::internal
3096 3105
3097 #endif // V8_HEAP_H_ 3106 #endif // V8_HEAP_H_
OLDNEW
« no previous file with comments | « src/flag-definitions.h ('k') | src/heap.cc » ('j') | src/heap.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698