hotspot/src/share/vm/memory/cardTableRS.hpp
Print this page
rev 611 : Merge
*** 1,10 ****
#ifdef USE_PRAGMA_IDENT_HDR
#pragma ident "@(#)cardTableRS.hpp 1.29 07/05/05 17:05:44 JVM"
#endif
/*
! * Copyright 2001-2006 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
--- 1,10 ----
#ifdef USE_PRAGMA_IDENT_HDR
#pragma ident "@(#)cardTableRS.hpp 1.29 07/05/05 17:05:44 JVM"
#endif
/*
! * Copyright 2001-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*** 45,55 ****
static bool
card_is_dirty_wrt_gen_iter(jbyte cv) {
return CardTableModRefBS::card_is_dirty_wrt_gen_iter(cv);
}
! CardTableModRefBSForCTRS _ct_bs;
virtual void younger_refs_in_space_iterate(Space* sp, OopsInGenClosure* cl);
void verify_space(Space* s, HeapWord* gen_start);
--- 45,55 ----
static bool
card_is_dirty_wrt_gen_iter(jbyte cv) {
return CardTableModRefBS::card_is_dirty_wrt_gen_iter(cv);
}
! CardTableModRefBSForCTRS* _ct_bs;
virtual void younger_refs_in_space_iterate(Space* sp, OopsInGenClosure* cl);
void verify_space(Space* s, HeapWord* gen_start);
*** 74,83 ****
--- 74,85 ----
// always have the value "clean_card".)
jbyte* _last_cur_val_in_gen;
jbyte _cur_youngergen_card_val;
+ int _regions_to_iterate;
+
jbyte cur_youngergen_card_val() {
return _cur_youngergen_card_val;
}
void set_cur_youngergen_card_val(jbyte v) {
_cur_youngergen_card_val = v;
*** 97,151 ****
// *** GenRemSet functions.
GenRemSet::Name rs_kind() { return GenRemSet::CardTable; }
CardTableRS* as_CardTableRS() { return this; }
! CardTableModRefBS* ct_bs() { return &_ct_bs; }
// Override.
void prepare_for_younger_refs_iterate(bool parallel);
// Card table entries are cleared before application; "blk" is
// responsible for dirtying if the oop is still older-to-younger after
// closure application.
void younger_refs_iterate(Generation* g, OopsInGenClosure* blk);
! void inline_write_ref_field_gc(oop* field, oop new_val) {
! jbyte* byte = _ct_bs.byte_for(field);
*byte = youngergen_card;
}
! void write_ref_field_gc_work(oop* field, oop new_val) {
inline_write_ref_field_gc(field, new_val);
}
// Override. Might want to devirtualize this in the same fashion as
// above. Ensures that the value of the card for field says that it's
// a younger card in the current collection.
! virtual void write_ref_field_gc_par(oop* field, oop new_val);
void resize_covered_region(MemRegion new_region);
bool is_aligned(HeapWord* addr) {
! return _ct_bs.is_card_aligned(addr);
}
void verify();
! void verify_empty(MemRegion mr);
! void clear(MemRegion mr) { _ct_bs.clear(mr); }
void clear_into_younger(Generation* gen, bool clear_perm);
! void invalidate(MemRegion mr) { _ct_bs.invalidate(mr); }
void invalidate_or_clear(Generation* gen, bool younger, bool perm);
static uintx ct_max_alignment_constraint() {
return CardTableModRefBS::ct_max_alignment_constraint();
}
! jbyte* byte_for(void* p) { return _ct_bs.byte_for(p); }
! jbyte* byte_after(void* p) { return _ct_bs.byte_after(p); }
! HeapWord* addr_for(jbyte* p) { return _ct_bs.addr_for(p); }
bool is_prev_nonclean_card_val(jbyte v) {
return
youngergen_card <= v &&
v <= cur_youngergen_and_prev_nonclean_card &&
--- 99,155 ----
// *** GenRemSet functions.
GenRemSet::Name rs_kind() { return GenRemSet::CardTable; }
CardTableRS* as_CardTableRS() { return this; }
! CardTableModRefBS* ct_bs() { return _ct_bs; }
// Override.
void prepare_for_younger_refs_iterate(bool parallel);
// Card table entries are cleared before application; "blk" is
// responsible for dirtying if the oop is still older-to-younger after
// closure application.
void younger_refs_iterate(Generation* g, OopsInGenClosure* blk);
! void inline_write_ref_field_gc(void* field, oop new_val) {
! jbyte* byte = _ct_bs->byte_for(field);
*byte = youngergen_card;
}
! void write_ref_field_gc_work(void* field, oop new_val) {
inline_write_ref_field_gc(field, new_val);
}
// Override. Might want to devirtualize this in the same fashion as
// above. Ensures that the value of the card for field says that it's
// a younger card in the current collection.
! virtual void write_ref_field_gc_par(void* field, oop new_val);
void resize_covered_region(MemRegion new_region);
bool is_aligned(HeapWord* addr) {
! return _ct_bs->is_card_aligned(addr);
}
void verify();
! void verify_aligned_region_empty(MemRegion mr);
! void clear(MemRegion mr) { _ct_bs->clear(mr); }
void clear_into_younger(Generation* gen, bool clear_perm);
! void invalidate(MemRegion mr, bool whole_heap = false) {
! _ct_bs->invalidate(mr, whole_heap);
! }
void invalidate_or_clear(Generation* gen, bool younger, bool perm);
static uintx ct_max_alignment_constraint() {
return CardTableModRefBS::ct_max_alignment_constraint();
}
! jbyte* byte_for(void* p) { return _ct_bs->byte_for(p); }
! jbyte* byte_after(void* p) { return _ct_bs->byte_after(p); }
! HeapWord* addr_for(jbyte* p) { return _ct_bs->addr_for(p); }
bool is_prev_nonclean_card_val(jbyte v) {
return
youngergen_card <= v &&
v <= cur_youngergen_and_prev_nonclean_card &&