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

Unified Diff: src/heap/spaces-inl.h

Issue 2160613002: [heap] Remove black pages and use black areas instead. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: perform cast after writing map Created 4 years, 5 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/spaces.cc ('k') | src/ia32/assembler-ia32-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/spaces-inl.h
diff --git a/src/heap/spaces-inl.h b/src/heap/spaces-inl.h
index 1ee0f0bf910d095386ec79b4519645a8a4f274aa..0fd69dacfebd7b93b269bd9b093b53e39bca4866 100644
--- a/src/heap/spaces-inl.h
+++ b/src/heap/spaces-inl.h
@@ -34,7 +34,6 @@ NewSpacePageRange::NewSpacePageRange(Address start, Address limit)
SemiSpace::AssertValidRange(start, limit);
}
-
// -----------------------------------------------------------------------------
// SemiSpaceIterator
@@ -242,7 +241,6 @@ void MemoryChunk::ResetLiveBytes() {
}
void MemoryChunk::IncrementLiveBytes(int by) {
- if (IsFlagSet(BLACK_PAGE)) return;
if (FLAG_trace_live_bytes) {
PrintIsolate(
heap()->isolate(), "live-bytes: update page=%p delta=%d %d->%d\n",
@@ -444,6 +442,12 @@ AllocationResult PagedSpace::AllocateRawUnaligned(
if (object == NULL) {
object = SlowAllocateRaw(size_in_bytes);
}
+ if (object != NULL) {
+ if (heap()->incremental_marking()->black_allocation()) {
+ Marking::MarkBlack(ObjectMarking::MarkBitFrom(object));
+ MemoryChunk::IncrementLiveBytesFromGC(object, size_in_bytes);
+ }
+ }
}
if (object != NULL) {
« no previous file with comments | « src/heap/spaces.cc ('k') | src/ia32/assembler-ia32-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698