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

Unified Diff: src/heap/heap.cc

Issue 1625753002: Allocation sampling for paged/lo spaces (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: USE for DCHECK only variable Created 4 years, 10 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/heap.h ('k') | src/heap/incremental-marking.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/heap.cc
diff --git a/src/heap/heap.cc b/src/heap/heap.cc
index 713cda82f57b786da7ac63195b81969cd715cbc9..d8248e439244e09dbc8de259f4e3a02c1d01c0ae 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -53,10 +53,10 @@ struct Heap::StrongRootsList {
StrongRootsList* next;
};
-class IdleScavengeObserver : public InlineAllocationObserver {
+class IdleScavengeObserver : public AllocationObserver {
public:
IdleScavengeObserver(Heap& heap, intptr_t step_size)
- : InlineAllocationObserver(step_size), heap_(heap) {}
+ : AllocationObserver(step_size), heap_(heap) {}
void Step(int bytes_allocated, Address, size_t) override {
heap_.ScheduleIdleScavengeIfNeeded(bytes_allocated);
@@ -1414,7 +1414,7 @@ void Heap::CallGCEpilogueCallbacks(GCType gc_type,
void Heap::MarkCompact() {
- PauseInlineAllocationObserversScope pause_observers(new_space());
+ PauseAllocationObserversScope pause_observers(this);
gc_state_ = MARK_COMPACT;
LOG(isolate_, ResourceEvent("markcompact", "begin"));
@@ -1615,7 +1615,7 @@ void Heap::Scavenge() {
// Bump-pointer allocations done during scavenge are not real allocations.
// Pause the inline allocation steps.
- PauseInlineAllocationObserversScope pause_observers(new_space());
+ PauseAllocationObserversScope pause_observers(this);
#ifdef VERIFY_HEAP
if (FLAG_verify_heap) VerifyNonPointerSpacePointers(this);
@@ -5147,7 +5147,7 @@ bool Heap::SetUp() {
idle_scavenge_observer_ = new IdleScavengeObserver(
*this, ScavengeJob::kBytesAllocatedBeforeNextIdleTask);
- new_space()->AddInlineAllocationObserver(idle_scavenge_observer_);
+ new_space()->AddAllocationObserver(idle_scavenge_observer_);
return true;
}
@@ -5247,7 +5247,7 @@ void Heap::TearDown() {
PrintAlloctionsHash();
}
- new_space()->RemoveInlineAllocationObserver(idle_scavenge_observer_);
+ new_space()->RemoveAllocationObserver(idle_scavenge_observer_);
delete idle_scavenge_observer_;
idle_scavenge_observer_ = nullptr;
« no previous file with comments | « src/heap/heap.h ('k') | src/heap/incremental-marking.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698