Skip to content

Commit

Permalink
8272065: jcmd cannot rely on the old core reflection implementation w…
Browse files Browse the repository at this point in the history
…hich will be changed after JEP 416

Reviewed-by: mchung, coleenp, dholmes
  • Loading branch information
tstuefe committed Nov 5, 2021
1 parent 8e17ce0 commit 7281861
Show file tree
Hide file tree
Showing 8 changed files with 1 addition and 368 deletions.
11 changes: 1 addition & 10 deletions src/hotspot/share/classfile/classLoaderHierarchyDCmd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
#include "memory/allocation.hpp"
#include "memory/resourceArea.hpp"
#include "runtime/safepoint.hpp"
#include "oops/reflectionAccessorImplKlassHelper.hpp"
#include "utilities/globalDefinitions.hpp"
#include "utilities/ostream.hpp"

Expand Down Expand Up @@ -172,7 +171,7 @@ class LoaderTreeNode : public ResourceObj {

branchtracker.print(st);

// e.g. "+--- jdk.internal.reflect.DelegatingClassLoader"
// e.g. +-- "app", jdk.internal.loader.ClassLoaders$AppClassLoader
st->print("+%.*s", BranchTracker::twig_len, "----------");
if (_cld->is_the_null_class_loader_data()) {
st->print(" <bootstrap>");
Expand Down Expand Up @@ -232,14 +231,6 @@ class LoaderTreeNode : public ResourceObj {
st->print("%*s ", indentation, "");
}
st->print("%s", lci->_klass->external_name());

// Special treatment for generated core reflection accessor classes: print invocation target.
if (ReflectionAccessorImplKlassHelper::is_generated_accessor(lci->_klass)) {
st->print(" (invokes: ");
ReflectionAccessorImplKlassHelper::print_invocation_target(st, lci->_klass);
st->print(")");
}

st->cr();
}
branchtracker.print(st);
Expand Down
7 changes: 0 additions & 7 deletions src/hotspot/share/memory/heapInspection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
#include "memory/resourceArea.hpp"
#include "memory/universe.hpp"
#include "oops/oop.inline.hpp"
#include "oops/reflectionAccessorImplKlassHelper.hpp"
#include "runtime/atomic.hpp"
#include "runtime/os.hpp"
#include "services/memTracker.hpp"
Expand Down Expand Up @@ -474,12 +473,6 @@ void KlassHierarchy::print_class(outputStream* st, KlassInfoEntry* cie, bool pri
if (klass->is_interface()) {
st->print(" (intf)");
}
// Special treatment for generated core reflection accessor classes: print invocation target.
if (ReflectionAccessorImplKlassHelper::is_generated_accessor(klass)) {
st->print(" (invokes: ");
ReflectionAccessorImplKlassHelper::print_invocation_target(st, klass);
st->print(")");
}
st->print("\n");

// Print any interfaces the class has.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
#include "memory/metaspace/printMetaspaceInfoKlassClosure.hpp"
#include "memory/resourceArea.hpp"
#include "oops/klass.hpp"
#include "oops/reflectionAccessorImplKlassHelper.hpp"
#include "utilities/globalDefinitions.hpp"
#include "utilities/ostream.hpp"

Expand All @@ -46,13 +45,6 @@ void PrintMetaspaceInfoKlassClosure::do_klass(Klass* k) {

ResourceMark rm;
_out->print(" %s", k->external_name());

// Special treatment for generated core reflection accessor classes: print invocation target.
if (ReflectionAccessorImplKlassHelper::is_generated_accessor(k)) {
_out->print(" (invokes: ");
ReflectionAccessorImplKlassHelper::print_invocation_target(_out, k);
_out->print(")");
}
}

} // namespace metaspace
165 changes: 0 additions & 165 deletions src/hotspot/share/oops/reflectionAccessorImplKlassHelper.cpp

This file was deleted.

74 changes: 0 additions & 74 deletions src/hotspot/share/oops/reflectionAccessorImplKlassHelper.hpp

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,6 @@ public class ClassLoaderHierarchyTest {
// | |
// | +-- "app", jdk.internal.loader.ClassLoaders$AppClassLoader
// |
// +-- jdk.internal.reflect.DelegatingClassLoader
// |
// +-- "Kevin", ClassLoaderHierarchyTest$TestClassLoader
// |
// +-- ClassLoaderHierarchyTest$TestClassLoader
// |
// +-- "Bill", ClassLoaderHierarchyTest$TestClassLoader
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ public class ClassLoaderStatsTest {
// 1 256 131 + hidden classes
// 0x0000000000000000 0x0000000000000000 0x00007f00e852d190 1607 4628480 3931216 <boot class loader>
// 38 124928 85856 + hidden classes
// 0x00000008003b5508 0x0000000000000000 0x00007f001c2d4760 1 6144 4040 jdk.internal.reflect.DelegatingClassLoader
// 0x000000080037f468 0x000000080037ee80 0x00007f00e868e3f0 228 1368064 1286672 jdk.internal.loader.ClassLoaders$AppClassLoader
// ...

Expand Down
Loading

1 comment on commit 7281861

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.