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

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

Issue 1932883002: Revert "[heap] Optimize NewSpace::AllocatedSinceLastGC" (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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
« no previous file with comments | « src/heap/spaces.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-inl.h
diff --git a/src/heap/spaces-inl.h b/src/heap/spaces-inl.h
index 26d95606fad1ab1475a0a57a020f39645a4e3e5e..f9e40bb13a805d80eb8c5b643e35fe795badda47 100644
--- a/src/heap/spaces-inl.h
+++ b/src/heap/spaces-inl.h
@@ -242,23 +242,6 @@ bool NewSpace::FromSpaceContainsSlow(Address a) {
bool NewSpace::ToSpaceContains(Object* o) { return to_space_.Contains(o); }
bool NewSpace::FromSpaceContains(Object* o) { return from_space_.Contains(o); }
-size_t NewSpace::AllocatedSinceLastGC() {
- const intptr_t age_mark_offset = Page::OffsetInPage(to_space_.age_mark());
- const intptr_t top_offset = Page::OffsetInPage(allocation_info_.top());
- const intptr_t age_mark_delta =
- age_mark_offset >= Page::kObjectStartOffset
- ? age_mark_offset - Page::kObjectStartOffset
- : Page::kAllocatableMemory;
- const intptr_t top_delta = top_offset >= Page::kObjectStartOffset
- ? top_offset - Page::kObjectStartOffset
- : Page::kAllocatableMemory;
- DCHECK((allocated_since_last_gc_ > 0) ||
- (Page::FromAllocationAreaAddress(allocation_info_.top()) ==
- Page::FromAllocationAreaAddress(to_space_.age_mark())));
- return static_cast<size_t>(allocated_since_last_gc_ + top_delta -
- age_mark_delta);
-}
-
// --------------------------------------------------------------------------
// AllocationResult
« no previous file with comments | « src/heap/spaces.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698