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

Side by Side Diff: src/heap.cc

Issue 2868108: Revert r5174. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 4 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/heap.h ('k') | src/heap-inl.h » ('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 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 int Heap::contexts_disposed_ = 0; 127 int Heap::contexts_disposed_ = 0;
128 128
129 int Heap::young_survivors_after_last_gc_ = 0; 129 int Heap::young_survivors_after_last_gc_ = 0;
130 int Heap::high_survival_rate_period_length_ = 0; 130 int Heap::high_survival_rate_period_length_ = 0;
131 double Heap::survival_rate_ = 0; 131 double Heap::survival_rate_ = 0;
132 Heap::SurvivalRateTrend Heap::previous_survival_rate_trend_ = Heap::STABLE; 132 Heap::SurvivalRateTrend Heap::previous_survival_rate_trend_ = Heap::STABLE;
133 Heap::SurvivalRateTrend Heap::survival_rate_trend_ = Heap::STABLE; 133 Heap::SurvivalRateTrend Heap::survival_rate_trend_ = Heap::STABLE;
134 134
135 #ifdef DEBUG 135 #ifdef DEBUG
136 bool Heap::allocation_allowed_ = true; 136 bool Heap::allocation_allowed_ = true;
137 bool Heap::gc_allowed_ = true;
138 137
139 int Heap::allocation_timeout_ = 0; 138 int Heap::allocation_timeout_ = 0;
140 bool Heap::disallow_allocation_failure_ = false; 139 bool Heap::disallow_allocation_failure_ = false;
141 #endif // DEBUG 140 #endif // DEBUG
142 141
143 int GCTracer::alive_after_last_gc_ = 0; 142 int GCTracer::alive_after_last_gc_ = 0;
144 double GCTracer::last_gc_end_timestamp_ = 0.0; 143 double GCTracer::last_gc_end_timestamp_ = 0.0;
145 int GCTracer::max_gc_pause_ = 0; 144 int GCTracer::max_gc_pause_ = 0;
146 int GCTracer::max_alive_after_gc_ = 0; 145 int GCTracer::max_alive_after_gc_ = 0;
147 int GCTracer::min_in_mutator_ = kMaxInt; 146 int GCTracer::min_in_mutator_ = kMaxInt;
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 #elif defined(DEBUG) 312 #elif defined(DEBUG)
314 if (FLAG_heap_stats) ReportHeapStatistics("After GC"); 313 if (FLAG_heap_stats) ReportHeapStatistics("After GC");
315 #elif defined(ENABLE_LOGGING_AND_PROFILING) 314 #elif defined(ENABLE_LOGGING_AND_PROFILING)
316 if (FLAG_log_gc) new_space_.ReportStatistics(); 315 if (FLAG_log_gc) new_space_.ReportStatistics();
317 #endif 316 #endif
318 } 317 }
319 #endif // defined(DEBUG) || defined(ENABLE_LOGGING_AND_PROFILING) 318 #endif // defined(DEBUG) || defined(ENABLE_LOGGING_AND_PROFILING)
320 319
321 320
322 void Heap::GarbageCollectionPrologue() { 321 void Heap::GarbageCollectionPrologue() {
323 #ifdef DEBUG
324 ASSERT(gc_allowed_);
325 #endif
326 TranscendentalCache::Clear(); 322 TranscendentalCache::Clear();
327 ClearJSFunctionResultCaches(); 323 ClearJSFunctionResultCaches();
328 gc_count_++; 324 gc_count_++;
329 unflattened_strings_length_ = 0; 325 unflattened_strings_length_ = 0;
330 #ifdef DEBUG 326 #ifdef DEBUG
331 ASSERT(allocation_allowed_ && gc_state_ == NOT_IN_GC); 327 ASSERT(allocation_allowed_ && gc_state_ == NOT_IN_GC);
332 allow_allocation(false); 328 allow_allocation(false);
333 329
334 if (FLAG_verify_heap) { 330 if (FLAG_verify_heap) {
335 Verify(); 331 Verify();
(...skipping 4653 matching lines...) Expand 10 before | Expand all | Expand 10 after
4989 void ExternalStringTable::TearDown() { 4985 void ExternalStringTable::TearDown() {
4990 new_space_strings_.Free(); 4986 new_space_strings_.Free();
4991 old_space_strings_.Free(); 4987 old_space_strings_.Free();
4992 } 4988 }
4993 4989
4994 4990
4995 List<Object*> ExternalStringTable::new_space_strings_; 4991 List<Object*> ExternalStringTable::new_space_strings_;
4996 List<Object*> ExternalStringTable::old_space_strings_; 4992 List<Object*> ExternalStringTable::old_space_strings_;
4997 4993
4998 } } // namespace v8::internal 4994 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap.h ('k') | src/heap-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698