diff src/share/vm/oops/instanceKlass.hpp @ 7587:4a916f2ce331

8003985: Support @Contended Annotation - JEP 142 Summary: HotSpot changes to support @Contended annotation. Reviewed-by: coleenp, kvn, jrose Contributed-by: Aleksey Shipilev <aleksey.shipilev@oracle.com>
author jwilhelm
date Mon, 14 Jan 2013 15:17:47 +0100
parents 37a3e8b7a1e9
children 212c5b9c38e7
line wrap: on
line diff
--- a/src/share/vm/oops/instanceKlass.hpp	Fri Jan 11 09:53:24 2013 -0800
+++ b/src/share/vm/oops/instanceKlass.hpp	Mon Jan 14 15:17:47 2013 +0100
@@ -230,7 +230,8 @@
     _misc_rewritten            = 1 << 0, // methods rewritten.
     _misc_has_nonstatic_fields = 1 << 1, // for sizing with UseCompressedOops
     _misc_should_verify_class  = 1 << 2, // allow caching of preverification
-    _misc_is_anonymous         = 1 << 3  // has embedded _inner_classes field
+    _misc_is_anonymous         = 1 << 3, // has embedded _inner_classes field
+    _misc_is_contended         = 1 << 4  // marked with contended annotation
   };
   u2              _misc_flags;
   u2              _minor_version;        // minor version number of class file
@@ -550,6 +551,17 @@
     return is_anonymous() ? java_mirror() : class_loader();
   }
 
+  bool is_contended() const                {
+    return (_misc_flags & _misc_is_contended) != 0;
+  }
+  void set_is_contended(bool value)        {
+    if (value) {
+      _misc_flags |= _misc_is_contended;
+    } else {
+      _misc_flags &= ~_misc_is_contended;
+    }
+  }
+
   // signers
   objArrayOop signers() const              { return _signers; }
   void set_signers(objArrayOop s)          { klass_oop_store((oop*)&_signers, s); }