本文整理汇总了C++中ParallelScavengeHeap::print_heap_after_gc方法的典型用法代码示例。如果您正苦于以下问题:C++ ParallelScavengeHeap::print_heap_after_gc方法的具体用法?C++ ParallelScavengeHeap::print_heap_after_gc怎么用?C++ ParallelScavengeHeap::print_heap_after_gc使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ParallelScavengeHeap
的用法示例。
在下文中一共展示了ParallelScavengeHeap::print_heap_after_gc方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: invoke_no_policy
//.........这里部分代码省略.........
"Sizes of space in young gen are out-of-bounds");
size_t max_eden_size = young_gen->max_size() -
young_gen->from_space()->capacity_in_bytes() -
young_gen->to_space()->capacity_in_bytes();
size_policy->compute_generation_free_space(young_gen->used_in_bytes(),
young_gen->eden_space()->used_in_bytes(),
old_gen->used_in_bytes(),
perm_gen->used_in_bytes(),
young_gen->eden_space()->capacity_in_bytes(),
old_gen->max_gen_size(),
max_eden_size,
true /* full gc*/,
gc_cause,
heap->collector_policy());
heap->resize_old_gen(size_policy->calculated_old_free_size_in_bytes());
// Don't resize the young generation at an major collection. A
// desired young generation size may have been calculated but
// resizing the young generation complicates the code because the
// resizing of the old generation may have moved the boundary
// between the young generation and the old generation. Let the
// young generation resizing happen at the minor collections.
}
if (PrintAdaptiveSizePolicy) {
gclog_or_tty->print_cr("AdaptiveSizeStop: collection: %d ",
heap->total_collections());
}
}
if (UsePerfData) {
heap->gc_policy_counters()->update_counters();
heap->gc_policy_counters()->update_old_capacity(
old_gen->capacity_in_bytes());
heap->gc_policy_counters()->update_young_capacity(
young_gen->capacity_in_bytes());
}
heap->resize_all_tlabs();
// We collected the perm gen, so we'll resize it here.
perm_gen->compute_new_size(perm_gen_prev_used);
if (TraceGen1Time) accumulated_time()->stop();
if (PrintGC) {
if (PrintGCDetails) {
// Don't print a GC timestamp here. This is after the GC so
// would be confusing.
young_gen->print_used_change(young_gen_prev_used);
old_gen->print_used_change(old_gen_prev_used);
}
heap->print_heap_change(prev_used);
// Do perm gen after heap becase prev_used does
// not include the perm gen (done this way in the other
// collectors).
if (PrintGCDetails) {
perm_gen->print_used_change(perm_gen_prev_used);
}
}
// Track memory usage and detect low memory
MemoryService::track_memory_usage();
heap->update_counters();
}
if (VerifyAfterGC && heap->total_collections() >= VerifyGCStartAt) {
HandleMark hm; // Discard invalid handles created during verification
Universe::verify(" VerifyAfterGC:");
}
// Re-verify object start arrays
if (VerifyObjectStartArray &&
VerifyAfterGC) {
old_gen->verify_object_start_array();
perm_gen->verify_object_start_array();
}
if (ZapUnusedHeapArea) {
old_gen->object_space()->check_mangled_unused_area_complete();
perm_gen->object_space()->check_mangled_unused_area_complete();
}
NOT_PRODUCT(ref_processor()->verify_no_references_recorded());
heap->print_heap_after_gc();
heap->trace_heap_after_gc(_gc_tracer);
heap->post_full_gc_dump(_gc_timer);
#ifdef TRACESPINNING
ParallelTaskTerminator::print_termination_counts();
#endif
_gc_timer->register_gc_end();
_gc_tracer->report_gc_end(_gc_timer->gc_end(), _gc_timer->time_partitions());
return true;
}
示例2: invoke_no_policy
//.........这里部分代码省略.........
young_gen->from_space()->capacity_in_bytes() -
young_gen->to_space()->capacity_in_bytes();
// Used for diagnostics
size_policy->clear_generation_free_space_flags();
size_policy->compute_generations_free_space(young_live,
eden_live,
old_live,
cur_eden,
max_old_gen_size,
max_eden_size,
true /* full gc*/);
size_policy->check_gc_overhead_limit(young_live,
eden_live,
max_old_gen_size,
max_eden_size,
true /* full gc*/,
gc_cause,
heap->collector_policy());
size_policy->decay_supplemental_growth(true /* full gc*/);
heap->resize_old_gen(size_policy->calculated_old_free_size_in_bytes());
heap->resize_young_gen(size_policy->calculated_eden_size_in_bytes(),
size_policy->calculated_survivor_size_in_bytes());
}
if (PrintAdaptiveSizePolicy) {
gclog_or_tty->print_cr("AdaptiveSizeStop: collection: %d ",
heap->total_collections());
}
}
if (UsePerfData) {
heap->gc_policy_counters()->update_counters();
heap->gc_policy_counters()->update_old_capacity(
old_gen->capacity_in_bytes());
heap->gc_policy_counters()->update_young_capacity(
young_gen->capacity_in_bytes());
}
heap->resize_all_tlabs();
// We collected the heap, recalculate the metaspace capacity
MetaspaceGC::compute_new_size();
if (TraceOldGenTime) accumulated_time()->stop();
if (PrintGC) {
if (PrintGCDetails) {
// Don't print a GC timestamp here. This is after the GC so
// would be confusing.
young_gen->print_used_change(young_gen_prev_used);
old_gen->print_used_change(old_gen_prev_used);
}
heap->print_heap_change(prev_used);
if (PrintGCDetails) {
MetaspaceAux::print_metaspace_change(metadata_prev_used);
}
}
// Track memory usage and detect low memory
MemoryService::track_memory_usage();
heap->update_counters();
}
if (VerifyAfterGC && heap->total_collections() >= VerifyGCStartAt) {
HandleMark hm; // Discard invalid handles created during verification
Universe::verify(" VerifyAfterGC:");
}
// Re-verify object start arrays
if (VerifyObjectStartArray &&
VerifyAfterGC) {
old_gen->verify_object_start_array();
}
if (ZapUnusedHeapArea) {
old_gen->object_space()->check_mangled_unused_area_complete();
}
NOT_PRODUCT(ref_processor()->verify_no_references_recorded());
heap->print_heap_after_gc();
heap->trace_heap_after_gc(_gc_tracer);
heap->post_full_gc_dump(_gc_timer);
#ifdef TRACESPINNING
ParallelTaskTerminator::print_termination_counts();
#endif
_gc_timer->register_gc_end();
_gc_tracer->report_gc_end(_gc_timer->gc_end(), _gc_timer->time_partitions());
return true;
}
示例3: invoke_no_policy
//.........这里部分代码省略.........
heap->resize_young_gen(size_policy->calculated_eden_size_in_bytes(),
size_policy->calculated_survivor_size_in_bytes());
if (PrintAdaptiveSizePolicy) {
gclog_or_tty->print_cr("AdaptiveSizeStop: collection: %d ",
heap->total_collections());
}
}
// Update the structure of the eden. With NUMA-eden CPU hotplugging or offlining can
// cause the change of the heap layout. Make sure eden is reshaped if that's the case.
// Also update() will case adaptive NUMA chunk resizing.
assert(young_gen->eden_space()->is_empty(), "eden space should be empty now");
young_gen->eden_space()->update();
heap->gc_policy_counters()->update_counters();
heap->resize_all_tlabs();
assert(young_gen->to_space()->is_empty(), "to space should be empty now");
}
COMPILER2_PRESENT(DerivedPointerTable::update_pointers());
NOT_PRODUCT(reference_processor()->verify_no_references_recorded());
{
GCTraceTime tm("Prune Scavenge Root Methods", false, false, &_gc_timer);
CodeCache::prune_scavenge_root_nmethods();
}
// Re-verify object start arrays
if (VerifyObjectStartArray &&
VerifyAfterGC) {
old_gen->verify_object_start_array();
}
// Verify all old -> young cards are now precise
if (VerifyRememberedSets) {
// Precise verification will give false positives. Until this is fixed,
// use imprecise verification.
// CardTableExtension::verify_all_young_refs_precise();
CardTableExtension::verify_all_young_refs_imprecise();
}
if (TraceGen0Time) accumulated_time()->stop();
if (PrintGC) {
if (PrintGCDetails) {
// Don't print a GC timestamp here. This is after the GC so
// would be confusing.
young_gen->print_used_change(young_gen_used_before);
}
heap->print_heap_change(prev_used);
}
// Track memory usage and detect low memory
MemoryService::track_memory_usage();
heap->update_counters();
gc_task_manager()->release_idle_workers();
}
if (VerifyAfterGC && heap->total_collections() >= VerifyGCStartAt) {
HandleMark hm; // Discard invalid handles created during verification
Universe::verify(" VerifyAfterGC:");
}
heap->print_heap_after_gc();
heap->trace_heap_after_gc(&_gc_tracer);
_gc_tracer.report_tenuring_threshold(tenuring_threshold());
if (ZapUnusedHeapArea) {
young_gen->eden_space()->check_mangled_unused_area_complete();
young_gen->from_space()->check_mangled_unused_area_complete();
young_gen->to_space()->check_mangled_unused_area_complete();
}
scavenge_exit.update();
if (PrintGCTaskTimeStamps) {
tty->print_cr("VM-Thread " INT64_FORMAT " " INT64_FORMAT " " INT64_FORMAT,
scavenge_entry.ticks(), scavenge_midpoint.ticks(),
scavenge_exit.ticks());
gc_task_manager()->print_task_time_stamps();
}
#ifdef TRACESPINNING
ParallelTaskTerminator::print_termination_counts();
#endif
_gc_timer.register_gc_end();
_gc_tracer.report_gc_end(_gc_timer.gc_end(), _gc_timer.time_partitions());
return !promotion_failure_occurred;
}