13 intptr_t holes_size = 0;
14 OldSpaces spaces(heap);
16 holes_size +=
space->Waste() +
space->Available();
23 intptr_t allocation_in_bytes) {
30 const char* collector_reason)
33 collector_reason(collector_reason),
42 cumulative_incremental_marking_steps(0),
43 incremental_marking_steps(0),
44 cumulative_incremental_marking_bytes(0),
45 incremental_marking_bytes(0),
46 cumulative_incremental_marking_duration(0.0),
47 incremental_marking_duration(0.0),
48 cumulative_pure_incremental_marking_duration(0.0),
49 pure_incremental_marking_duration(0.0),
50 longest_incremental_marking_step(0.0) {
78 return "Unknown Event Type";
99 const char* collector_reason) {
182 if (!FLAG_trace_gc && !FLAG_print_cumulative_gc_stat)
return;
194 if (FLAG_trace_gc_nvp)
205 intptr_t allocation_in_bytes) {
233 if (external_time > 0)
PrintF(
"%d / ", external_time);
236 PrintF(
"%.1f ms", duration);
239 PrintF(
" (+ %.1f ms in %d steps since last GC)",
246 " (+ %.1f ms in %d steps since start of marking, "
247 "biggest step %.1f ms)",
272 PrintF(
"pause=%.1f ", duration);
273 PrintF(
"mutator=%.1f ", spent_in_mutator);
291 PrintF(
"compaction_ptrs=%.1f ",
293 PrintF(
"intracompaction_ptrs=%.1f ",
295 PrintF(
"misc_compaction=%.1f ",
297 PrintF(
"weakcollection_process=%.1f ",
299 PrintF(
"weakcollection_clear=%.1f ",
301 PrintF(
"weakcollection_abort=%.1f ",
309 intptr_t allocated_since_last_gc =
341 if (events.
empty())
return 0.0;
344 EventBuffer::const_iterator iter = events.
begin();
345 while (iter != events.
end()) {
346 mean += iter->end_time - iter->start_time;
350 return mean / events.
size();
355 if (events.
empty())
return 0.0;
357 double maximum = 0.0f;
358 EventBuffer::const_iterator iter = events.
begin();
359 while (iter != events.
end()) {
360 maximum =
Max(iter->end_time - iter->start_time, maximum);
379 double durations = 0.0;
382 steps += iter->incremental_marking_steps;
383 durations += iter->incremental_marking_duration;
387 if (steps == 0)
return 0.0;
389 return durations / steps;
398 double max_duration = 0.0;
401 max_duration =
Max(iter->longest_incremental_marking_step, max_duration);
418 double durations = 0.0;
421 bytes += iter->incremental_marking_bytes;
422 durations += iter->pure_incremental_marking_duration;
426 if (durations == 0.0)
return 0;
428 return static_cast<intptr_t
>(bytes / durations);
434 double durations = 0.0;
437 bytes += iter->new_space_object_size;
438 durations += iter->end_time - iter->start_time;
442 if (durations == 0.0)
return 0;
444 return static_cast<intptr_t
>(bytes / durations);
450 double durations = 0.0;
453 bytes += iter->start_object_size;
454 durations += iter->end_time - iter->start_time +
455 iter->pure_incremental_marking_duration;
459 if (durations == 0.0)
return 0;
461 return static_cast<intptr_t
>(bytes / durations);
467 double durations = 0.0;
470 bytes += iter->allocation_in_bytes_;
471 durations += iter->duration_;
475 if (durations == 0.0)
return 0;
477 return static_cast<intptr_t
>(bytes / durations);
static double TimeCurrentMillis()
intptr_t allocation_in_bytes_
double cumulative_pure_incremental_marking_duration
int incremental_marking_steps
double cumulative_incremental_marking_duration
const char * collector_reason
double longest_incremental_marking_step
int cumulative_incremental_marking_steps
intptr_t start_holes_size
double pure_incremental_marking_duration
intptr_t start_object_size
const char * TypeName(bool short_name) const
intptr_t incremental_marking_bytes
double incremental_marking_duration
intptr_t new_space_object_size
intptr_t cumulative_incremental_marking_bytes
double scopes[Scope::NUMBER_OF_SCOPES]
intptr_t start_memory_size
@ MC_UPDATE_POINTERS_TO_EVACUATED
@ MC_UPDATE_OLD_TO_NEW_POINTERS
@ MC_UPDATE_NEW_TO_NEW_POINTERS
@ MC_UPDATE_MISC_POINTERS
@ MC_WEAKCOLLECTION_PROCESS
@ MC_UPDATE_ROOT_TO_NEW_POINTERS
@ MC_WEAKCOLLECTION_ABORT
@ MC_WEAKCOLLECTION_CLEAR
@ MC_UPDATE_POINTERS_BETWEEN_EVACUATED
double longest_incremental_marking_step_
intptr_t MarkCompactSpeedInBytesPerMillisecond() const
int cumulative_incremental_marking_steps_
double MaxDuration(const EventBuffer &events) const
void AddIncrementalMarkingStep(double duration, intptr_t bytes)
intptr_t IncrementalMarkingSpeedInBytesPerMillisecond() const
double MeanDuration(const EventBuffer &events) const
double cumulative_pure_incremental_marking_duration_
double MaxIncrementalMarkingDuration() const
intptr_t ScavengeSpeedInBytesPerMillisecond() const
double cumulative_incremental_marking_duration_
double MeanIncrementalMarkingDuration() const
Event previous_mark_compactor_event_
void Start(GarbageCollector collector, const char *gc_reason, const char *collector_reason)
double cumulative_sweeping_duration_
intptr_t NewSpaceAllocationThroughputInBytesPerMillisecond() const
void AddNewSpaceAllocationTime(double duration, intptr_t allocation_in_bytes)
intptr_t new_space_top_after_gc_
AllocationEventBuffer allocation_events_
EventBuffer mark_compactor_events_
intptr_t cumulative_incremental_marking_bytes_
EventBuffer scavenger_events_
double cumulative_marking_duration_
int nodes_copied_in_new_space_
void UpdateCumulativeGCStatistics(double duration, double spent_in_mutator, double marking_time)
int nodes_died_in_new_space_
void PrintShortHeapStatistics()
double semi_space_copied_rate_
intptr_t promoted_objects_size_
intptr_t semi_space_copied_object_size_
double time_millis_since_init()
MemoryAllocator * memory_allocator()
void push_front(const T &element)
const_iterator begin() const
const_iterator end() const
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS 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 enable alignment of csp to bytes on platforms which prefer the register to always be expose gc extension under the specified name show built in functions in stack traces use random jit cookie to mask large constants minimum length for automatic enable preparsing CPU profiler sampling interval in microseconds trace out of bounds accesses to external arrays default size of stack region v8 is allowed to maximum length of function source code printed in a stack trace min size of a semi space(in MBytes)
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS 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 enable alignment of csp to bytes on platforms which prefer the register to always be NULL
void PrintPID(const char *format,...)
static intptr_t CountTotalHolesSize(Heap *heap)
static LifetimePosition Max(LifetimePosition a, LifetimePosition b)
void PrintF(const char *format,...)
Debugger support for the V8 JavaScript engine.