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

Unified Diff: src/heap/mark-compact.cc

Issue 2051103002: Move EmbedderHeapTracer::TracePrologue call to the beginning of full gc (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add abort Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/heap/incremental-marking.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/mark-compact.cc
diff --git a/src/heap/mark-compact.cc b/src/heap/mark-compact.cc
index a1736e9728a13ef05dff6e0c7da218d26cf271ca..aaa65f5e96a5fb28d312506fc5bafa9041c3c227 100644
--- a/src/heap/mark-compact.cc
+++ b/src/heap/mark-compact.cc
@@ -857,9 +857,18 @@ void MarkCompactCollector::Prepare() {
AbortWeakCells();
AbortTransitionArrays();
AbortCompaction();
+ if (heap_->UsingEmbedderHeapTracer()) {
+ heap_->mark_compact_collector()->embedder_heap_tracer()->AbortTracing();
+ }
was_marked_incrementally_ = false;
}
+ if (!was_marked_incrementally_) {
+ if (heap_->UsingEmbedderHeapTracer()) {
+ heap_->mark_compact_collector()->embedder_heap_tracer()->TracePrologue();
+ }
+ }
+
// Don't start compaction if we are in the middle of incremental
// marking cycle. We did not collect any slots.
if (!FLAG_never_compact && !was_marked_incrementally_) {
@@ -2320,10 +2329,6 @@ void MarkCompactCollector::MarkLiveObjects() {
{
TRACE_GC(heap()->tracer(),
GCTracer::Scope::MC_MARK_WEAK_CLOSURE_EPHEMERAL);
- if (UsingEmbedderHeapTracer()) {
- embedder_heap_tracer()->TracePrologue();
- ProcessMarkingDeque();
- }
ProcessEphemeralMarking(&root_visitor, false);
}
« no previous file with comments | « src/heap/incremental-marking.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698