Commit 3856d8d5 authored by Gabriel Charette's avatar Gabriel Charette Committed by Commit Bot

Revert "[v8] Add finer grain trace events to EVACUATE_COPY step."

This reverts commit f64a87c4.

Revert "[v8] Even finer grain trace events for EVACUATE_COPY step."

This reverts commit 2c1b6d38.

Traces have been gathered by the bots. I'm still analyzing the results
but let's revert these for now to soothe the poor bots which are
running with v8.gc tracing enabled and regressing like crazy
because of this crbug.com/814800.

R=hpayer@chromium.org

Bug: chromium:814800, chromium:813824
Change-Id: If97c1ff5d14de18414c3b8d65ecb3aaf4f1bb32d
Reviewed-on: https://chromium-review.googlesource.com/934131Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
Commit-Queue: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51502}
parent 6a2926e5
......@@ -1361,8 +1361,6 @@ class EvacuateVisitorBase : public HeapObjectVisitor {
static void RawMigrateObject(EvacuateVisitorBase* base, HeapObject* dst,
HeapObject* src, int size,
AllocationSpace dest) {
TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("v8.gc"),
"EvacuateVisitorBase::RawMigrateObject", "dest", dest);
Address dst_addr = dst->address();
Address src_addr = src->address();
DCHECK(base->heap_->AllowedToBeMigrated(src, dest));
......@@ -1405,9 +1403,6 @@ class EvacuateVisitorBase : public HeapObjectVisitor {
inline bool TryEvacuateObject(AllocationSpace target_space,
HeapObject* object, int size,
HeapObject** target_object) {
TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.gc"),
"EvacuateVisitorBase::TryEvacuateObject");
#ifdef VERIFY_HEAP
if (AbortCompactionForTesting(object)) return false;
#endif // VERIFY_HEAP
......@@ -1423,8 +1418,6 @@ class EvacuateVisitorBase : public HeapObjectVisitor {
inline void ExecuteMigrationObservers(AllocationSpace dest, HeapObject* src,
HeapObject* dst, int size) {
TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.gc"),
"EvacuateVisitorBase::ExecuteMigrationObservers");
for (MigrationObserver* obs : observers_) {
obs->Move(dest, src, dst, size);
}
......@@ -1432,8 +1425,6 @@ class EvacuateVisitorBase : public HeapObjectVisitor {
inline void MigrateObject(HeapObject* dst, HeapObject* src, int size,
AllocationSpace dest) {
TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.gc"),
"EvacuateVisitorBase::MigrateObject");
migration_function_(this, dst, src, size, dest);
}
......@@ -1478,8 +1469,6 @@ class EvacuateNewSpaceVisitor final : public EvacuateVisitorBase {
is_incremental_marking_(heap->incremental_marking()->IsMarking()) {}
inline bool Visit(HeapObject* object, int size) override {
TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.gc"),
"EvacuateNewSpaceVisitor::Visit");
if (TryEvacuateWithoutCopy(object)) return true;
HeapObject* target_object = nullptr;
if (heap_->ShouldBePromoted(object->address()) &&
......@@ -1582,16 +1571,10 @@ class EvacuateNewSpacePageVisitor final : public HeapObjectVisitor {
}
inline bool Visit(HeapObject* object, int size) {
TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.gc"),
"EvacuateNewSpacePageVisitor::Visit");
if (mode == NEW_TO_NEW) {
TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.gc"),
"EvacuateNewSpacePageVisitor::Visit UpdateAllocationSite");
heap_->UpdateAllocationSite(object->map(), object,
local_pretenuring_feedback_);
} else if (mode == NEW_TO_OLD) {
TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.gc"),
"EvacuateNewSpacePageVisitor::Visit IterateBodyFast");
object->IterateBodyFast(record_visitor_);
}
return true;
......@@ -1614,8 +1597,6 @@ class EvacuateOldSpaceVisitor final : public EvacuateVisitorBase {
: EvacuateVisitorBase(heap, local_allocator, record_visitor) {}
inline bool Visit(HeapObject* object, int size) override {
TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.gc"),
"EvacuateOldSpaceVisitor::Visit");
HeapObject* target_object = nullptr;
if (TryEvacuateObject(
Page::FromAddress(object->address())->owner()->identity(), object,
......@@ -1632,8 +1613,6 @@ class EvacuateRecordOnlyVisitor final : public HeapObjectVisitor {
explicit EvacuateRecordOnlyVisitor(Heap* heap) : heap_(heap) {}
inline bool Visit(HeapObject* object, int size) {
TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.gc"),
"EvacuateRecordOnlyVisitor::Visit");
RecordMigratedSlotVisitor visitor(heap_->mark_compact_collector());
object->IterateBody(&visitor);
return true;
......@@ -3055,7 +3034,6 @@ class Evacuator : public Malloced {
};
void Evacuator::EvacuatePage(Page* page) {
TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.gc"), "Evacuator::EvacuatePage");
DCHECK(page->SweepingDone());
intptr_t saved_live_bytes = 0;
double evacuation_time = 0.0;
......@@ -3113,15 +3091,11 @@ class FullEvacuator : public Evacuator {
};
void FullEvacuator::RawEvacuatePage(Page* page, intptr_t* live_bytes) {
const EvacuationMode evacuation_mode = ComputeEvacuationMode(page);
TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("v8.gc"),
"FullEvacuator::RawEvacuatePage", "evacuation_mode",
evacuation_mode);
MarkCompactCollector::NonAtomicMarkingState* marking_state =
collector_->non_atomic_marking_state();
*live_bytes = marking_state->live_bytes(page);
HeapObject* failed_object = nullptr;
switch (evacuation_mode) {
switch (ComputeEvacuationMode(page)) {
case kObjectsNewToOld:
LiveObjectVisitor::VisitBlackObjectsNoFail(
page, marking_state, &new_space_visitor_,
......@@ -3178,8 +3152,6 @@ class YoungGenerationEvacuator : public Evacuator {
void YoungGenerationEvacuator::RawEvacuatePage(Page* page,
intptr_t* live_bytes) {
TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.gc"),
"YoungGenerationEvacuator::RawEvacuatePage");
MinorMarkCompactCollector::NonAtomicMarkingState* marking_state =
collector_->non_atomic_marking_state();
*live_bytes = marking_state->live_bytes(page);
......@@ -3420,12 +3392,8 @@ bool LiveObjectVisitor::VisitBlackObjects(MemoryChunk* chunk,
Visitor* visitor,
IterationMode iteration_mode,
HeapObject** failed_object) {
TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.gc"),
"LiveObjectVisitor::VisitBlackObjects");
for (auto object_and_size :
LiveObjectRange<kBlackObjects>(chunk, marking_state->bitmap(chunk))) {
TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.gc"),
"LiveObjectVisitor::VisitBlackObjects Visit");
HeapObject* const object = object_and_size.first;
if (!visitor->Visit(object, object_and_size.second)) {
if (iteration_mode == kClearMarkbits) {
......@@ -3438,8 +3406,6 @@ bool LiveObjectVisitor::VisitBlackObjects(MemoryChunk* chunk,
}
}
if (iteration_mode == kClearMarkbits) {
TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.gc"),
"LiveObjectVisitor::VisitBlackObjects ClearLiveness");
marking_state->ClearLiveness(chunk);
}
return true;
......@@ -3450,12 +3416,8 @@ void LiveObjectVisitor::VisitBlackObjectsNoFail(MemoryChunk* chunk,
MarkingState* marking_state,
Visitor* visitor,
IterationMode iteration_mode) {
TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.gc"),
"LiveObjectVisitor::VisitBlackObjectsNoFail");
for (auto object_and_size :
LiveObjectRange<kBlackObjects>(chunk, marking_state->bitmap(chunk))) {
TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.gc"),
"LiveObjectVisitor::VisitBlackObjectsNoFail Visit");
HeapObject* const object = object_and_size.first;
DCHECK(marking_state->IsBlack(object));
const bool success = visitor->Visit(object, object_and_size.second);
......@@ -3463,8 +3425,6 @@ void LiveObjectVisitor::VisitBlackObjectsNoFail(MemoryChunk* chunk,
DCHECK(success);
}
if (iteration_mode == kClearMarkbits) {
TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.gc"),
"LiveObjectVisitor::VisitBlackObjectsNoFail ClearLiveness");
marking_state->ClearLiveness(chunk);
}
}
......@@ -3474,12 +3434,8 @@ void LiveObjectVisitor::VisitGreyObjectsNoFail(MemoryChunk* chunk,
MarkingState* marking_state,
Visitor* visitor,
IterationMode iteration_mode) {
TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.gc"),
"LiveObjectVisitor::VisitGreyObjectsNoFail");
for (auto object_and_size :
LiveObjectRange<kGreyObjects>(chunk, marking_state->bitmap(chunk))) {
TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.gc"),
"LiveObjectVisitor::VisitGreyObjectsNoFail Visit");
HeapObject* const object = object_and_size.first;
DCHECK(marking_state->IsGrey(object));
const bool success = visitor->Visit(object, object_and_size.second);
......@@ -3487,8 +3443,6 @@ void LiveObjectVisitor::VisitGreyObjectsNoFail(MemoryChunk* chunk,
DCHECK(success);
}
if (iteration_mode == kClearMarkbits) {
TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.gc"),
"LiveObjectVisitor::VisitGreyObjectsNoFail ClearLiveness");
marking_state->ClearLiveness(chunk);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment