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

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

Issue 2860043002: [heap] Add VMState to IncrementalMarking observer (Closed)
Patch Set: Created 3 years, 7 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/incremental-marking.h ('k') | src/heap/incremental-marking-job.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 // 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/concurrent-marking.h" 10 #include "src/heap/concurrent-marking.h"
11 #include "src/heap/gc-idle-time-handler.h" 11 #include "src/heap/gc-idle-time-handler.h"
12 #include "src/heap/gc-tracer.h" 12 #include "src/heap/gc-tracer.h"
13 #include "src/heap/heap-inl.h" 13 #include "src/heap/heap-inl.h"
14 #include "src/heap/mark-compact-inl.h" 14 #include "src/heap/mark-compact-inl.h"
15 #include "src/heap/object-stats.h" 15 #include "src/heap/object-stats.h"
16 #include "src/heap/objects-visiting-inl.h" 16 #include "src/heap/objects-visiting-inl.h"
17 #include "src/heap/objects-visiting.h" 17 #include "src/heap/objects-visiting.h"
18 #include "src/tracing/trace-event.h" 18 #include "src/tracing/trace-event.h"
19 #include "src/v8.h" 19 #include "src/v8.h"
20 #include "src/visitors.h" 20 #include "src/visitors.h"
21 #include "src/vm-state-inl.h"
21 22
22 namespace v8 { 23 namespace v8 {
23 namespace internal { 24 namespace internal {
24 25
26 void IncrementalMarking::Observer::Step(int bytes_allocated, Address, size_t) {
27 VMState<GC> state(incremental_marking_.heap()->isolate());
28 RuntimeCallTimerScope runtime_timer(
29 incremental_marking_.heap()->isolate(),
30 &RuntimeCallStats::GC_IncrementalMarkingObserver);
31 incremental_marking_.AdvanceIncrementalMarkingOnAllocation();
32 }
33
25 IncrementalMarking::IncrementalMarking(Heap* heap) 34 IncrementalMarking::IncrementalMarking(Heap* heap)
26 : heap_(heap), 35 : heap_(heap),
27 marking_deque_(nullptr), 36 marking_deque_(nullptr),
28 initial_old_generation_size_(0), 37 initial_old_generation_size_(0),
29 bytes_marked_ahead_of_schedule_(0), 38 bytes_marked_ahead_of_schedule_(0),
30 unscanned_bytes_of_large_object_(0), 39 unscanned_bytes_of_large_object_(0),
31 state_(STOPPED), 40 state_(STOPPED),
32 idle_marking_delay_counter_(0), 41 idle_marking_delay_counter_(0),
33 incremental_marking_finalization_rounds_(0), 42 incremental_marking_finalization_rounds_(0),
34 is_compacting_(false), 43 is_compacting_(false),
(...skipping 1141 matching lines...) Expand 10 before | Expand all | Expand 10 after
1176 idle_marking_delay_counter_++; 1185 idle_marking_delay_counter_++;
1177 } 1186 }
1178 1187
1179 1188
1180 void IncrementalMarking::ClearIdleMarkingDelayCounter() { 1189 void IncrementalMarking::ClearIdleMarkingDelayCounter() {
1181 idle_marking_delay_counter_ = 0; 1190 idle_marking_delay_counter_ = 0;
1182 } 1191 }
1183 1192
1184 } // namespace internal 1193 } // namespace internal
1185 } // namespace v8 1194 } // namespace v8
OLDNEW
« no previous file with comments | « src/heap/incremental-marking.h ('k') | src/heap/incremental-marking-job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698