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

Unified Diff: src/heap-profiler.h

Issue 243045: Merge bleeding_edge revisions 2971, 2972 (heap profiler updates) to trunk.... (Closed) Base URL: http://v8.googlecode.com/svn/trunk/
Patch Set: Created 11 years, 3 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/heap-profiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap-profiler.h
===================================================================
--- src/heap-profiler.h (revision 2996)
+++ src/heap-profiler.h (working copy)
@@ -53,7 +53,8 @@
// These special cases are used in retainer profile.
enum SpecialCase {
ROOTS = 1,
- GLOBAL_PROPERTY = 2
+ GLOBAL_PROPERTY = 2,
+ SELF = 3 // This case is used in ClustersCoarser only.
};
JSObjectsCluster() : constructor_(NULL), instance_(NULL) {}
@@ -77,6 +78,9 @@
(a.instance_ == b.instance_ ? 0 : (a.instance_ < b.instance_ ? -1 : 1))
: cons_cmp;
}
+ static int Compare(const JSObjectsCluster* a, const JSObjectsCluster* b) {
+ return Compare(*a, *b);
+ }
bool is_null() const { return constructor_ == NULL; }
bool can_be_coarsed() const { return instance_ != NULL; }
@@ -93,6 +97,7 @@
switch (special) {
case ROOTS: return Heap::result_symbol();
case GLOBAL_PROPERTY: return Heap::code_symbol();
+ case SELF: return Heap::catch_var_symbol();
default:
UNREACHABLE();
return NULL;
@@ -183,6 +188,8 @@
ClusterBackRefs& operator=(const ClusterBackRefs& src);
static int Compare(const ClusterBackRefs& a, const ClusterBackRefs& b);
+ void SortRefs() { refs.Sort(JSObjectsCluster::Compare); }
+ static void SortRefsIterator(ClusterBackRefs* ref) { ref->SortRefs(); }
JSObjectsCluster cluster;
ZoneList<JSObjectsCluster> refs;
@@ -219,6 +226,7 @@
EqualityTree eq_tree_;
ClusterBackRefs* current_pair_;
JSObjectsRetainerTree* current_set_;
+ const JSObjectsCluster* self_;
};
@@ -242,20 +250,9 @@
void StoreReference(const JSObjectsCluster& cluster, HeapObject* ref);
private:
- // Limit on the number of retainers to be printed per cluster.
- static const int kMaxRetainersToPrint = 50;
ZoneScope zscope_;
JSObjectsRetainerTree retainers_tree_;
ClustersCoarser coarser_;
- // TODO(mnaganov): Use some helper class to hold these state variables.
- JSObjectsClusterTree* coarse_cluster_tree_;
- Printer* current_printer_;
- StringStream* current_stream_;
- public:
- // Used by JSObjectsRetainerTree::ForEach.
- void Call(const JSObjectsCluster& cluster, JSObjectsClusterTree* tree);
- void Call(const JSObjectsCluster& cluster,
- const NumberAndSizeInfo& number_and_size);
};
« no previous file with comments | « no previous file | src/heap-profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698