52 Isolate* isolate =
reinterpret_cast<Isolate*
>(args.
GetIsolate());
53 Heap* heap = isolate->heap();
56 if (args[0]->IsBoolean() && args[0]->ToBoolean()->Value()) {
61 Counters* counters = isolate->counters();
64 #define ADD_COUNTER(name, caption) \
65 AddCounter(args.GetIsolate(), result, counters->name(), #name);
70 #define ADD_COUNTER(name) \
71 AddCounter(args.GetIsolate(), result, counters->count_of_##name(), \
73 AddCounter(args.GetIsolate(), result, counters->size_of_##name(), \
78 #define ADD_COUNTER(name) \
79 AddCounter(args.GetIsolate(), result, counters->count_of_CODE_TYPE_##name(), \
80 "count_of_CODE_TYPE_" #name); \
81 AddCounter(args.GetIsolate(), result, counters->size_of_CODE_TYPE_##name(), \
82 "size_of_CODE_TYPE_" #name);
86 #define ADD_COUNTER(name) \
87 AddCounter(args.GetIsolate(), result, \
88 counters->count_of_FIXED_ARRAY_##name(), \
89 "count_of_FIXED_ARRAY_" #name); \
90 AddCounter(args.GetIsolate(), result, \
91 counters->size_of_FIXED_ARRAY_##name(), \
92 "size_of_FIXED_ARRAY_" #name);
98 "total_committed_bytes");
100 "new_space_live_bytes");
102 "new_space_available_bytes");
104 "new_space_commited_bytes");
106 "old_pointer_space_live_bytes");
108 "old_pointer_space_available_bytes");
110 heap->old_pointer_space()->CommittedMemory(),
111 "old_pointer_space_commited_bytes");
113 "old_data_space_live_bytes");
115 "old_data_space_available_bytes");
117 heap->old_data_space()->CommittedMemory(),
118 "old_data_space_commited_bytes");
120 "code_space_live_bytes");
122 "code_space_available_bytes");
124 "code_space_commited_bytes");
126 "cell_space_live_bytes");
128 "cell_space_available_bytes");
130 "cell_space_commited_bytes");
132 "property_cell_space_live_bytes");
134 "property_cell_space_available_bytes");
136 heap->property_cell_space()->CommittedMemory(),
137 "property_cell_space_commited_bytes");
139 "lo_space_live_bytes");
141 "lo_space_available_bytes");
143 "lo_space_commited_bytes");
145 heap->amount_of_external_allocated_memory(),
146 "amount_of_external_allocated_memory");
ReturnValue< T > GetReturnValue() const
Isolate * GetIsolate() const
A light-weight stack-allocated object handle.
static Local< Object > New(Isolate *isolate)
static const int kNoGCFlags
#define STATS_COUNTER_LIST_1(SC)
#define STATS_COUNTER_LIST_2(SC)
static void AddNumber64(v8::Isolate *isolate, v8::Local< v8::Object > object, int64_t value, const char *name)
static void AddNumber(v8::Isolate *isolate, v8::Local< v8::Object > object, intptr_t value, const char *name)
#define INSTANCE_TYPE_LIST(V)
#define CODE_KIND_LIST(V)
#define FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(V)
#define ADD_COUNTER(name, caption)