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

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

Issue 1924033003: [heap] Force inlining of AllocatedSinceLastGC (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 | « no previous file | src/heap/spaces.h » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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_HEAP_H_ 5 #ifndef V8_HEAP_HEAP_H_
6 #define V8_HEAP_HEAP_H_ 6 #define V8_HEAP_HEAP_H_
7 7
8 #include <cmath> 8 #include <cmath>
9 #include <map> 9 #include <map>
10 10
(...skipping 1238 matching lines...) Expand 10 before | Expand all | Expand 10 after
1249 inline intptr_t PromotedTotalSize() { 1249 inline intptr_t PromotedTotalSize() {
1250 int64_t total = PromotedSpaceSizeOfObjects() + PromotedExternalMemorySize(); 1250 int64_t total = PromotedSpaceSizeOfObjects() + PromotedExternalMemorySize();
1251 if (total > std::numeric_limits<intptr_t>::max()) { 1251 if (total > std::numeric_limits<intptr_t>::max()) {
1252 // TODO(erikcorry): Use uintptr_t everywhere we do heap size calculations. 1252 // TODO(erikcorry): Use uintptr_t everywhere we do heap size calculations.
1253 return std::numeric_limits<intptr_t>::max(); 1253 return std::numeric_limits<intptr_t>::max();
1254 } 1254 }
1255 if (total < 0) return 0; 1255 if (total < 0) return 0;
1256 return static_cast<intptr_t>(total); 1256 return static_cast<intptr_t>(total);
1257 } 1257 }
1258 1258
1259 inline void UpdateNewSpaceAllocationCounter(); 1259 V8_INLINE void UpdateNewSpaceAllocationCounter();
1260 inline size_t NewSpaceAllocationCounter(); 1260 V8_INLINE size_t NewSpaceAllocationCounter();
1261 1261
1262 // This should be used only for testing. 1262 // This should be used only for testing.
1263 void set_new_space_allocation_counter(size_t new_value) { 1263 void set_new_space_allocation_counter(size_t new_value) {
1264 new_space_allocation_counter_ = new_value; 1264 new_space_allocation_counter_ = new_value;
1265 } 1265 }
1266 1266
1267 void UpdateOldGenerationAllocationCounter() { 1267 void UpdateOldGenerationAllocationCounter() {
1268 old_generation_allocation_counter_ = OldGenerationAllocationCounter(); 1268 old_generation_allocation_counter_ = OldGenerationAllocationCounter();
1269 } 1269 }
1270 1270
(...skipping 1378 matching lines...) Expand 10 before | Expand all | Expand 10 after
2649 friend class LargeObjectSpace; 2649 friend class LargeObjectSpace;
2650 friend class NewSpace; 2650 friend class NewSpace;
2651 friend class PagedSpace; 2651 friend class PagedSpace;
2652 DISALLOW_COPY_AND_ASSIGN(AllocationObserver); 2652 DISALLOW_COPY_AND_ASSIGN(AllocationObserver);
2653 }; 2653 };
2654 2654
2655 } // namespace internal 2655 } // namespace internal
2656 } // namespace v8 2656 } // namespace v8
2657 2657
2658 #endif // V8_HEAP_HEAP_H_ 2658 #endif // V8_HEAP_HEAP_H_
OLDNEW
« no previous file with comments | « no previous file | src/heap/spaces.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698