8056240: Investigate increased GC remark time after class unloading changes in CRM Fuse

Reviewed-by: mgerdin, coleenp, bdelsart
This commit is contained in:
Stefan Karlsson 2014-10-02 10:55:36 +02:00
parent 1055ae0436
commit d410f19961
19 changed files with 506 additions and 68 deletions

View file

@ -47,6 +47,21 @@ void AccessFlags::atomic_clear_bits(jint bits) {
} while(f != old_flags);
}
// Returns true iff this thread succeeded setting the bit.
bool AccessFlags::atomic_set_one_bit(jint bit) {
// Atomically update the flags with the bit given
jint old_flags, new_flags, f;
bool is_setting_bit = false;
do {
old_flags = _flags;
new_flags = old_flags | bit;
is_setting_bit = old_flags != new_flags;
f = Atomic::cmpxchg(new_flags, &_flags, old_flags);
} while(f != old_flags);
return is_setting_bit;
}
#if !defined(PRODUCT) || INCLUDE_JVMTI
void AccessFlags::print_on(outputStream* st) const {