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

Unified Diff: src/heap/heap.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 | « no previous file | src/heap/heap-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/heap.h
diff --git a/src/heap/heap.h b/src/heap/heap.h
index 5599f1b4ff9e9cdfede0fafe7ff97e448ff23621..4b542f87b5ef0b3b9837f37a27cdd7210fdf7c2a 100644
--- a/src/heap/heap.h
+++ b/src/heap/heap.h
@@ -1258,8 +1258,13 @@ class Heap {
return static_cast<intptr_t>(total);
}
- V8_INLINE void UpdateNewSpaceAllocationCounter();
- V8_INLINE size_t NewSpaceAllocationCounter();
+ void UpdateNewSpaceAllocationCounter() {
+ new_space_allocation_counter_ = NewSpaceAllocationCounter();
+ }
+
+ size_t NewSpaceAllocationCounter() {
+ return new_space_allocation_counter_ + new_space()->AllocatedSinceLastGC();
+ }
// This should be used only for testing.
void set_new_space_allocation_counter(size_t new_value) {
« no previous file with comments | « no previous file | src/heap/heap-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698