changeset 58472:61badf9448b4

8241320: The ClassLoaderData::_is_unsafe_anonymous field is unused in the SA Summary: remove unused code that is changing in Hotspot for hidden classes. Reviewed-by: lfoltan, dholmes, sspitsyn
author coleenp
date Fri, 20 Mar 2020 07:30:52 -0400
parents 2c275730b19d
children 7e5a53043493
files src/hotspot/share/runtime/vmStructs.cpp src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/classfile/ClassLoaderData.java
diffstat 2 files changed, 1 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/src/hotspot/share/runtime/vmStructs.cpp	Fri Mar 20 18:52:31 2020 +0800
+++ b/src/hotspot/share/runtime/vmStructs.cpp	Fri Mar 20 07:30:52 2020 -0400
@@ -522,7 +522,6 @@
   nonstatic_field(ClassLoaderData,             _class_loader,                                 OopHandle)                             \
   nonstatic_field(ClassLoaderData,             _next,                                         ClassLoaderData*)                      \
   volatile_nonstatic_field(ClassLoaderData,    _klasses,                                      Klass*)                                \
-  nonstatic_field(ClassLoaderData,             _is_unsafe_anonymous,                          bool)                                  \
   volatile_nonstatic_field(ClassLoaderData,    _dictionary,                                   Dictionary*)                           \
                                                                                                                                      \
   static_ptr_volatile_field(ClassLoaderDataGraph, _head,                                      ClassLoaderData*)                      \
--- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/classfile/ClassLoaderData.java	Fri Mar 20 18:52:31 2020 +0800
+++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/classfile/ClassLoaderData.java	Fri Mar 20 07:30:52 2020 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2020, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -44,14 +44,12 @@
     classLoaderFieldOffset = type.getAddressField("_class_loader").getOffset();
     nextField = type.getAddressField("_next");
     klassesField = new MetadataField(type.getAddressField("_klasses"), 0);
-    isUnsafeAnonymousField = new CIntField(type.getCIntegerField("_is_unsafe_anonymous"), 0);
     dictionaryField = type.getAddressField("_dictionary");
   }
 
   private static long classLoaderFieldOffset;
   private static AddressField nextField;
   private static MetadataField  klassesField;
-  private static CIntField isUnsafeAnonymousField;
   private static AddressField dictionaryField;
 
   public ClassLoaderData(Address addr) {
@@ -76,10 +74,6 @@
     return vmOopHandle.resolve();
   }
 
-  public boolean getisUnsafeAnonymous() {
-    return isUnsafeAnonymousField.getValue(this) != 0;
-  }
-
   public ClassLoaderData next() {
     return instantiateWrapperFor(nextField.getValue(getAddress()));
   }