33 const char*
const StatisticsExtension::kSource =
34 "native function getV8Statistics();";
79 if (args[0]->IsBoolean() && args[0]->ToBoolean()->Value()) {
87 #define ADD_COUNTER(name, caption) \
88 AddCounter(args.GetIsolate(), result, counters->name(), #name);
93 #define ADD_COUNTER(name) \
94 AddCounter(args.GetIsolate(), result, counters->count_of_##name(), \
96 AddCounter(args.GetIsolate(), result, counters->size_of_##name(), \
101 #define ADD_COUNTER(name) \
102 AddCounter(args.GetIsolate(), result, counters->count_of_CODE_TYPE_##name(), \
103 "count_of_CODE_TYPE_" #name); \
104 AddCounter(args.GetIsolate(), result, counters->size_of_CODE_TYPE_##name(), \
105 "size_of_CODE_TYPE_" #name);
109 #define ADD_COUNTER(name) \
110 AddCounter(args.GetIsolate(), result, \
111 counters->count_of_FIXED_ARRAY_##name(), \
112 "count_of_FIXED_ARRAY_" #name); \
113 AddCounter(args.GetIsolate(), result, \
114 counters->size_of_FIXED_ARRAY_##name(), \
115 "size_of_FIXED_ARRAY_" #name);
121 "total_committed_bytes");
123 "new_space_live_bytes");
125 "new_space_available_bytes");
127 "new_space_commited_bytes");
129 "old_pointer_space_live_bytes");
131 "old_pointer_space_available_bytes");
134 "old_pointer_space_commited_bytes");
136 "old_data_space_live_bytes");
138 "old_data_space_available_bytes");
141 "old_data_space_commited_bytes");
143 "code_space_live_bytes");
145 "code_space_available_bytes");
147 "code_space_commited_bytes");
149 "cell_space_live_bytes");
151 "cell_space_available_bytes");
153 "cell_space_commited_bytes");
155 "property_cell_space_live_bytes");
157 "property_cell_space_available_bytes");
160 "property_cell_space_commited_bytes");
162 "lo_space_live_bytes");
164 "lo_space_available_bytes");
166 "lo_space_commited_bytes");
169 "amount_of_external_allocated_memory");
#define INSTANCE_TYPE_LIST(V)
void CollectAllGarbage(int flags, const char *gc_reason=NULL, const GCCallbackFlags gc_callback_flags=kNoGCCallbackFlags)
V8_INLINE Isolate * GetIsolate() const
V8_INLINE ReturnValue< T > GetReturnValue() const
V8_INLINE int Length() const
#define ASSERT(condition)
#define STATS_COUNTER_LIST_2(SC)
intptr_t CommittedMemory()
intptr_t CommittedMemory()
virtual v8::Handle< v8::FunctionTemplate > GetNativeFunctionTemplate(v8::Isolate *isolate, v8::Handle< v8::String > name)
static const int kNoGCFlags
PropertyCellSpace * property_cell_space()
MemoryAllocator * memory_allocator()
static Local< FunctionTemplate > New(Isolate *isolate, FunctionCallback callback=0, Handle< Value > data=Handle< Value >(), Handle< Signature > signature=Handle< Signature >(), int length=0)
OldSpace * old_pointer_space()
static Local< Number > New(Isolate *isolate, double value)
int * GetInternalPointer()
LargeObjectSpace * lo_space()
static Local< Object > New(Isolate *isolate)
#define FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(V)
#define CODE_KIND_LIST(V)
static void GetCounters(const v8::FunctionCallbackInfo< v8::Value > &args)
intptr_t CommittedMemory()
int64_t amount_of_external_allocated_memory()
#define ADD_COUNTER(name, caption)
enable upcoming ES6 features enable harmony block scoping enable harmony enable harmony proxies enable harmony generators enable harmony numeric enable harmony string enable harmony math functions harmony_scoping harmony_symbols harmony_collections harmony_iteration harmony_strings harmony_scoping harmony_maths tracks arrays with only smi values Optimize object Array DOM strings and string pretenure call new trace pretenuring decisions of HAllocate instructions track fields with only smi values track fields with heap values track_fields track_fields Enables optimizations which favor memory size over execution speed use string slices optimization filter maximum number of GVN fix point iterations use function inlining use allocation folding eliminate write barriers targeting allocations in optimized code maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining crankshaft harvests type feedback from stub cache trace check elimination phase hydrogen tracing filter trace hydrogen to given file name trace inlining decisions trace store elimination trace all use positions trace global value numbering trace hydrogen escape analysis trace the tracking of allocation sites trace map generalization environment for every instruction deoptimize every n garbage collections put a break point before deoptimizing deoptimize uncommon cases use on stack replacement trace array bounds check elimination perform array index dehoisting use load elimination use store elimination use constant folding eliminate unreachable code number of stress runs when picking a function to watch for shared function not JSFunction itself flushes the cache of optimized code for closures on every GC functions with arguments object maximum number of escape analysis fix point iterations allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms concurrent on stack replacement do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes number of stack frames inspected by the profiler percentage of ICs that must have type info to allow optimization extra verbose compilation tracing generate extra emit comments in code disassembly enable use of SSE3 instructions if available enable use of CMOV instruction if available enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long expose natives in global object expose freeBuffer extension expose gc extension under the specified name expose externalize string extension number of stack frames to capture disable builtin natives files print name of functions for which code is generated use random jit cookie to mask large constants trace lazy optimization use adaptive optimizations always try to OSR functions trace optimize function deoptimization minimum length for automatic enable preparsing maximum number of optimization attempts before giving up cache prototype transitions trace debugging JSON request response trace out of bounds accesses to external arrays trace_js_array_abuse automatically set the debug break flag when debugger commands are in the queue abort by crashing maximum length of function source code printed in a stack trace max size of the new max size of the old max size of executable always perform global GCs print one trace line following each garbage collection do not print trace line after scavenger collection print statistics of the maximum memory committed for the heap in name
#define STATS_COUNTER_LIST_1(SC)
OldSpace * old_data_space()
static Local< String > NewFromUtf8(Isolate *isolate, const char *data, NewStringType type=kNormalString, int length=-1)