417 bool is_young() const { return _type.is_young(); }
418 bool is_eden() const { return _type.is_eden(); }
419 bool is_survivor() const { return _type.is_survivor(); }
420
421 bool is_humongous() const { return _type.is_humongous(); }
422 bool is_starts_humongous() const { return _type.is_starts_humongous(); }
423 bool is_continues_humongous() const { return _type.is_continues_humongous(); }
424
425 bool is_old() const { return _type.is_old(); }
426
427 bool is_old_or_humongous() const { return _type.is_old_or_humongous(); }
428
429 // A pinned region contains objects which are not moved by garbage collections.
430 // Humongous regions and archive regions are pinned.
431 bool is_pinned() const { return _type.is_pinned(); }
432
433 // An archive region is a pinned region, also tagged as old, which
434 // should not be marked during mark/sweep. This allows the address
435 // space to be shared by JVM instances.
436 bool is_archive() const { return _type.is_archive(); }
437
438 // For a humongous region, region in which it starts.
439 HeapRegion* humongous_start_region() const {
440 return _humongous_start_region;
441 }
442
443 // Makes the current region be a "starts humongous" region, i.e.,
444 // the first region in a series of one or more contiguous regions
445 // that will contain a single "humongous" object.
446 //
447 // obj_top : points to the top of the humongous object.
448 // fill_size : size of the filler object at the end of the region series.
449 void set_starts_humongous(HeapWord* obj_top, size_t fill_size);
450
451 // Makes the current region be a "continues humongous'
452 // region. first_hr is the "start humongous" region of the series
453 // which this region will be part of.
454 void set_continues_humongous(HeapRegion* first_hr);
455
456 // Unsets the humongous-related fields on the region.
601 }
602
603 void uninstall_surv_rate_group() {
604 if (_surv_rate_group != NULL) {
605 assert( _age_index > -1, "pre-condition" );
606 assert( is_young(), "pre-condition" );
607
608 _surv_rate_group = NULL;
609 _age_index = -1;
610 } else {
611 assert( _age_index == -1, "pre-condition" );
612 }
613 }
614
615 void set_free();
616
617 void set_eden();
618 void set_eden_pre_gc();
619 void set_survivor();
620
621 void set_old();
622
623 void set_archive();
624
625 // Determine if an object has been allocated since the last
626 // mark performed by the collector. This returns true iff the object
627 // is within the unmarked area of the region.
628 bool obj_allocated_since_prev_marking(oop obj) const {
629 return (HeapWord *) obj >= prev_top_at_mark_start();
630 }
631 bool obj_allocated_since_next_marking(oop obj) const {
632 return (HeapWord *) obj >= next_top_at_mark_start();
633 }
634
635 // Returns the "evacuation_failed" property of the region.
636 bool evacuation_failed() { return _evacuation_failed; }
637
638 // Sets the "evacuation_failed" property of the region.
639 void set_evacuation_failed(bool b) {
640 _evacuation_failed = b;
641
642 if (b) {
643 _next_marked_bytes = 0;
|
417 bool is_young() const { return _type.is_young(); }
418 bool is_eden() const { return _type.is_eden(); }
419 bool is_survivor() const { return _type.is_survivor(); }
420
421 bool is_humongous() const { return _type.is_humongous(); }
422 bool is_starts_humongous() const { return _type.is_starts_humongous(); }
423 bool is_continues_humongous() const { return _type.is_continues_humongous(); }
424
425 bool is_old() const { return _type.is_old(); }
426
427 bool is_old_or_humongous() const { return _type.is_old_or_humongous(); }
428
429 // A pinned region contains objects which are not moved by garbage collections.
430 // Humongous regions and archive regions are pinned.
431 bool is_pinned() const { return _type.is_pinned(); }
432
433 // An archive region is a pinned region, also tagged as old, which
434 // should not be marked during mark/sweep. This allows the address
435 // space to be shared by JVM instances.
436 bool is_archive() const { return _type.is_archive(); }
437 bool is_open_archive() const { return _type.is_open_archive(); }
438 bool is_closed_archive() const { return _type.is_closed_archive(); }
439
440 // For a humongous region, region in which it starts.
441 HeapRegion* humongous_start_region() const {
442 return _humongous_start_region;
443 }
444
445 // Makes the current region be a "starts humongous" region, i.e.,
446 // the first region in a series of one or more contiguous regions
447 // that will contain a single "humongous" object.
448 //
449 // obj_top : points to the top of the humongous object.
450 // fill_size : size of the filler object at the end of the region series.
451 void set_starts_humongous(HeapWord* obj_top, size_t fill_size);
452
453 // Makes the current region be a "continues humongous'
454 // region. first_hr is the "start humongous" region of the series
455 // which this region will be part of.
456 void set_continues_humongous(HeapRegion* first_hr);
457
458 // Unsets the humongous-related fields on the region.
603 }
604
605 void uninstall_surv_rate_group() {
606 if (_surv_rate_group != NULL) {
607 assert( _age_index > -1, "pre-condition" );
608 assert( is_young(), "pre-condition" );
609
610 _surv_rate_group = NULL;
611 _age_index = -1;
612 } else {
613 assert( _age_index == -1, "pre-condition" );
614 }
615 }
616
617 void set_free();
618
619 void set_eden();
620 void set_eden_pre_gc();
621 void set_survivor();
622
623 void move_to_old();
624 void set_old();
625
626 void set_open_archive();
627 void set_closed_archive();
628
629 // Determine if an object has been allocated since the last
630 // mark performed by the collector. This returns true iff the object
631 // is within the unmarked area of the region.
632 bool obj_allocated_since_prev_marking(oop obj) const {
633 return (HeapWord *) obj >= prev_top_at_mark_start();
634 }
635 bool obj_allocated_since_next_marking(oop obj) const {
636 return (HeapWord *) obj >= next_top_at_mark_start();
637 }
638
639 // Returns the "evacuation_failed" property of the region.
640 bool evacuation_failed() { return _evacuation_failed; }
641
642 // Sets the "evacuation_failed" property of the region.
643 void set_evacuation_failed(bool b) {
644 _evacuation_failed = b;
645
646 if (b) {
647 _next_marked_bytes = 0;
|