OLD | NEW |
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_PROFILER_H_ | 5 #ifndef VM_HEAP_PROFILER_H_ |
6 #define VM_HEAP_PROFILER_H_ | 6 #define VM_HEAP_PROFILER_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "include/dart_api.h" | 10 #include "include/dart_api.h" |
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
290 | 290 |
291 private: | 291 private: |
292 HeapProfilerRootVisitor* visitor_; | 292 HeapProfilerRootVisitor* visitor_; |
293 DISALLOW_COPY_AND_ASSIGN(HeapProfilerWeakRootVisitor); | 293 DISALLOW_COPY_AND_ASSIGN(HeapProfilerWeakRootVisitor); |
294 }; | 294 }; |
295 | 295 |
296 | 296 |
297 // Writes a sub-record to the heap dump for every object in the heap. | 297 // Writes a sub-record to the heap dump for every object in the heap. |
298 class HeapProfilerObjectVisitor : public ObjectVisitor { | 298 class HeapProfilerObjectVisitor : public ObjectVisitor { |
299 public: | 299 public: |
300 explicit HeapProfilerObjectVisitor(HeapProfiler* profiler) | 300 HeapProfilerObjectVisitor(Isolate* isolate, HeapProfiler* profiler) |
301 : profiler_(profiler) { | 301 : ObjectVisitor(isolate), profiler_(profiler) { |
302 } | 302 } |
303 | 303 |
304 virtual void VisitObject(RawObject* obj); | 304 virtual void VisitObject(RawObject* obj); |
305 | 305 |
306 private: | 306 private: |
307 HeapProfiler* profiler_; | 307 HeapProfiler* profiler_; |
308 DISALLOW_COPY_AND_ASSIGN(HeapProfilerObjectVisitor); | 308 DISALLOW_COPY_AND_ASSIGN(HeapProfilerObjectVisitor); |
309 }; | 309 }; |
310 | 310 |
311 } // namespace dart | 311 } // namespace dart |
312 | 312 |
313 #endif // VM_HEAP_PROFILER_H_ | 313 #endif // VM_HEAP_PROFILER_H_ |
OLD | NEW |