changeset 59589:24d50cf7519f nestmates

Summary: Change 'weak hidden' to just 'hidden' in dcmd and other small changes Reviewed-by: mchung
author hseigel
date Fri, 27 Mar 2020 18:51:32 +0000
parents 89d3a7ce35a9
children d97444469015
files src/hotspot/share/classfile/classLoaderHierarchyDCmd.cpp src/hotspot/share/classfile/javaClasses.hpp src/hotspot/share/classfile/klassFactory.hpp src/hotspot/share/include/jvm.h src/hotspot/share/interpreter/linkResolver.cpp src/hotspot/share/memory/metaspace/printCLDMetaspaceInfoClosure.cpp src/hotspot/share/prims/jvm.cpp test/hotspot/jtreg/serviceability/dcmd/vm/ClassLoaderHierarchyTest.java test/hotspot/jtreg/serviceability/dcmd/vm/ClassLoaderStatsTest.java
diffstat 9 files changed, 22 insertions(+), 24 deletions(-) [+]
line wrap: on
line diff
--- a/src/hotspot/share/classfile/classLoaderHierarchyDCmd.cpp	Fri Mar 27 11:26:17 2020 -0700
+++ b/src/hotspot/share/classfile/classLoaderHierarchyDCmd.cpp	Fri Mar 27 18:51:32 2020 +0000
@@ -149,8 +149,8 @@
   LoadedClassInfo* _anon_classes;
   int _num_anon_classes;
 
-  LoadedClassInfo* _hidden_weak_classes;
-  int _num_hidden_weak_classes;
+  LoadedClassInfo* _hidden_classes;
+  int _num_hidden_classes;
 
   // In default view, similar tree nodes (same loader class, same name or no name)
   // are folded into each other to make the output more readable.
