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

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

Issue 2245133004: [heap] Add basic infrastructure for incremental wrapper tracing. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix comment Created 4 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
« no previous file with comments | « src/heap/heap.cc ('k') | src/heap/mark-compact.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/heap/incremental-marking.h" 5 #include "src/heap/incremental-marking.h"
6 6
7 #include "src/code-stubs.h" 7 #include "src/code-stubs.h"
8 #include "src/compilation-cache.h" 8 #include "src/compilation-cache.h"
9 #include "src/conversions.h" 9 #include "src/conversions.h"
10 #include "src/heap/gc-idle-time-handler.h" 10 #include "src/heap/gc-idle-time-handler.h"
(...skipping 1183 matching lines...) Expand 10 before | Expand all | Expand 10 after
1194 1194
1195 bytes_scanned_ += bytes_to_process; 1195 bytes_scanned_ += bytes_to_process;
1196 1196
1197 // TODO(hpayer): Do not account for sweeping finalization while marking. 1197 // TODO(hpayer): Do not account for sweeping finalization while marking.
1198 if (state_ == SWEEPING) { 1198 if (state_ == SWEEPING) {
1199 FinalizeSweeping(); 1199 FinalizeSweeping();
1200 } 1200 }
1201 1201
1202 if (state_ == MARKING) { 1202 if (state_ == MARKING) {
1203 bytes_processed = ProcessMarkingDeque(bytes_to_process); 1203 bytes_processed = ProcessMarkingDeque(bytes_to_process);
1204 if (FLAG_incremental_marking_wrappers &&
1205 heap_->UsingEmbedderHeapTracer()) {
1206 // This currently marks through all registered wrappers and does not
1207 // respect bytes_to_process.
1208 // TODO(hpayer): Integrate incremental marking of wrappers into
1209 // bytes_to_process logic.
1210 heap_->mark_compact_collector()
1211 ->RegisterWrappersWithEmbedderHeapTracer();
1212 heap_->mark_compact_collector()->embedder_heap_tracer()->AdvanceTracing(
1213 0,
1214 EmbedderHeapTracer::AdvanceTracingActions(
1215 EmbedderHeapTracer::ForceCompletionAction::FORCE_COMPLETION));
1216 }
1204 if (heap_->mark_compact_collector()->marking_deque()->IsEmpty()) { 1217 if (heap_->mark_compact_collector()->marking_deque()->IsEmpty()) {
1205 if (completion == FORCE_COMPLETION || 1218 if (completion == FORCE_COMPLETION ||
1206 IsIdleMarkingDelayCounterLimitReached()) { 1219 IsIdleMarkingDelayCounterLimitReached()) {
1207 if (!finalize_marking_completed_) { 1220 if (!finalize_marking_completed_) {
1208 FinalizeMarking(action); 1221 FinalizeMarking(action);
1209 } else { 1222 } else {
1210 MarkingComplete(action); 1223 MarkingComplete(action);
1211 } 1224 }
1212 } else { 1225 } else {
1213 IncrementIdleMarkingDelayCounter(); 1226 IncrementIdleMarkingDelayCounter();
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
1258 void IncrementalMarking::IncrementIdleMarkingDelayCounter() { 1271 void IncrementalMarking::IncrementIdleMarkingDelayCounter() {
1259 idle_marking_delay_counter_++; 1272 idle_marking_delay_counter_++;
1260 } 1273 }
1261 1274
1262 1275
1263 void IncrementalMarking::ClearIdleMarkingDelayCounter() { 1276 void IncrementalMarking::ClearIdleMarkingDelayCounter() {
1264 idle_marking_delay_counter_ = 0; 1277 idle_marking_delay_counter_ = 0;
1265 } 1278 }
1266 } // namespace internal 1279 } // namespace internal
1267 } // namespace v8 1280 } // namespace v8
OLDNEW
« no previous file with comments | « src/heap/heap.cc ('k') | src/heap/mark-compact.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698