< prev index next >

src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/oops/InstanceKlass.java

Print this page
*** 75,10 ***
--- 75,12 ---
    private static int MISC_HAS_BEEN_REDEFINED;
    private static int MISC_IS_SCRATCH_CLASS;
    private static int MISC_IS_SHARED_BOOT_CLASS;
    private static int MISC_IS_SHARED_PLATFORM_CLASS;
    private static int MISC_IS_SHARED_APP_CLASS;
+   private static int MISC_HAS_INJECTED_PRIMITIVEOBJECT;
+   private static int MISC_HAS_INJECTED_IDENTITYOBJECT;
  
    private static synchronized void initialize(TypeDataBase db) throws WrongTypeException {
      Type type            = db.lookupType("InstanceKlass");
      arrayKlasses         = new MetadataField(type.getAddressField("_array_klasses"), 0);
      methods              = type.getAddressField("_methods");

*** 132,10 ***
--- 134,12 ---
      MISC_HAS_BEEN_REDEFINED           = db.lookupIntConstant("InstanceKlass::_misc_has_been_redefined").intValue();
      MISC_IS_SCRATCH_CLASS             = db.lookupIntConstant("InstanceKlass::_misc_is_scratch_class").intValue();
      MISC_IS_SHARED_BOOT_CLASS         = db.lookupIntConstant("InstanceKlass::_misc_is_shared_boot_class").intValue();
      MISC_IS_SHARED_PLATFORM_CLASS     = db.lookupIntConstant("InstanceKlass::_misc_is_shared_platform_class").intValue();
      MISC_IS_SHARED_APP_CLASS          = db.lookupIntConstant("InstanceKlass::_misc_is_shared_app_class").intValue();
+     MISC_HAS_INJECTED_PRIMITIVEOBJECT = db.lookupIntConstant("InstanceKlass::_misc_has_injected_primitiveObject").intValue();
+     MISC_HAS_INJECTED_IDENTITYOBJECT  = db.lookupIntConstant("InstanceKlass::_misc_has_injected_identityObject").intValue();
    }
  
    public InstanceKlass(Address addr) {
      super(addr);
  

*** 566,10 ***
--- 570,18 ---
      } else {
         return false;
      }
    }
  
+   public boolean hasInjectedIdentityObject() {
+     return (getMiscFlags() & MISC_HAS_INJECTED_IDENTITYOBJECT) != 0;
+   }
+ 
+   public boolean hasInjectedPrimitiveObject() {
+     return (getMiscFlags() & MISC_HAS_INJECTED_PRIMITIVEOBJECT) != 0;
+   }
+ 
    public boolean implementsInterface(Klass k) {
      if (Assert.ASSERTS_ENABLED) {
        Assert.that(k.isInterface(), "should not reach here");
      }
      KlassArray interfaces =  getTransitiveInterfaces();
< prev index next >