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

Unified Diff: src/heap/spaces.cc

Issue 2861763002: [heap] Add GC accounting to slow allocation and incremental marking job (Closed)
Patch Set: Add includes Created 3 years, 8 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
« src/heap/incremental-marking-job.cc ('K') | « src/heap/incremental-marking-job.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/spaces.cc
diff --git a/src/heap/spaces.cc b/src/heap/spaces.cc
index 371dfb1e5627b403886d4d292f782debb630d5cf..4598147bf16749b73d4276a8dd2cadb418628524 100644
--- a/src/heap/spaces.cc
+++ b/src/heap/spaces.cc
@@ -20,6 +20,7 @@
#include "src/objects-inl.h"
#include "src/snapshot/snapshot.h"
#include "src/v8.h"
+#include "src/vm-state-inl.h"
namespace v8 {
namespace internal {
@@ -2896,10 +2897,12 @@ HeapObject* CompactionSpace::SweepAndRetryAllocation(int size_in_bytes) {
}
HeapObject* PagedSpace::SlowAllocateRaw(int size_in_bytes) {
+ // Allocation in this space has failed.
DCHECK_GE(size_in_bytes, 0);
const int kMaxPagesToSweep = 1;
- // Allocation in this space has failed.
+ VMState<GC> state(heap()->isolate());
+ RuntimeCallTimerScope(heap()->isolate(), &RuntimeCallStats::GC);
Camillo Bruni 2017/05/03 16:25:56 same here?
Michael Lippautz 2017/05/03 16:32:00 Used GC_SlowAllocateRaw as this one here can do sw
MarkCompactCollector* collector = heap()->mark_compact_collector();
// Sweeping is still in progress.
« src/heap/incremental-marking-job.cc ('K') | « src/heap/incremental-marking-job.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698