| 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 kBoolean = 4, | 67 kBoolean = 4, |
| 68 kChar = 5, | 68 kChar = 5, |
| 69 kFloat = 6, | 69 kFloat = 6, |
| 70 kDouble = 7, | 70 kDouble = 7, |
| 71 kByte = 8, | 71 kByte = 8, |
| 72 kShort = 9, | 72 kShort = 9, |
| 73 kInt = 10, | 73 kInt = 10, |
| 74 kLong = 11 | 74 kLong = 11 |
| 75 }; | 75 }; |
| 76 | 76 |
| 77 HeapProfiler(Dart_HeapProfileWriteCallback callback, void* stream); | 77 HeapProfiler(Dart_FileWriteCallback callback, void* stream); |
| 78 ~HeapProfiler(); | 78 ~HeapProfiler(); |
| 79 | 79 |
| 80 // Writes a root to the heap dump. | 80 // Writes a root to the heap dump. |
| 81 void WriteRoot(const RawObject* raw_obj); | 81 void WriteRoot(const RawObject* raw_obj); |
| 82 | 82 |
| 83 // Writes a object to the heap dump. | 83 // Writes a object to the heap dump. |
| 84 void WriteObject(const RawObject* raw_obj); | 84 void WriteObject(const RawObject* raw_obj); |
| 85 | 85 |
| 86 private: | 86 private: |
| 87 // Record tags describe top-level records. | 87 // Record tags describe top-level records. |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 void WriteClassDump(const RawClass* raw_class); | 242 void WriteClassDump(const RawClass* raw_class); |
| 243 void WriteInstanceDump(const RawObject* raw_obj); | 243 void WriteInstanceDump(const RawObject* raw_obj); |
| 244 void WriteObjectArrayDump(const RawArray* raw_array); | 244 void WriteObjectArrayDump(const RawArray* raw_array); |
| 245 void WritePrimitiveArrayDump(const RawByteArray* raw_byte_array, | 245 void WritePrimitiveArrayDump(const RawByteArray* raw_byte_array, |
| 246 uint8_t tag, | 246 uint8_t tag, |
| 247 const void* data); | 247 const void* data); |
| 248 | 248 |
| 249 static const RawClass* GetClass(const RawObject* raw_obj); | 249 static const RawClass* GetClass(const RawObject* raw_obj); |
| 250 static const RawClass* GetSuperClass(const RawClass* raw_class); | 250 static const RawClass* GetSuperClass(const RawClass* raw_class); |
| 251 | 251 |
| 252 Dart_HeapProfileWriteCallback write_callback_; | 252 Dart_FileWriteCallback write_callback_; |
| 253 | 253 |
| 254 void* output_stream_; | 254 void* output_stream_; |
| 255 | 255 |
| 256 Record* heap_dump_record_; | 256 Record* heap_dump_record_; |
| 257 | 257 |
| 258 std::set<const RawSmi*> smi_table_; | 258 std::set<const RawSmi*> smi_table_; |
| 259 std::set<const RawClass*> class_table_; | 259 std::set<const RawClass*> class_table_; |
| 260 std::set<const RawString*> string_table_; | 260 std::set<const RawString*> string_table_; |
| 261 | 261 |
| 262 DISALLOW_COPY_AND_ASSIGN(HeapProfiler); | 262 DISALLOW_COPY_AND_ASSIGN(HeapProfiler); |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |