v8-profiler.h   v8-profiler.h 
skipping to change at line 364 skipping to change at line 364
* Prepare a serialized representation of the snapshot. The result * Prepare a serialized representation of the snapshot. The result
* is written into the stream provided in chunks of specified size. * is written into the stream provided in chunks of specified size.
* The total length of the serialized snapshot is unknown in * The total length of the serialized snapshot is unknown in
* advance, it can be roughly equal to JS heap size (that means, * advance, it can be roughly equal to JS heap size (that means,
* it can be really big - tens of megabytes). * it can be really big - tens of megabytes).
* *
* For the JSON format, heap contents are represented as an object * For the JSON format, heap contents are represented as an object
* with the following structure: * with the following structure:
* *
* { * {
* snapshot: {title: "...", uid: nnn}, * snapshot: {
* nodes: [ * title: "...",
* meta-info (JSON string), * uid: nnn,
* nodes themselves * meta: { meta-info },
* ], * node_count: nnn,
* strings: [strings] * edge_count: nnn
* },
* nodes: [nodes array],
* edges: [edges array],
* strings: [strings array]
* } * }
* *
* Outgoing node links are stored after each node. Nodes reference string * Nodes reference strings, other nodes, and edges by their indexes
s * in corresponding arrays.
* and other nodes by their indexes in corresponding arrays.
*/ */
void Serialize(OutputStream* stream, SerializationFormat format) const; void Serialize(OutputStream* stream, SerializationFormat format) const;
}; };
class RetainedObjectInfo; class RetainedObjectInfo;
/** /**
* Interface for controlling heap profiling. * Interface for controlling heap profiling.
*/ */
class V8EXPORT HeapProfiler { class V8EXPORT HeapProfiler {
skipping to change at line 404 skipping to change at line 408
/** Returns the number of snapshots taken. */ /** Returns the number of snapshots taken. */
static int GetSnapshotsCount(); static int GetSnapshotsCount();
/** Returns a snapshot by index. */ /** Returns a snapshot by index. */
static const HeapSnapshot* GetSnapshot(int index); static const HeapSnapshot* GetSnapshot(int index);
/** Returns a profile by uid. */ /** Returns a profile by uid. */
static const HeapSnapshot* FindSnapshot(unsigned uid); static const HeapSnapshot* FindSnapshot(unsigned uid);
/** /**
* Returns SnapshotObjectId for a heap object referenced by |value| if
* it has been seen by the heap profiler, kUnknownObjectId otherwise.
*/
static SnapshotObjectId GetSnapshotObjectId(Handle<Value> value);
/**
* A constant for invalid SnapshotObjectId. GetSnapshotObjectId will retu
rn
* it in case heap profiler cannot find id for the object passed as
* parameter. HeapSnapshot::GetNodeById will always return NULL for such
id.
*/
static const SnapshotObjectId kUnknownObjectId = 0;
/**
* Takes a heap snapshot and returns it. Title may be an empty string. * Takes a heap snapshot and returns it. Title may be an empty string.
* See HeapSnapshot::Type for types description. * See HeapSnapshot::Type for types description.
*/ */
static const HeapSnapshot* TakeSnapshot( static const HeapSnapshot* TakeSnapshot(
Handle<String> title, Handle<String> title,
HeapSnapshot::Type type = HeapSnapshot::kFull, HeapSnapshot::Type type = HeapSnapshot::kFull,
ActivityControl* control = NULL); ActivityControl* control = NULL);
/** /**
* Starts tracking of heap objects population statistics. After calling * Starts tracking of heap objects population statistics. After calling
* this method, all heap objects relocations done by the garbage collecto r * this method, all heap objects relocations done by the garbage collecto r
* are being registered. * are being registered.
*/ */
static void StartHeapObjectsTracking(); static void StartHeapObjectsTracking();
/** /**
* Adds a new time interval entry to the aggregated statistics array. The * Adds a new time interval entry to the aggregated statistics array. The
* time interval entry contains information on the current heap objects * time interval entry contains information on the current heap objects
* population size. The method also updates aggregated statistics and * population size. The method also updates aggregated statistics and
* reports updates for all previous time intervals via the OutputStream * reports updates for all previous time intervals via the OutputStream
* object. Updates on each time interval are provided as pairs of time * object. Updates on each time interval are provided as a triplet. It ha
* interval index and updated heap objects count. s
* time interval index, updated heap objects count and updated heap objec
ts
* size.
* *
* StartHeapObjectsTracking must be called before the first call to this * StartHeapObjectsTracking must be called before the first call to this
* method. * method.
*/ */
static void PushHeapObjectsStats(OutputStream* stream); static void PushHeapObjectsStats(OutputStream* stream);
/** /**
* Stops tracking of heap objects population statistics, cleans up all * Stops tracking of heap objects population statistics, cleans up all
* collected data. StartHeapObjectsTracking must be called again prior to * collected data. StartHeapObjectsTracking must be called again prior to
* calling PushHeapObjectsStats next time. * calling PushHeapObjectsStats next time.
 End of changes. 4 change blocks. 
11 lines changed or deleted 32 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/