Mercurial > hg > graal-jvmci-8
comparison src/share/vm/gc_implementation/parallelScavenge/psScavenge.cpp @ 356:1ee8caae33af
Merge
author | tonyp |
---|---|
date | Thu, 21 Aug 2008 23:36:31 -0400 |
parents | 850fdf70db2b |
children | c96030fff130 |
comparison
equal
deleted
inserted
replaced
355:0edda524b58c | 356:1ee8caae33af |
---|---|
1 /* | 1 /* |
2 * Copyright 2002-2007 Sun Microsystems, Inc. All Rights Reserved. | 2 * Copyright 2002-2008 Sun Microsystems, Inc. All Rights Reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | 4 * |
5 * This code is free software; you can redistribute it and/or modify it | 5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as | 6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
263 UseAdaptiveSizePolicyWithSystemGC) { | 263 UseAdaptiveSizePolicyWithSystemGC) { |
264 // Gather the feedback data for eden occupancy. | 264 // Gather the feedback data for eden occupancy. |
265 young_gen->eden_space()->accumulate_statistics(); | 265 young_gen->eden_space()->accumulate_statistics(); |
266 } | 266 } |
267 | 267 |
268 if (ZapUnusedHeapArea) { | |
269 // Save information needed to minimize mangling | |
270 heap->record_gen_tops_before_GC(); | |
271 } | |
272 | |
268 if (PrintHeapAtGC) { | 273 if (PrintHeapAtGC) { |
269 Universe::print_heap_before_gc(); | 274 Universe::print_heap_before_gc(); |
270 } | 275 } |
271 | 276 |
272 assert(!NeverTenure || _tenuring_threshold == markOopDesc::max_age + 1, "Sanity"); | 277 assert(!NeverTenure || _tenuring_threshold == markOopDesc::max_age + 1, "Sanity"); |
313 } | 318 } |
314 | 319 |
315 if (!ScavengeWithObjectsInToSpace) { | 320 if (!ScavengeWithObjectsInToSpace) { |
316 assert(young_gen->to_space()->is_empty(), | 321 assert(young_gen->to_space()->is_empty(), |
317 "Attempt to scavenge with live objects in to_space"); | 322 "Attempt to scavenge with live objects in to_space"); |
318 young_gen->to_space()->clear(); | 323 young_gen->to_space()->clear(SpaceDecorator::Mangle); |
319 } else if (ZapUnusedHeapArea) { | 324 } else if (ZapUnusedHeapArea) { |
320 young_gen->to_space()->mangle_unused_area(); | 325 young_gen->to_space()->mangle_unused_area(); |
321 } | 326 } |
322 save_to_space_top_before_gc(); | 327 save_to_space_top_before_gc(); |
323 | 328 |
435 // implicitly saying it's mutator time). | 440 // implicitly saying it's mutator time). |
436 size_policy->minor_collection_end(gc_cause); | 441 size_policy->minor_collection_end(gc_cause); |
437 | 442 |
438 if (!promotion_failure_occurred) { | 443 if (!promotion_failure_occurred) { |
439 // Swap the survivor spaces. | 444 // Swap the survivor spaces. |
440 young_gen->eden_space()->clear(); | 445 |
441 young_gen->from_space()->clear(); | 446 |
447 young_gen->eden_space()->clear(SpaceDecorator::Mangle); | |
448 young_gen->from_space()->clear(SpaceDecorator::Mangle); | |
442 young_gen->swap_spaces(); | 449 young_gen->swap_spaces(); |
443 | 450 |
444 size_t survived = young_gen->from_space()->used_in_bytes(); | 451 size_t survived = young_gen->from_space()->used_in_bytes(); |
445 size_t promoted = old_gen->used_in_bytes() - old_gen_used_before; | 452 size_t promoted = old_gen->used_in_bytes() - old_gen_used_before; |
446 size_policy->update_averages(_survivor_overflow, survived, promoted); | 453 size_policy->update_averages(_survivor_overflow, survived, promoted); |
598 | 605 |
599 if (PrintHeapAtGC) { | 606 if (PrintHeapAtGC) { |
600 Universe::print_heap_after_gc(); | 607 Universe::print_heap_after_gc(); |
601 } | 608 } |
602 | 609 |
610 if (ZapUnusedHeapArea) { | |
611 young_gen->eden_space()->check_mangled_unused_area_complete(); | |
612 young_gen->from_space()->check_mangled_unused_area_complete(); | |
613 young_gen->to_space()->check_mangled_unused_area_complete(); | |
614 } | |
615 | |
603 scavenge_exit.update(); | 616 scavenge_exit.update(); |
604 | 617 |
605 if (PrintGCTaskTimeStamps) { | 618 if (PrintGCTaskTimeStamps) { |
606 tty->print_cr("VM-Thread " INT64_FORMAT " " INT64_FORMAT " " INT64_FORMAT, | 619 tty->print_cr("VM-Thread " INT64_FORMAT " " INT64_FORMAT " " INT64_FORMAT, |
607 scavenge_entry.ticks(), scavenge_midpoint.ticks(), | 620 scavenge_entry.ticks(), scavenge_midpoint.ticks(), |