mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 19:44:41 +02:00
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
Compressed oops in instances, arrays, and headers. Code contributors are coleenp, phh, never, swamyv Reviewed-by: jmasa, kamg, acorn, tbell, kvn, rasbold
This commit is contained in:
parent
680ecf1611
commit
4a831d45f0
273 changed files with 6585 additions and 2993 deletions
|
@ -28,17 +28,16 @@
|
|||
// Checks an individual oop for missing precise marks. Mark
|
||||
// may be either dirty or newgen.
|
||||
class CheckForUnmarkedOops : public OopClosure {
|
||||
PSYoungGen* _young_gen;
|
||||
private:
|
||||
PSYoungGen* _young_gen;
|
||||
CardTableExtension* _card_table;
|
||||
HeapWord* _unmarked_addr;
|
||||
jbyte* _unmarked_card;
|
||||
HeapWord* _unmarked_addr;
|
||||
jbyte* _unmarked_card;
|
||||
|
||||
public:
|
||||
CheckForUnmarkedOops( PSYoungGen* young_gen, CardTableExtension* card_table ) :
|
||||
_young_gen(young_gen), _card_table(card_table), _unmarked_addr(NULL) { }
|
||||
|
||||
virtual void do_oop(oop* p) {
|
||||
if (_young_gen->is_in_reserved(*p) &&
|
||||
protected:
|
||||
template <class T> void do_oop_work(T* p) {
|
||||
oop obj = oopDesc::load_decode_heap_oop_not_null(p);
|
||||
if (_young_gen->is_in_reserved(obj) &&
|
||||
!_card_table->addr_is_marked_imprecise(p)) {
|
||||
// Don't overwrite the first missing card mark
|
||||
if (_unmarked_addr == NULL) {
|
||||
|
@ -48,6 +47,13 @@ class CheckForUnmarkedOops : public OopClosure {
|
|||
}
|
||||
}
|
||||
|
||||
public:
|
||||
CheckForUnmarkedOops(PSYoungGen* young_gen, CardTableExtension* card_table) :
|
||||
_young_gen(young_gen), _card_table(card_table), _unmarked_addr(NULL) { }
|
||||
|
||||
virtual void do_oop(oop* p) { CheckForUnmarkedOops::do_oop_work(p); }
|
||||
virtual void do_oop(narrowOop* p) { CheckForUnmarkedOops::do_oop_work(p); }
|
||||
|
||||
bool has_unmarked_oop() {
|
||||
return _unmarked_addr != NULL;
|
||||
}
|
||||
|
@ -56,7 +62,8 @@ class CheckForUnmarkedOops : public OopClosure {
|
|||
// Checks all objects for the existance of some type of mark,
|
||||
// precise or imprecise, dirty or newgen.
|
||||
class CheckForUnmarkedObjects : public ObjectClosure {
|
||||
PSYoungGen* _young_gen;
|
||||
private:
|
||||
PSYoungGen* _young_gen;
|
||||
CardTableExtension* _card_table;
|
||||
|
||||
public:
|
||||
|
@ -75,7 +82,7 @@ class CheckForUnmarkedObjects : public ObjectClosure {
|
|||
// we test for missing precise marks first. If any are found, we don't
|
||||
// fail unless the object head is also unmarked.
|
||||
virtual void do_object(oop obj) {
|
||||
CheckForUnmarkedOops object_check( _young_gen, _card_table );
|
||||
CheckForUnmarkedOops object_check(_young_gen, _card_table);
|
||||
obj->oop_iterate(&object_check);
|
||||
if (object_check.has_unmarked_oop()) {
|
||||
assert(_card_table->addr_is_marked_imprecise(obj), "Found unmarked young_gen object");
|
||||
|
@ -85,19 +92,25 @@ class CheckForUnmarkedObjects : public ObjectClosure {
|
|||
|
||||
// Checks for precise marking of oops as newgen.
|
||||
class CheckForPreciseMarks : public OopClosure {
|
||||
PSYoungGen* _young_gen;
|
||||
private:
|
||||
PSYoungGen* _young_gen;
|
||||
CardTableExtension* _card_table;
|
||||
|
||||
protected:
|
||||
template <class T> void do_oop_work(T* p) {
|
||||
oop obj = oopDesc::load_decode_heap_oop_not_null(p);
|
||||
if (_young_gen->is_in_reserved(obj)) {
|
||||
assert(_card_table->addr_is_marked_precise(p), "Found unmarked precise oop");
|
||||
_card_table->set_card_newgen(p);
|
||||
}
|
||||
}
|
||||
|
||||
public:
|
||||
CheckForPreciseMarks( PSYoungGen* young_gen, CardTableExtension* card_table ) :
|
||||
_young_gen(young_gen), _card_table(card_table) { }
|
||||
|
||||
virtual void do_oop(oop* p) {
|
||||
if (_young_gen->is_in_reserved(*p)) {
|
||||
assert(_card_table->addr_is_marked_precise(p), "Found unmarked precise oop");
|
||||
_card_table->set_card_newgen(p);
|
||||
}
|
||||
}
|
||||
virtual void do_oop(oop* p) { CheckForPreciseMarks::do_oop_work(p); }
|
||||
virtual void do_oop(narrowOop* p) { CheckForPreciseMarks::do_oop_work(p); }
|
||||
};
|
||||
|
||||
// We get passed the space_top value to prevent us from traversing into
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue