Commit 5fe5cbf8 authored by Michael Lippautz's avatar Michael Lippautz Committed by Commit Bot

[heap] Scavenger: Update counters locally

Bug: chromium:738865
Change-Id: I53f82a459a82057486dcba26696fadebf7befcf7
Reviewed-on: https://chromium-review.googlesource.com/567156Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46576}
parent 4a4bcda3
......@@ -79,7 +79,7 @@ bool Scavenger::SemiSpaceCopyObject(Map* map, HeapObject** slot,
*slot = target;
copied_list_.Insert(target, object_size);
heap()->IncrementSemiSpaceCopiedObjectSize(object_size);
copied_size_ += object_size;
return true;
}
return false;
......@@ -107,7 +107,7 @@ bool Scavenger::PromoteObject(Map* map, HeapObject** slot, HeapObject* object,
if (!ContainsOnlyData(static_cast<VisitorId>(map->visitor_id()))) {
promotion_list_.Push(ObjectAndSize(target, object_size));
}
heap()->IncrementPromotedObjectsSize(object_size);
promoted_size_ += object_size;
return true;
}
return false;
......
......@@ -134,6 +134,8 @@ void Scavenger::RecordCopiedObject(HeapObject* obj) {
void Scavenger::Finalize() {
heap()->MergeAllocationSitePretenuringFeedback(local_pretenuring_feedback_);
heap()->IncrementSemiSpaceCopiedObjectSize(copied_size_);
heap()->IncrementPromotedObjectsSize(promoted_size_);
}
void RootScavengeVisitor::VisitRootPointer(Root root, Object** p) {
......
......@@ -74,6 +74,8 @@ class Scavenger {
promotion_list_(promotion_list, task_id),
copied_list_(copied_list, task_id),
local_pretenuring_feedback_(kInitialLocalPretenuringFeedbackCapacity),
copied_size_(0),
promoted_size_(0),
is_logging_(is_logging),
is_incremental_marking_(is_incremental_marking) {}
......@@ -132,6 +134,8 @@ class Scavenger {
PromotionList::View promotion_list_;
CopiedRangesList copied_list_;
base::HashMap local_pretenuring_feedback_;
size_t copied_size_;
size_t promoted_size_;
bool is_logging_;
bool is_incremental_marking_;
};
......
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