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

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

Issue 11442024: Unify specification of file open, close, and write callbacks. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years 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/heap.cc ('k') | runtime/vm/heap_profiler.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_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
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
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
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_
OLDNEW
« no previous file with comments | « runtime/vm/heap.cc ('k') | runtime/vm/heap_profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698