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

Side by Side Diff: src/heap.cc

Issue 11348296: Merged r13080 into trunk branch. (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Created 8 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 | « no previous file | src/version.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 5308 matching lines...) Expand 10 before | Expand all | Expand 10 after
5319 } 5319 }
5320 int mark_sweep_time = Min(TimeMarkSweepWouldTakeInMs(), 1000); 5320 int mark_sweep_time = Min(TimeMarkSweepWouldTakeInMs(), 1000);
5321 if (hint >= mark_sweep_time && incremental_marking()->IsStopped()) { 5321 if (hint >= mark_sweep_time && incremental_marking()->IsStopped()) {
5322 HistogramTimerScope scope(isolate_->counters()->gc_context()); 5322 HistogramTimerScope scope(isolate_->counters()->gc_context());
5323 CollectAllGarbage(kReduceMemoryFootprintMask, 5323 CollectAllGarbage(kReduceMemoryFootprintMask,
5324 "idle notification: contexts disposed"); 5324 "idle notification: contexts disposed");
5325 } else { 5325 } else {
5326 AdvanceIdleIncrementalMarking(step_size); 5326 AdvanceIdleIncrementalMarking(step_size);
5327 contexts_disposed_ = 0; 5327 contexts_disposed_ = 0;
5328 } 5328 }
5329 // Make sure that we have no pending context disposals.
5330 // Take into account that we might have decided to delay full collection
5331 // because incremental marking is in progress.
5332 ASSERT((contexts_disposed_ == 0) || !incremental_marking()->IsStopped());
5333 // After context disposal there is likely a lot of garbage remaining, reset 5329 // After context disposal there is likely a lot of garbage remaining, reset
5334 // the idle notification counters in order to trigger more incremental GCs 5330 // the idle notification counters in order to trigger more incremental GCs
5335 // on subsequent idle notifications. 5331 // on subsequent idle notifications.
5336 StartIdleRound(); 5332 StartIdleRound();
5337 return false; 5333 return false;
5338 } 5334 }
5339 5335
5340 if (!FLAG_incremental_marking || Serializer::enabled()) { 5336 if (!FLAG_incremental_marking || Serializer::enabled()) {
5341 return IdleGlobalGC(); 5337 return IdleGlobalGC();
5342 } 5338 }
(...skipping 1985 matching lines...) Expand 10 before | Expand all | Expand 10 after
7328 static_cast<int>(object_sizes_last_time_[index])); 7324 static_cast<int>(object_sizes_last_time_[index]));
7329 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(ADJUST_LAST_TIME_OBJECT_COUNT) 7325 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(ADJUST_LAST_TIME_OBJECT_COUNT)
7330 #undef ADJUST_LAST_TIME_OBJECT_COUNT 7326 #undef ADJUST_LAST_TIME_OBJECT_COUNT
7331 7327
7332 memcpy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); 7328 memcpy(object_counts_last_time_, object_counts_, sizeof(object_counts_));
7333 memcpy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); 7329 memcpy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_));
7334 ClearObjectStats(); 7330 ClearObjectStats();
7335 } 7331 }
7336 7332
7337 } } // namespace v8::internal 7333 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/version.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698