mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-18 18:14:38 +02:00
8056240: Investigate increased GC remark time after class unloading changes in CRM Fuse
Reviewed-by: mgerdin, coleenp, bdelsart
This commit is contained in:
parent
1055ae0436
commit
d410f19961
19 changed files with 506 additions and 68 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue