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

Unified Diff: include/v8-profiler.h

Issue 3197010: Version 2.3.10... (Closed) Base URL: http://v8.googlecode.com/svn/trunk/
Patch Set: Created 10 years, 4 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 | « include/v8.h ('k') | src/api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/v8-profiler.h
===================================================================
--- include/v8-profiler.h (revision 5316)
+++ include/v8-profiler.h (working copy)
@@ -260,10 +260,17 @@
/**
* Returns node id. For the same heap object, the id remains the same
- * across all snapshots.
+ * across all snapshots. Not applicable to aggregated heap snapshots
+ * as they only contain aggregated instances.
*/
uint64_t GetId() const;
+ /**
+ * Returns the number of instances. Only applicable to aggregated
+ * heap snapshots.
+ */
+ int GetInstancesCount() const;
+
/** Returns node's own size, in bytes. */
int GetSelfSize() const;
@@ -313,6 +320,15 @@
*/
class V8EXPORT HeapSnapshot {
public:
+ enum Type {
+ kFull = 0, // Heap snapshot with all instances and references.
+ kAggregated = 1 // Snapshot doesn't contain individual heap entries,
+ //instead they are grouped by constructor name.
+ };
+
+ /** Returns heap snapshot type. */
+ Type GetType() const;
+
/** Returns heap snapshot UID (assigned by the profiler.) */
unsigned GetUid() const;
@@ -322,7 +338,10 @@
/** Returns the root node of the heap graph. */
const HeapGraphNode* GetRoot() const;
- /** Returns a diff between this snapshot and another one. */
+ /**
+ * Returns a diff between this snapshot and another one. Only snapshots
+ * of the same type can be compared.
+ */
const HeapSnapshotsDiff* CompareWith(const HeapSnapshot* snapshot) const;
};
@@ -341,8 +360,13 @@
/** Returns a profile by uid. */
static const HeapSnapshot* FindSnapshot(unsigned uid);
- /** Takes a heap snapshot and returns it. Title may be an empty string. */
- static const HeapSnapshot* TakeSnapshot(Handle<String> title);
+ /**
+ * Takes a heap snapshot and returns it. Title may be an empty string.
+ * See HeapSnapshot::Type for types description.
+ */
+ static const HeapSnapshot* TakeSnapshot(
+ Handle<String> title,
+ HeapSnapshot::Type type = HeapSnapshot::kFull);
};
« no previous file with comments | « include/v8.h ('k') | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698