< prev index next >
src/share/vm/gc/cms/concurrentMarkSweepGeneration.cpp
Print this page
rev 8456 : GenerationRemovalPart6
rev 8457 : [mq]: increment
@@ -682,11 +682,11 @@
void ConcurrentMarkSweepGeneration::printOccupancy(const char *s) {
GenCollectedHeap* gch = GenCollectedHeap::heap();
if (PrintGCDetails) {
// I didn't want to change the logging when removing the level concept,
// but I guess this logging could say "old" or something instead of "1".
- assert(this == gch->old_gen(),
+ assert(gch->is_old_gen(this),
"The CMS generation should be the old generation");
uint level = 1;
if (Verbose) {
gclog_or_tty->print("[%u %s-%s: "SIZE_FORMAT"("SIZE_FORMAT")]",
level, short_name(), s, used(), capacity());
@@ -799,21 +799,27 @@
size_t expand_bytes = MAX2(desired_capacity - capacity(), MinHeapDeltaBytes);
if (PrintGCDetails && Verbose) {
size_t desired_capacity = (size_t)(used() / ((double) 1 - desired_free_percentage));
gclog_or_tty->print_cr("\nFrom compute_new_size: ");
gclog_or_tty->print_cr(" Free fraction %f", free_percentage);
- gclog_or_tty->print_cr(" Desired free fraction %f", desired_free_percentage);
- gclog_or_tty->print_cr(" Maximum free fraction %f", maximum_free_percentage);
- gclog_or_tty->print_cr(" Capacity "SIZE_FORMAT, capacity() / 1000);
- gclog_or_tty->print_cr(" Desired capacity "SIZE_FORMAT, desired_capacity / 1000);
+ gclog_or_tty->print_cr(" Desired free fraction %f",
+ desired_free_percentage);
+ gclog_or_tty->print_cr(" Maximum free fraction %f",
+ maximum_free_percentage);
+ gclog_or_tty->print_cr(" Capacity "SIZE_FORMAT, capacity()/1000);
+ gclog_or_tty->print_cr(" Desired capacity "SIZE_FORMAT,
+ desired_capacity/1000);
GenCollectedHeap* gch = GenCollectedHeap::heap();
- assert(this == gch->_old_gen, "The CMS generation should always be the old generation");
- size_t young_size = gch->_young_gen->capacity();
- gclog_or_tty->print_cr(" Young gen size "SIZE_FORMAT, young_size / 1000);
- gclog_or_tty->print_cr(" unsafe_max_alloc_nogc "SIZE_FORMAT, unsafe_max_alloc_nogc() / 1000);
- gclog_or_tty->print_cr(" contiguous available "SIZE_FORMAT, contiguous_available() / 1000);
- gclog_or_tty->print_cr(" Expand by "SIZE_FORMAT" (bytes)", expand_bytes);
+ assert(gch->is_old_gen(this), "The CMS generation should always be the old generation");
+ size_t young_size = gch->young_gen()->capacity();
+ gclog_or_tty->print_cr(" Young gen size " SIZE_FORMAT, young_size / 1000);
+ gclog_or_tty->print_cr(" unsafe_max_alloc_nogc "SIZE_FORMAT,
+ unsafe_max_alloc_nogc()/1000);
+ gclog_or_tty->print_cr(" contiguous available "SIZE_FORMAT,
+ contiguous_available()/1000);
+ gclog_or_tty->print_cr(" Expand by "SIZE_FORMAT" (bytes)",
+ expand_bytes);
}
// safe if expansion fails
expand_for_gc_cause(expand_bytes, 0, CMSExpansionCause::_satisfy_free_ratio);
if (PrintGCDetails && Verbose) {
gclog_or_tty->print_cr(" Expanded free fraction %f",
@@ -5640,11 +5646,11 @@
void ConcurrentMarkSweepGeneration::update_gc_stats(Generation* current_generation,
bool full) {
// If the young generation has been collected, gather any statistics
// that are of interest at this point.
- bool current_is_young = (current_generation == GenCollectedHeap::heap()->young_gen());
+ bool current_is_young = GenCollectedHeap::heap()->is_young_gen(current_generation);
if (!full && current_is_young) {
// Gather statistics on the young generation collection.
collector()->stats().record_gc0_end(used());
}
}
< prev index next >