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

Side by Side Diff: runtime/vm/heap.h

Issue 10452006: Implement a heap profiler for the Dart managed heap. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: address final review comments Created 8 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/dart_api_impl.cc ('k') | runtime/vm/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 (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef VM_HEAP_H_ 5 #ifndef VM_HEAP_H_
6 #define VM_HEAP_H_ 6 #define VM_HEAP_H_
7 7
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/allocation.h" 9 #include "vm/allocation.h"
10 #include "vm/flags.h" 10 #include "vm/flags.h"
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 111
112 // Initialize the heap and register it with the isolate. 112 // Initialize the heap and register it with the isolate.
113 static void Init(Isolate* isolate); 113 static void Init(Isolate* isolate);
114 114
115 // Verify that all pointers in the heap point to the heap. 115 // Verify that all pointers in the heap point to the heap.
116 bool Verify() const; 116 bool Verify() const;
117 117
118 // Print heap sizes. 118 // Print heap sizes.
119 void PrintSizes() const; 119 void PrintSizes() const;
120 120
121 // Generates a profile of the current and VM isolate heaps.
122 void Profile(Dart_HeapProfileWriteCallback callback, void* stream) const;
123
121 private: 124 private:
122 Heap(); 125 Heap();
123 126
124 uword AllocateNew(intptr_t size); 127 uword AllocateNew(intptr_t size);
125 uword AllocateOld(intptr_t size); 128 uword AllocateOld(intptr_t size);
126 uword AllocateCode(PageSpace* space, intptr_t size); 129 uword AllocateCode(PageSpace* space, intptr_t size);
127 130
128 // The different spaces used for allocation. 131 // The different spaces used for allocation.
129 Scavenger* new_space_; 132 Scavenger* new_space_;
130 PageSpace* old_space_; 133 PageSpace* old_space_;
(...skipping 16 matching lines...) Expand all
147 public: 150 public:
148 NoGCScope() {} 151 NoGCScope() {}
149 private: 152 private:
150 DISALLOW_COPY_AND_ASSIGN(NoGCScope); 153 DISALLOW_COPY_AND_ASSIGN(NoGCScope);
151 }; 154 };
152 #endif // defined(DEBUG) 155 #endif // defined(DEBUG)
153 156
154 } // namespace dart 157 } // namespace dart
155 158
156 #endif // VM_HEAP_H_ 159 #endif // VM_HEAP_H_
OLDNEW
« no previous file with comments | « runtime/vm/dart_api_impl.cc ('k') | runtime/vm/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698