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

Side by Side Diff: src/incremental-marking.cc

Issue 9674001: Fix heuristic triggering incremental marking. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 9 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 static const intptr_t kActivationThreshold = 8 * MB; 389 static const intptr_t kActivationThreshold = 8 * MB;
390 #else 390 #else
391 // TODO(gc) consider setting this to some low level so that some 391 // TODO(gc) consider setting this to some low level so that some
392 // debug tests run with incremental marking and some without. 392 // debug tests run with incremental marking and some without.
393 static const intptr_t kActivationThreshold = 0; 393 static const intptr_t kActivationThreshold = 0;
394 #endif 394 #endif
395 395
396 return !FLAG_expose_gc && 396 return !FLAG_expose_gc &&
397 FLAG_incremental_marking && 397 FLAG_incremental_marking &&
398 !Serializer::enabled() && 398 !Serializer::enabled() &&
399 heap_->PromotedSpaceSize() > kActivationThreshold; 399 heap_->PromotedSpaceSizeOfObjects() > kActivationThreshold;
400 } 400 }
401 401
402 402
403 void IncrementalMarking::ActivateGeneratedStub(Code* stub) { 403 void IncrementalMarking::ActivateGeneratedStub(Code* stub) {
404 ASSERT(RecordWriteStub::GetMode(stub) == 404 ASSERT(RecordWriteStub::GetMode(stub) ==
405 RecordWriteStub::STORE_BUFFER_ONLY); 405 RecordWriteStub::STORE_BUFFER_ONLY);
406 406
407 if (!IsMarking()) { 407 if (!IsMarking()) {
408 // Initially stub is generated in STORE_BUFFER_ONLY mode thus 408 // Initially stub is generated in STORE_BUFFER_ONLY mode thus
409 // we don't need to do anything if incremental marking is 409 // we don't need to do anything if incremental marking is
(...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after
917 allocation_marking_factor_ = kInitialAllocationMarkingFactor; 917 allocation_marking_factor_ = kInitialAllocationMarkingFactor;
918 bytes_scanned_ = 0; 918 bytes_scanned_ = 0;
919 } 919 }
920 920
921 921
922 int64_t IncrementalMarking::SpaceLeftInOldSpace() { 922 int64_t IncrementalMarking::SpaceLeftInOldSpace() {
923 return heap_->MaxOldGenerationSize() - heap_->PromotedSpaceSize(); 923 return heap_->MaxOldGenerationSize() - heap_->PromotedSpaceSize();
924 } 924 }
925 925
926 } } // namespace v8::internal 926 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698