Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(167)

Unified Diff: include/v8-profiler.h

Issue 6685084: Add support for CPU and heap profiles deletion. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Implemente per-profile deletion Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/api.cc » ('j') | src/api.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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:
« no previous file with comments | « no previous file | src/api.cc » ('j') | src/api.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698