Print this page
rev 6875 : 8056240: Investigate increased GC remark time after class unloading changes in CRM Fuse
Reviewed-by: mgerdin, coleenp, bdelsart

Split Split Close
Expand all
Collapse all
          --- old/src/share/vm/utilities/accessFlags.cpp
          +++ new/src/share/vm/utilities/accessFlags.cpp
↓ open down ↓ 54 lines elided ↑ open up ↑
  55   55  void AccessFlags::atomic_clear_bits(jint bits) {
  56   56    // Atomically update the flags with the bits given
  57   57    jint old_flags, new_flags, f;
  58   58    do {
  59   59      old_flags = _flags;
  60   60      new_flags = old_flags & ~bits;
  61   61      f = Atomic::cmpxchg(new_flags, &_flags, old_flags);
  62   62    } while(f != old_flags);
  63   63  }
  64   64  
       65 +// Returns true iff this thread succeeded setting the bit.
       66 +bool AccessFlags::atomic_set_one_bit(jint bit) {
       67 +  // Atomically update the flags with the bit given
       68 +  jint old_flags, new_flags, f;
       69 +  bool is_setting_bit = false;
       70 +  do {
       71 +    old_flags = _flags;
       72 +    new_flags = old_flags | bit;
       73 +    is_setting_bit = old_flags != new_flags;
       74 +    f = Atomic::cmpxchg(new_flags, &_flags, old_flags);
       75 +  } while(f != old_flags);
       76 +
       77 +  return is_setting_bit;
       78 +}
       79 +
  65   80  #if !defined(PRODUCT) || INCLUDE_JVMTI
  66   81  
  67   82  void AccessFlags::print_on(outputStream* st) const {
  68   83    if (is_public      ()) st->print("public "      );
  69   84    if (is_private     ()) st->print("private "     );
  70   85    if (is_protected   ()) st->print("protected "   );
  71   86    if (is_static      ()) st->print("static "      );
  72   87    if (is_final       ()) st->print("final "       );
  73   88    if (is_synchronized()) st->print("synchronized ");
  74   89    if (is_volatile    ()) st->print("volatile "    );
↓ open down ↓ 16 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX