| OLD | NEW |
| 1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 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/embedder-tracing.h" | 5 #include "src/heap/embedder-tracing.h" |
| 6 | 6 |
| 7 #include "src/base/logging.h" | 7 #include "src/base/logging.h" |
| 8 | 8 |
| 9 namespace v8 { | 9 namespace v8 { |
| 10 namespace internal { | 10 namespace internal { |
| 11 | 11 |
| 12 void LocalEmbedderHeapTracer::TracePrologue() { | 12 void LocalEmbedderHeapTracer::TracePrologue() { |
| 13 if (!InUse()) return; | 13 if (!InUse()) return; |
| 14 | 14 |
| 15 CHECK(cached_wrappers_to_trace_.empty()); | 15 CHECK(cached_wrappers_to_trace_.empty()); |
| 16 num_v8_marking_deque_was_empty_ = 0; |
| 16 remote_tracer_->TracePrologue(); | 17 remote_tracer_->TracePrologue(); |
| 17 } | 18 } |
| 18 | 19 |
| 19 void LocalEmbedderHeapTracer::TraceEpilogue() { | 20 void LocalEmbedderHeapTracer::TraceEpilogue() { |
| 20 if (!InUse()) return; | 21 if (!InUse()) return; |
| 21 | 22 |
| 22 CHECK(cached_wrappers_to_trace_.empty()); | 23 CHECK(cached_wrappers_to_trace_.empty()); |
| 23 remote_tracer_->TraceEpilogue(); | 24 remote_tracer_->TraceEpilogue(); |
| 24 } | 25 } |
| 25 | 26 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 cached_wrappers_to_trace_.clear(); | 63 cached_wrappers_to_trace_.clear(); |
| 63 } | 64 } |
| 64 | 65 |
| 65 bool LocalEmbedderHeapTracer::RequiresImmediateWrapperProcessing() { | 66 bool LocalEmbedderHeapTracer::RequiresImmediateWrapperProcessing() { |
| 66 const size_t kTooManyWrappers = 16000; | 67 const size_t kTooManyWrappers = 16000; |
| 67 return cached_wrappers_to_trace_.size() > kTooManyWrappers; | 68 return cached_wrappers_to_trace_.size() > kTooManyWrappers; |
| 68 } | 69 } |
| 69 | 70 |
| 70 } // namespace internal | 71 } // namespace internal |
| 71 } // namespace v8 | 72 } // namespace v8 |
| OLD | NEW |