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

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

Issue 2082863003: Refactor the functions related to collecting code statistics to a new class. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 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') | src/heap/spaces.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 2221 matching lines...) Expand 10 before | Expand all | Expand 10 after
2232 void Allocate(int bytes) { accounting_stats_.AllocateBytes(bytes); } 2232 void Allocate(int bytes) { accounting_stats_.AllocateBytes(bytes); }
2233 2233
2234 void IncreaseCapacity(int size); 2234 void IncreaseCapacity(int size);
2235 2235
2236 // Releases an unused page and shrinks the space. 2236 // Releases an unused page and shrinks the space.
2237 void ReleasePage(Page* page); 2237 void ReleasePage(Page* page);
2238 2238
2239 // The dummy page that anchors the linked list of pages. 2239 // The dummy page that anchors the linked list of pages.
2240 Page* anchor() { return &anchor_; } 2240 Page* anchor() { return &anchor_; }
2241 2241
2242 // Collect code size related statistics
2243 void CollectCodeStatistics();
2244
2245 // Reset code size related statistics
2246 static void ResetCodeAndMetadataStatistics(Isolate* isolate);
2247 2242
2248 #ifdef VERIFY_HEAP 2243 #ifdef VERIFY_HEAP
2249 // Verify integrity of this space. 2244 // Verify integrity of this space.
2250 virtual void Verify(ObjectVisitor* visitor); 2245 virtual void Verify(ObjectVisitor* visitor);
2251 2246
2252 // Overridden by subclasses to verify space-specific object 2247 // Overridden by subclasses to verify space-specific object
2253 // properties (e.g., only maps or free-list nodes are in map space). 2248 // properties (e.g., only maps or free-list nodes are in map space).
2254 virtual void VerifyObject(HeapObject* obj) {} 2249 virtual void VerifyObject(HeapObject* obj) {}
2255 #endif 2250 #endif
2256 2251
(...skipping 907 matching lines...) Expand 10 before | Expand all | Expand 10 after
3164 count = 0; 3159 count = 0;
3165 } 3160 }
3166 // Must be small, since an iteration is used for lookup. 3161 // Must be small, since an iteration is used for lookup.
3167 static const int kMaxComments = 64; 3162 static const int kMaxComments = 64;
3168 }; 3163 };
3169 #endif 3164 #endif
3170 } // namespace internal 3165 } // namespace internal
3171 } // namespace v8 3166 } // namespace v8
3172 3167
3173 #endif // V8_HEAP_SPACES_H_ 3168 #endif // V8_HEAP_SPACES_H_
OLDNEW
« no previous file with comments | « src/heap/heap.cc ('k') | src/heap/spaces.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698