V8 Project
v8::OutputStream Class Referenceabstract

An interface for exporting data from V8, using "push" model. More...

#include <v8-profiler.h>

+ Collaboration diagram for v8::OutputStream:

Public Types

enum  WriteResult { kContinue = 0 , kAbort = 1 }
 

Public Member Functions

virtual ~OutputStream ()
 
virtual void EndOfStream ()=0
 Notify about the end of stream. More...
 
virtual int GetChunkSize ()
 Get preferred output chunk size. More...
 
virtual WriteResult WriteAsciiChunk (char *data, int size)=0
 Writes the next chunk of snapshot data into the stream. More...
 
virtual WriteResult WriteHeapStatsChunk (HeapStatsUpdate *data, int count)
 Writes the next chunk of heap stats data into the stream. More...
 

Detailed Description

An interface for exporting data from V8, using "push" model.

Definition at line 272 of file v8-profiler.h.

Member Enumeration Documentation

◆ WriteResult

Enumerator
kContinue 
kAbort 

Definition at line 274 of file v8-profiler.h.

274  {
275  kContinue = 0,
276  kAbort = 1
277  };

Constructor & Destructor Documentation

◆ ~OutputStream()

virtual v8::OutputStream::~OutputStream ( )
inlinevirtual

Definition at line 278 of file v8-profiler.h.

278 {}

Member Function Documentation

◆ EndOfStream()

virtual void v8::OutputStream::EndOfStream ( )
pure virtual

Notify about the end of stream.

Referenced by v8::internal::OutputStreamWriter::Finalize(), and v8::internal::HeapObjectsMap::PushHeapObjectsStats().

+ Here is the caller graph for this function:

◆ GetChunkSize()

virtual int v8::OutputStream::GetChunkSize ( )
inlinevirtual

Get preferred output chunk size.

Called only once.

Definition at line 282 of file v8-profiler.h.

282 { return 1024; }

Referenced by v8::internal::HeapObjectsMap::PushHeapObjectsStats(), and v8::HeapSnapshot::Serialize().

+ Here is the caller graph for this function:

◆ WriteAsciiChunk()

virtual WriteResult v8::OutputStream::WriteAsciiChunk ( char *  data,
int  size 
)
pure virtual

Writes the next chunk of snapshot data into the stream.

Writing can be stopped by returning kAbort as function result. EndOfStream will not be called in case writing was aborted.

Referenced by v8::internal::OutputStreamWriter::WriteChunk().

+ Here is the caller graph for this function:

◆ WriteHeapStatsChunk()

virtual WriteResult v8::OutputStream::WriteHeapStatsChunk ( HeapStatsUpdate data,
int  count 
)
inlinevirtual

Writes the next chunk of heap stats data into the stream.

Writing can be stopped by returning kAbort as function result. EndOfStream will not be called in case writing was aborted.

Definition at line 294 of file v8-profiler.h.

294  {
295  return kAbort;
296  }

Referenced by v8::internal::HeapObjectsMap::PushHeapObjectsStats().

+ Here is the caller graph for this function:

The documentation for this class was generated from the following file: