407 void zero_marked_bytes() {
408 _prev_marked_bytes = _next_marked_bytes = 0;
409 }
410
411 const char* get_type_str() const { return _type.get_str(); }
412 const char* get_short_type_str() const { return _type.get_short_str(); }
413 G1HeapRegionTraceType::Type get_trace_type() { return _type.get_trace_type(); }
414
415 bool is_free() const { return _type.is_free(); }
416
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 bool is_old_or_humongous_or_archive() const { return _type.is_old_or_humongous_or_archive(); }
430
431 // A pinned region contains objects which are not moved by garbage collections.
432 // Humongous regions and archive regions are pinned.
433 bool is_pinned() const { return _type.is_pinned(); }
434
435 // An archive region is a pinned region, also tagged as old, which
436 // should not be marked during mark/sweep. This allows the address
437 // space to be shared by JVM instances.
438 bool is_archive() const { return _type.is_archive(); }
439 bool is_open_archive() const { return _type.is_open_archive(); }
440 bool is_closed_archive() const { return _type.is_closed_archive(); }
441
442 // For a humongous region, region in which it starts.
443 HeapRegion* humongous_start_region() const {
444 return _humongous_start_region;
445 }
446
596 void uninstall_surv_rate_group() {
597 if (_surv_rate_group != NULL) {
598 assert( _age_index > -1, "pre-condition" );
599 assert( is_young(), "pre-condition" );
600
601 _surv_rate_group = NULL;
602 _age_index = -1;
603 } else {
604 assert( _age_index == -1, "pre-condition" );
605 }
606 }
607
608 void set_free();
609
610 void set_eden();
611 void set_eden_pre_gc();
612 void set_survivor();
613
614 void move_to_old();
615 void set_old();
616
617 void set_open_archive();
618 void set_closed_archive();
619
620 // Determine if an object has been allocated since the last
621 // mark performed by the collector. This returns true iff the object
622 // is within the unmarked area of the region.
623 bool obj_allocated_since_prev_marking(oop obj) const {
624 return (HeapWord *) obj >= prev_top_at_mark_start();
625 }
626 bool obj_allocated_since_next_marking(oop obj) const {
627 return (HeapWord *) obj >= next_top_at_mark_start();
628 }
629
630 // Returns the "evacuation_failed" property of the region.
631 bool evacuation_failed() { return _evacuation_failed; }
632
633 // Sets the "evacuation_failed" property of the region.
634 void set_evacuation_failed(bool b) {
635 _evacuation_failed = b;
|
407 void zero_marked_bytes() {
408 _prev_marked_bytes = _next_marked_bytes = 0;
409 }
410
411 const char* get_type_str() const { return _type.get_str(); }
412 const char* get_short_type_str() const { return _type.get_short_str(); }
413 G1HeapRegionTraceType::Type get_trace_type() { return _type.get_trace_type(); }
414
415 bool is_free() const { return _type.is_free(); }
416
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_premature_old() const { return _type.is_premature_old(); }
428
429 bool is_old_or_humongous() const { return _type.is_old_or_humongous(); }
430
431 bool is_old_or_humongous_or_archive() const { return _type.is_old_or_humongous_or_archive(); }
432
433 // A pinned region contains objects which are not moved by garbage collections.
434 // Humongous regions and archive regions are pinned.
435 bool is_pinned() const { return _type.is_pinned(); }
436
437 // An archive region is a pinned region, also tagged as old, which
438 // should not be marked during mark/sweep. This allows the address
439 // space to be shared by JVM instances.
440 bool is_archive() const { return _type.is_archive(); }
441 bool is_open_archive() const { return _type.is_open_archive(); }
442 bool is_closed_archive() const { return _type.is_closed_archive(); }
443
444 // For a humongous region, region in which it starts.
445 HeapRegion* humongous_start_region() const {
446 return _humongous_start_region;
447 }
448
598 void uninstall_surv_rate_group() {
599 if (_surv_rate_group != NULL) {
600 assert( _age_index > -1, "pre-condition" );
601 assert( is_young(), "pre-condition" );
602
603 _surv_rate_group = NULL;
604 _age_index = -1;
605 } else {
606 assert( _age_index == -1, "pre-condition" );
607 }
608 }
609
610 void set_free();
611
612 void set_eden();
613 void set_eden_pre_gc();
614 void set_survivor();
615
616 void move_to_old();
617 void set_old();
618 void set_premature_old();
619
620 void set_open_archive();
621 void set_closed_archive();
622
623 // Determine if an object has been allocated since the last
624 // mark performed by the collector. This returns true iff the object
625 // is within the unmarked area of the region.
626 bool obj_allocated_since_prev_marking(oop obj) const {
627 return (HeapWord *) obj >= prev_top_at_mark_start();
628 }
629 bool obj_allocated_since_next_marking(oop obj) const {
630 return (HeapWord *) obj >= next_top_at_mark_start();
631 }
632
633 // Returns the "evacuation_failed" property of the region.
634 bool evacuation_failed() { return _evacuation_failed; }
635
636 // Sets the "evacuation_failed" property of the region.
637 void set_evacuation_failed(bool b) {
638 _evacuation_failed = b;
|