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

Side by Side Diff: src/heap/spaces.h

Issue 1964143004: Fix live bytes counter in large object space after right trimming. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 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 unified diff | Download patch
« no previous file with comments | « src/heap/heap.cc ('k') | test/cctest/heap/test-heap.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_HEAP_SPACES_H_ 5 #ifndef V8_HEAP_SPACES_H_
6 #define V8_HEAP_SPACES_H_ 6 #define V8_HEAP_SPACES_H_
7 7
8 #include <list> 8 #include <list>
9 9
10 #include "src/allocation.h" 10 #include "src/allocation.h"
(...skipping 3039 matching lines...) Expand 10 before | Expand all | Expand 10 after
3050 3050
3051 // Checks whether a heap object is in this space; O(1). 3051 // Checks whether a heap object is in this space; O(1).
3052 bool Contains(HeapObject* obj); 3052 bool Contains(HeapObject* obj);
3053 // Checks whether an address is in the object area in this space. Iterates 3053 // Checks whether an address is in the object area in this space. Iterates
3054 // all objects in the space. May be slow. 3054 // all objects in the space. May be slow.
3055 bool ContainsSlow(Address addr) { return FindObject(addr)->IsHeapObject(); } 3055 bool ContainsSlow(Address addr) { return FindObject(addr)->IsHeapObject(); }
3056 3056
3057 // Checks whether the space is empty. 3057 // Checks whether the space is empty.
3058 bool IsEmpty() { return first_page_ == NULL; } 3058 bool IsEmpty() { return first_page_ == NULL; }
3059 3059
3060 void AdjustLiveBytes(int by) { objects_size_ += by; }
3061
3060 LargePage* first_page() { return first_page_; } 3062 LargePage* first_page() { return first_page_; }
3061 3063
3062 #ifdef VERIFY_HEAP 3064 #ifdef VERIFY_HEAP
3063 virtual void Verify(); 3065 virtual void Verify();
3064 #endif 3066 #endif
3065 3067
3066 #ifdef DEBUG 3068 #ifdef DEBUG
3067 void Print() override; 3069 void Print() override;
3068 void ReportStatistics(); 3070 void ReportStatistics();
3069 void CollectCodeStatistics(); 3071 void CollectCodeStatistics();
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
3142 count = 0; 3144 count = 0;
3143 } 3145 }
3144 // Must be small, since an iteration is used for lookup. 3146 // Must be small, since an iteration is used for lookup.
3145 static const int kMaxComments = 64; 3147 static const int kMaxComments = 64;
3146 }; 3148 };
3147 #endif 3149 #endif
3148 } // namespace internal 3150 } // namespace internal
3149 } // namespace v8 3151 } // namespace v8
3150 3152
3151 #endif // V8_HEAP_SPACES_H_ 3153 #endif // V8_HEAP_SPACES_H_
OLDNEW
« no previous file with comments | « src/heap/heap.cc ('k') | test/cctest/heap/test-heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698