@@ -224,7 +224,7 @@
       if (print_classes) {
         if (_classes != NULL) {
           for (LoadedClassInfo* lci = _classes; lci; lci = lci->_next) {
-            // Weak-hidden and unsafe anonymous classes should not live in the primary CLD of their loaders.
+            // non-strong hidden and unsafe anonymous classes should not live in the primary CLD of their loaders.
             assert(lci->_cld == _cld, "must be");
 
             branchtracker.print(st);
@@ -280,16 +280,16 @@
           st->cr();
         }
 
-        if (_hidden_weak_classes != NULL) {
-          for (LoadedClassInfo* lci = _hidden_weak_classes; lci; lci = lci->_next) {
+        if (_hidden_classes != NULL) {
+          for (LoadedClassInfo* lci = _hidden_classes; lci; lci = lci->_next) {
             branchtracker.print(st);
-            if (lci == _hidden_weak_classes) { // first iteration
-              st->print("%*s ", indentation, "Weak Hidden Classes:");
+            if (lci == _hidden_classes) { // first iteration
+              st->print("%*s ", indentation, "Hidden Classes:");
             } else {
               st->print("%*s ", indentation, "");
             }
             st->print("%s", lci->_klass->external_name());
-            // For weak hidden classes, also print CLD if verbose. Should be a
+            // For non-strong hidden classes, also print CLD if verbose. Should be a
             // different one than the primary CLD.
             assert(lci->_cld != _cld, "must be");
             if (verbose) {
@@ -299,8 +299,8 @@
           }
           branchtracker.print(st);
           st->print("%*s ", indentation, "");
-          st->print_cr("(%u weak hidden class%s)", _num_hidden_weak_classes,
-                       (_num_hidden_weak_classes == 1) ? "" : "es");
+          st->print_cr("(%u hidden class%s)", _num_hidden_classes,
+                       (_num_hidden_classes == 1) ? "" : "es");
 
           // Empty line
           branchtracker.print(st);
@@ -334,7 +334,7 @@
   LoaderTreeNode(const oop loader_oop)
     : _loader_oop(loader_oop), _cld(NULL), _child(NULL), _next(NULL),
       _classes(NULL), _num_classes(0), _anon_classes(NULL), _num_anon_classes(0),
-      _hidden_weak_classes(NULL), _num_hidden_weak_classes(0),
+      _hidden_classes(NULL), _num_hidden_classes(0),
       _num_folded(0)
     {}
 
@@ -357,7 +357,7 @@
     LoadedClassInfo** p_list_to_add_to;
     bool is_hidden = first_class->_klass->is_hidden();
     if (has_class_mirror_holder) {
-      p_list_to_add_to = is_hidden ? &_hidden_weak_classes : &_anon_classes;
+      p_list_to_add_to = is_hidden ? &_hidden_classes : &_anon_classes;
     } else {
       p_list_to_add_to = &_classes;
     }
@@ -368,7 +368,7 @@
     *p_list_to_add_to = first_class;
     if (has_class_mirror_holder) {
       if (is_hidden) {
-        _num_hidden_weak_classes += num_classes;
+        _num_hidden_classes += num_classes;
       } else {
         _num_anon_classes += num_classes;
       }
--- a/src/hotspot/share/classfile/javaClasses.hpp	Fri Mar 27 11:26:17 2020 -0700
+++ b/src/hotspot/share/classfile/javaClasses.hpp	Fri Mar 27 18:51:32 2020 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
--- a/src/hotspot/share/classfile/klassFactory.hpp	Fri Mar 27 11:26:17 2020 -0700
+++ b/src/hotspot/share/classfile/klassFactory.hpp	Fri Mar 27 18:51:32 2020 +0000
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
+* Copyright (c) 2015, 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
--- a/src/hotspot/share/include/jvm.h	Fri Mar 27 11:26:17 2020 -0700
+++ b/src/hotspot/share/include/jvm.h	Fri Mar 27 18:51:32 2020 +0000
@@ -392,7 +392,6 @@
  * Define a class with the specified lookup class.
  *  lookup:  Lookup class
  *  name:    the name of the class
- *  loader:  defining class loader
  *  buf:     class bytes
  *  len:     length of class bytes
  *  pd:      protection domain
--- a/src/hotspot/share/interpreter/linkResolver.cpp	Fri Mar 27 11:26:17 2020 -0700
+++ b/src/hotspot/share/interpreter/linkResolver.cpp	Fri Mar 27 18:51:32 2020 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
--- a/src/hotspot/share/memory/metaspace/printCLDMetaspaceInfoClosure.cpp	Fri Mar 27 11:26:17 2020 -0700
+++ b/src/hotspot/share/memory/metaspace/printCLDMetaspaceInfoClosure.cpp	Fri Mar 27 18:51:32 2020 +0000
@@ -104,7 +104,7 @@
     _out->print(UINTX_FORMAT_W(4) ": ", _num_loaders);
 
     // Print "CLD for [<loader name>,] instance of <loader class name>"
-    // or    "CLD for <weak hidden or anonymous class>, loaded by [<loader name>,] instance of <loader class name>"
+    // or    "CLD for <hidden or anonymous class>, loaded by [<loader name>,] instance of <loader class name>"
 
     ResourceMark rm;
     const char* name = NULL;
@@ -129,7 +129,7 @@
     }
     _out->print(":");
     if (cld->has_class_mirror_holder()) {
-      _out->print(" <weak hidden or anonymous class>, loaded by");
+      _out->print(" <hidden or anonymous class>, loaded by");
     }
     if (name != NULL) {
       _out->print(" \"%s\"", name);
--- a/src/hotspot/share/prims/jvm.cpp	Fri Mar 27 11:26:17 2020 -0700
+++ b/src/hotspot/share/prims/jvm.cpp	Fri Mar 27 18:51:32 2020 +0000
@@ -1147,7 +1147,6 @@
  * Define a class with the specified lookup class.
  *  lookup:  Lookup class
  *  name:    the name of the class
- *  loader:  defining class loader
  *  buf:     class bytes
  *  len:     length of class bytes
  *  pd:      protection domain
--- a/test/hotspot/jtreg/serviceability/dcmd/vm/ClassLoaderHierarchyTest.java	Fri Mar 27 11:26:17 2020 -0700
+++ b/test/hotspot/jtreg/serviceability/dcmd/vm/ClassLoaderHierarchyTest.java	Fri Mar 27 18:51:32 2020 +0000
@@ -97,7 +97,7 @@
         output.shouldMatch("Kevin.*TestClassLoader");
         output.shouldMatch("Bill.*TestClassLoader");
         output.shouldContain("TestClass2");
-        output.shouldContain("Weak Hidden Classes:");
+        output.shouldContain("Hidden Classes:");
     }
 
     static class TestClassLoader extends ClassLoader {
--- a/test/hotspot/jtreg/serviceability/dcmd/vm/ClassLoaderStatsTest.java	Fri Mar 27 11:26:17 2020 -0700
+++ b/test/hotspot/jtreg/serviceability/dcmd/vm/ClassLoaderStatsTest.java	Fri Mar 27 18:51:32 2020 +0000
@@ -62,9 +62,9 @@
     // ClassLoader         Parent              CLD*               Classes   ChunkSz   BlockSz  Type
     // 0x0000000800bd3830  0x000000080037f468  0x00007f001c2ea170       1     10240      4672  ClassLoaderStatsTest$DummyClassLoader
     //                                                                  1      2048      1080   + unsafe anonymous classes
-    //                                                                  1      2048      1088   + hidden weak classes
+    //                                                                  1      2048      1088   + hidden classes
     // 0x0000000000000000  0x0000000000000000  0x00007f00e852d190    1607   4628480   3931216  <boot class loader>
-    //                                                                 38    124928     85856   + hidden weak classes
+    //                                                                 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
     // ...
@@ -194,7 +194,7 @@
 
     static {
         try {
-            // Create a hidden weak class and an anonymous class.
+            // Create a hidden non-strong class and an anonymous class.
             byte[] klassBuf = readClassFile(DIR + File.separator + HCName);
             Class<?> hc = defineHiddenClass(klassBuf);
             Class ac = unsafe.defineAnonymousClass(TestClass.class, klassBuf, new Object[0]);