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

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 and
2190 // sets the given pretenuring decisions to undecided.
2191 void ClearAllAllocationSitesDependentCode();
2192
2193 // Evaluates local pretenuring and calls ClearAllAllocationSitesDependentCode
2194 // if too many objects died in the old generation.
2195 void EvaluateLocalPretenuring(uint64_t size_of_objects_before_gc);
2196
2189 // Called on heap tear-down. 2197 // Called on heap tear-down.
2190 void TearDownArrayBuffers(); 2198 void TearDownArrayBuffers();
2191 2199
2192 // Record statistics before and after garbage collection. 2200 // Record statistics before and after garbage collection.
2193 void ReportStatisticsBeforeGC(); 2201 void ReportStatisticsBeforeGC();
2194 void ReportStatisticsAfterGC(); 2202 void ReportStatisticsAfterGC();
2195 2203
2196 // Slow part of scavenge object. 2204 // Slow part of scavenge object.
2197 static void ScavengeObjectSlow(HeapObject** p, HeapObject* object); 2205 static void ScavengeObjectSlow(HeapObject** p, HeapObject* object);
2198 2206
(...skipping 23 matching lines...) Expand all
2222 void FlushNumberStringCache(); 2230 void FlushNumberStringCache();
2223 2231
2224 void UpdateSurvivalRateTrend(int start_new_space_size); 2232 void UpdateSurvivalRateTrend(int start_new_space_size);
2225 2233
2226 enum SurvivalRateTrend { INCREASING, STABLE, DECREASING, FLUCTUATING }; 2234 enum SurvivalRateTrend { INCREASING, STABLE, DECREASING, FLUCTUATING };
2227 2235
2228 static const int kYoungSurvivalRateHighThreshold = 90; 2236 static const int kYoungSurvivalRateHighThreshold = 90;
2229 static const int kYoungSurvivalRateLowThreshold = 10; 2237 static const int kYoungSurvivalRateLowThreshold = 10;
2230 static const int kYoungSurvivalRateAllowedDeviation = 15; 2238 static const int kYoungSurvivalRateAllowedDeviation = 15;
2231 2239
2240 static const int kOldSurvivalRateLowThreshold = 20;
2241
2232 int young_survivors_after_last_gc_; 2242 int young_survivors_after_last_gc_;
2233 int high_survival_rate_period_length_; 2243 int high_survival_rate_period_length_;
2234 int low_survival_rate_period_length_; 2244 int low_survival_rate_period_length_;
2235 double survival_rate_; 2245 double survival_rate_;
2236 SurvivalRateTrend previous_survival_rate_trend_; 2246 SurvivalRateTrend previous_survival_rate_trend_;
2237 SurvivalRateTrend survival_rate_trend_; 2247 SurvivalRateTrend survival_rate_trend_;
2238 2248
2239 void set_survival_rate_trend(SurvivalRateTrend survival_rate_trend) { 2249 void set_survival_rate_trend(SurvivalRateTrend survival_rate_trend) {
2240 ASSERT(survival_rate_trend != FLUCTUATING); 2250 ASSERT(survival_rate_trend != FLUCTUATING);
2241 previous_survival_rate_trend_ = survival_rate_trend_; 2251 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. 3098 DisallowHeapAllocation no_allocation; // i.e. no gc allowed.
3089 3099
3090 private: 3100 private:
3091 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); 3101 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer);
3092 }; 3102 };
3093 #endif // DEBUG 3103 #endif // DEBUG
3094 3104
3095 } } // namespace v8::internal 3105 } } // namespace v8::internal
3096 3106
3097 #endif // V8_HEAP_H_ 3107 #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