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

Side by Side Diff: include/v8.h

Issue 3311028: Implement heap snapshots serialization into JSON. API is designed (Closed)
Patch Set: Comments addressed Created 10 years, 3 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 | « no previous file | include/v8-profiler.h » ('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 2007-2009 the V8 project authors. All rights reserved. 1 // Copyright 2007-2009 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 3178 matching lines...) Expand 10 before | Expand all | Expand 10 after
3189 bool top_level_; 3189 bool top_level_;
3190 3190
3191 static bool active_; 3191 static bool active_;
3192 3192
3193 // Disallow copying and assigning. 3193 // Disallow copying and assigning.
3194 Locker(const Locker&); 3194 Locker(const Locker&);
3195 void operator=(const Locker&); 3195 void operator=(const Locker&);
3196 }; 3196 };
3197 3197
3198 3198
3199 /**
3200 * An interface for exporting data from V8, using "push" model.
3201 */
3202 class V8EXPORT OutputStream {
3203 public:
3204 enum OutputEncoding {
3205 kAscii = 0 // 7-bit ASCII.
3206 };
3207 virtual ~OutputStream() {}
3208 /** Notify about the end of stream. */
3209 virtual void EndOfStream() = 0;
3210 /** Get preferred output chunk size. Called only once. */
3211 virtual int GetChunkSize() { return 1024; }
3212 /** Get preferred output encoding. Called only once. */
3213 virtual OutputEncoding GetOutputEncoding() { return kAscii; }
3214 /** Writes the next chunk of snapshot data into the stream. */
3215 virtual void WriteAsciiChunk(char* data, int size) = 0;
3216 };
3217
3218
3199 3219
3200 // --- I m p l e m e n t a t i o n --- 3220 // --- I m p l e m e n t a t i o n ---
3201 3221
3202 3222
3203 namespace internal { 3223 namespace internal {
3204 3224
3205 3225
3206 // Tag information for HeapObject. 3226 // Tag information for HeapObject.
3207 const int kHeapObjectTag = 1; 3227 const int kHeapObjectTag = 1;
3208 const int kHeapObjectTagSize = 2; 3228 const int kHeapObjectTagSize = 2;
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after
3649 3669
3650 3670
3651 } // namespace v8 3671 } // namespace v8
3652 3672
3653 3673
3654 #undef V8EXPORT 3674 #undef V8EXPORT
3655 #undef TYPE_CHECK 3675 #undef TYPE_CHECK
3656 3676
3657 3677
3658 #endif // V8_H_ 3678 #endif // V8_H_
OLDNEW
« no previous file with comments | « no previous file | include/v8-profiler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698