v8-profiler.h | v8-profiler.h | |||
---|---|---|---|---|
skipping to change at line 253 | skipping to change at line 253 | |||
/** Returns node type (see HeapGraphNode::Type). */ | /** Returns node type (see HeapGraphNode::Type). */ | |||
Type GetType() const; | Type GetType() const; | |||
/** | /** | |||
* Returns node name. Depending on node's type this can be the name | * Returns node name. Depending on node's type this can be the name | |||
* of the constructor (for objects), the name of the function (for | * of the constructor (for objects), the name of the function (for | |||
* closures), string value, or an empty string (for compiled code). | * closures), string value, or an empty string (for compiled code). | |||
*/ | */ | |||
Handle<String> GetName() const; | Handle<String> GetName() const; | |||
/** | ||||
* Returns node id. For the same heap object, the id remains the same | ||||
* across all snapshots. | ||||
*/ | ||||
uint64_t GetId() const; | ||||
/** Returns node's own size, in bytes. */ | /** Returns node's own size, in bytes. */ | |||
int GetSelfSize() const; | int GetSelfSize() const; | |||
/** Returns node's network (self + reachable nodes) size, in bytes. */ | /** Returns node's network (self + reachable nodes) size, in bytes. */ | |||
int GetTotalSize() const; | int GetTotalSize() const; | |||
/** | /** | |||
* Returns node's private size, in bytes. That is, the size of memory | * Returns node's private size, in bytes. That is, the size of memory | |||
* that will be reclaimed having this node collected. | * that will be reclaimed having this node collected. | |||
*/ | */ | |||
skipping to change at line 284 | skipping to change at line 290 | |||
/** Returns a retainer by index. */ | /** Returns a retainer by index. */ | |||
const HeapGraphEdge* GetRetainer(int index) const; | const HeapGraphEdge* GetRetainer(int index) const; | |||
/** Returns the number of simple retaining paths from the root to the nod e. */ | /** Returns the number of simple retaining paths from the root to the nod e. */ | |||
int GetRetainingPathsCount() const; | int GetRetainingPathsCount() const; | |||
/** Returns a retaining path by index. */ | /** Returns a retaining path by index. */ | |||
const HeapGraphPath* GetRetainingPath(int index) const; | const HeapGraphPath* GetRetainingPath(int index) const; | |||
}; | }; | |||
class V8EXPORT HeapSnapshotsDiff { | ||||
public: | ||||
/** Returns the root node for added nodes. */ | ||||
const HeapGraphNode* GetAdditionsRoot() const; | ||||
/** Returns the root node for deleted nodes. */ | ||||
const HeapGraphNode* GetDeletionsRoot() const; | ||||
}; | ||||
/** | /** | |||
* HeapSnapshots record the state of the JS heap at some moment. | * HeapSnapshots record the state of the JS heap at some moment. | |||
*/ | */ | |||
class V8EXPORT HeapSnapshot { | class V8EXPORT HeapSnapshot { | |||
public: | public: | |||
/** Returns heap snapshot UID (assigned by the profiler.) */ | /** Returns heap snapshot UID (assigned by the profiler.) */ | |||
unsigned GetUid() const; | unsigned GetUid() const; | |||
/** Returns heap snapshot title. */ | /** Returns heap snapshot title. */ | |||
Handle<String> GetTitle() const; | Handle<String> GetTitle() const; | |||
/** Returns the root node of the heap graph. */ | /** Returns the root node of the heap graph. */ | |||
const HeapGraphNode* GetHead() const; | const HeapGraphNode* GetRoot() const; | |||
/** Returns a diff between this snapshot and another one. */ | ||||
const HeapSnapshotsDiff* CompareWith(const HeapSnapshot* snapshot) const; | ||||
}; | }; | |||
/** | /** | |||
* Interface for controlling heap profiling. | * Interface for controlling heap profiling. | |||
*/ | */ | |||
class V8EXPORT HeapProfiler { | class V8EXPORT HeapProfiler { | |||
public: | public: | |||
/** Returns the number of snapshots taken. */ | /** Returns the number of snapshots taken. */ | |||
static int GetSnapshotsCount(); | static int GetSnapshotsCount(); | |||
End of changes. 3 change blocks. | ||||
1 lines changed or deleted | 19 lines changed or added | |||
v8.h | v8.h | |||
---|---|---|---|---|
skipping to change at line 138 | skipping to change at line 138 | |||
class Heap; | class Heap; | |||
class Top; | class Top; | |||
} | } | |||
// --- W e a k H a n d l e s | // --- W e a k H a n d l e s | |||
/** | /** | |||
* A weak reference callback function. | * A weak reference callback function. | |||
* | * | |||
* This callback should either explicitly invoke Dispose on |object| if | ||||
* V8 wrapper is not needed anymore, or 'revive' it by invocation of MakeWe | ||||
ak. | ||||
* | ||||
* \param object the weak global object to be reclaimed by the garbage coll ector | * \param object the weak global object to be reclaimed by the garbage coll ector | |||
* \param parameter the value passed in when making the weak global object | * \param parameter the value passed in when making the weak global object | |||
*/ | */ | |||
typedef void (*WeakReferenceCallback)(Persistent<Value> object, | typedef void (*WeakReferenceCallback)(Persistent<Value> object, | |||
void* parameter); | void* parameter); | |||
// --- H a n d l e s --- | // --- H a n d l e s --- | |||
#define TYPE_CHECK(T, S) \ | #define TYPE_CHECK(T, S) \ | |||
while (false) { \ | while (false) { \ | |||
*(static_cast<T**>(0)) = static_cast<S*>(0); \ | *(static_cast<T* volatile*>(0)) = static_cast<S*>(0); \ | |||
} | } | |||
/** | /** | |||
* An object reference managed by the v8 garbage collector. | * An object reference managed by the v8 garbage collector. | |||
* | * | |||
* All objects returned from v8 have to be tracked by the garbage | * All objects returned from v8 have to be tracked by the garbage | |||
* collector so that it knows that the objects are still alive. Also, | * collector so that it knows that the objects are still alive. Also, | |||
* because the garbage collector may move objects, it is unsafe to | * because the garbage collector may move objects, it is unsafe to | |||
* point directly to an object. Instead, all objects are stored in | * point directly to an object. Instead, all objects are stored in | |||
* handles which are known by the garbage collector and updated | * handles which are known by the garbage collector and updated | |||
End of changes. 2 change blocks. | ||||
3 lines changed or deleted | 7 lines changed or added | |||