Index: include/v8-profiler.h |
diff --git a/include/v8-profiler.h b/include/v8-profiler.h |
index d466d5e9e768a8117b2c9b406b164f7c323dce33..0006847379691063e1d0f2ad1d0eba3f790efacf 100644 |
--- a/include/v8-profiler.h |
+++ b/include/v8-profiler.h |
@@ -131,6 +131,16 @@ class V8EXPORT CpuProfile { |
/** Returns the root node of the top down call tree. */ |
const CpuProfileNode* GetTopDownRoot() const; |
+ |
+ /** |
+ * Deletes the profile and removes it from CpuProfiler's list. |
+ * All pointers to nodes previously returned become invalid. |
+ * Profiles with the same uid but obtained using different |
+ * security token are not deleted, but become inaccessible |
+ * using FindProfile method. It is embedder's responsibility |
+ * to call Delete on these profiles. |
+ */ |
+ void Delete() const; |
Vitaly Repeshko
2011/03/22 14:30:36
"const" looks weird here.
mnaganov (inactive)
2011/03/22 16:03:09
Hmm, maybe. I added 'const' because all methods re
|
}; |
@@ -181,6 +191,13 @@ class V8EXPORT CpuProfiler { |
static const CpuProfile* StopProfiling( |
Handle<String> title, |
Handle<Value> security_token = Handle<Value>()); |
+ |
+ /** |
+ * Deletes all existing profiles, also cancelling all profiling |
+ * activity. All previously returned pointers to profiles and their |
+ * contents become invalid after this call. |
+ */ |
+ static void DeleteAllProfiles(); |
}; |
@@ -368,6 +385,13 @@ class V8EXPORT HeapSnapshot { |
const HeapSnapshotsDiff* CompareWith(const HeapSnapshot* snapshot) const; |
/** |
+ * Deletes the snapshot and removes it from HeapProfiler's list. |
+ * All pointers to nodes, edges and paths previously returned become |
+ * invalid. |
+ */ |
+ void Delete() const; |
Vitaly Repeshko
2011/03/22 14:30:36
Ditto.
mnaganov (inactive)
2011/03/22 16:03:09
Done.
|
+ |
+ /** |
* 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 |
@@ -427,6 +451,12 @@ class V8EXPORT HeapProfiler { |
HeapSnapshot::Type type = HeapSnapshot::kFull, |
ActivityControl* control = NULL); |
+ /** |
+ * Deletes all snapshots taken. All previously returned pointers to |
+ * snapshots and their contents become invalid after this call. |
+ */ |
+ static void DeleteAllSnapshots(); |
+ |
/** Binds a callback to embedder's class ID. */ |
static void DefineWrapperClass( |
uint16_t class_id, |
@@ -463,7 +493,7 @@ class V8EXPORT HeapProfiler { |
* |
* V8 takes ownership of RetainedObjectInfo instances passed to it and |
* keeps them alive only during snapshot collection. Afterwards, they |
- * are freed by calling the Dispose class function. |
+ * are freed by calling the Delete class function. |
Vitaly Repeshko
2011/03/22 14:30:36
Accidental edit?
mnaganov (inactive)
2011/03/22 16:03:09
Ah, yes. Massive renaming. Reverted.
|
*/ |
class V8EXPORT RetainedObjectInfo { // NOLINT |
public: |