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

Unified Diff: src/heap.h

Issue 462019: Added recording of heap and global handle stats in a stack-allocated (Closed)
Patch Set: Created 11 years 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 | « src/global-handles.cc ('k') | src/heap.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap.h
diff --git a/src/heap.h b/src/heap.h
index 80cc885a80c95857498ced94d1ceeba38b20d5cf..8bc55e80315e172de9d65db28e2751d744c883ef 100644
--- a/src/heap.h
+++ b/src/heap.h
@@ -189,6 +189,7 @@ namespace internal {
// Forward declaration of the GCTracer class.
class GCTracer;
+class HeapStats;
// The all static Heap captures the interface to the global object heap.
@@ -865,6 +866,8 @@ class Heap : public AllStatic {
static RootListIndex RootIndexForExternalArrayType(
ExternalArrayType array_type);
+ static void RecordStats(HeapStats* stats);
+
private:
static int reserved_semispace_size_;
static int max_semispace_size_;
@@ -1100,6 +1103,28 @@ class Heap : public AllStatic {
};
+struct HeapStats {
+ int new_space_size;
+ int new_space_capacity;
+ int old_pointer_space_size;
+ int old_pointer_space_capacity;
+ int old_data_space_size;
+ int old_data_space_capacity;
+ int code_space_size;
+ int code_space_capacity;
+ int map_space_size;
+ int map_space_capacity;
+ int cell_space_size;
+ int cell_space_capacity;
+ int lo_space_size;
+ int global_handle_count;
+ int weak_global_handle_count;
+ int pending_global_handle_count;
+ int near_death_global_handle_count;
+ int destroyed_global_handle_count;
+};
+
+
class AlwaysAllocateScope {
public:
AlwaysAllocateScope() {
« no previous file with comments | « src/global-handles.cc ('k') | src/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698