v8
3.11.10(node0.8.26)
V8 is Google's open source JavaScript engine
|
#include <v8-profiler.h>
Public Types | |
enum | Type { kFull = 0 } |
enum | SerializationFormat { kJSON = 0 } |
Public Member Functions | |
Type | GetType () const |
unsigned | GetUid () const |
Handle< String > | GetTitle () const |
const HeapGraphNode * | GetRoot () const |
const HeapGraphNode * | GetNodeById (SnapshotObjectId id) const |
int | GetNodesCount () const |
const HeapGraphNode * | GetNode (int index) const |
SnapshotObjectId | GetMaxSnapshotJSObjectId () const |
void | Delete () |
void | Serialize (OutputStream *stream, SerializationFormat format) const |
HeapSnapshots record the state of the JS heap at some moment.
Definition at line 320 of file v8-profiler.h.
enum SerializationFormat |
Enumerator | |
---|---|
kJSON |
Definition at line 325 of file v8-profiler.h.
enum Type |
Enumerator | |
---|---|
kFull |
Definition at line 322 of file v8-profiler.h.
void Delete | ( | ) |
Deletes the snapshot and removes it from HeapProfiler's list. All pointers to nodes, edges and paths previously returned become invalid.
Definition at line 6093 of file api.cc.
References HeapProfiler::DeleteAllSnapshots(), and HeapProfiler::GetSnapshotsCount().
SnapshotObjectId GetMaxSnapshotJSObjectId | ( | ) | const |
const HeapGraphNode * GetNode | ( | int | index | ) | const |
const HeapGraphNode * GetNodeById | ( | SnapshotObjectId | id | ) | const |
int GetNodesCount | ( | ) | const |
const HeapGraphNode * GetRoot | ( | ) | const |
Returns the root node of the heap graph.
Definition at line 6127 of file api.cc.
Referenced by HasWeakGlobalHandle(), and TEST().
Returns heap snapshot title.
Definition at line 6119 of file api.cc.
References Isolate::factory(), and Factory::LookupAsciiSymbol().
HeapSnapshot::Type GetType | ( | ) | const |
unsigned GetUid | ( | ) | const |
void Serialize | ( | OutputStream * | stream, |
HeapSnapshot::SerializationFormat | format | ||
) | const |
Prepare a serialized representation of the snapshot. The result is written into the stream provided in chunks of specified size. The total length of the serialized snapshot is unknown in advance, it can be roughly equal to JS heap size (that means, it can be really big - tens of megabytes).
For the JSON format, heap contents are represented as an object with the following structure:
{ snapshot: { title: "...", uid: nnn, meta: { meta-info }, node_count: nnn, edge_count: nnn }, nodes: [nodes array], edges: [edges array], strings: [strings array] }
Nodes reference strings, other nodes, and edges by their indexes in corresponding arrays.
Definition at line 6164 of file api.cc.
References OutputStream::GetChunkSize(), OutputStream::GetOutputEncoding(), and OutputStream::kAscii.
Referenced by TEST().