Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
8241320: The ClassLoaderData::_is_unsafe_anonymous field is unused in…
… the SA

Remove unused code that is changing in Hotspot for hidden classes.

Reviewed-by: lfoltan, dholmes, sspitsyn
  • Loading branch information
coleenp committed Mar 20, 2020
1 parent 95d2830 commit 6dffcf753301385a5eeb869276967234126e509c
Showing with 1 addition and 8 deletions.
  1. +0 −1 src/hotspot/share/runtime/vmStructs.cpp
  2. +1 −7 src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/classfile/ClassLoaderData.java
@@ -522,7 +522,6 @@ typedef HashtableEntry<InstanceKlass*, mtClass> KlassHashtableEntry;
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*) \
@@ -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 @@ private static synchronized void initialize(TypeDataBase db) throws WrongTypeExc
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 @@ public Oop getClassLoader() {
return vmOopHandle.resolve();
}

public boolean getisUnsafeAnonymous() {
return isUnsafeAnonymousField.getValue(this) != 0;
}

public ClassLoaderData next() {
return instantiateWrapperFor(nextField.getValue(getAddress()));
}

0 comments on commit 6dffcf7

Please sign in to comment.