< prev index next >

test/serviceability/dcmd/vm/ClassLoaderStatsTest.java

Print this page




  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /*
  25  * @test
  26  * @summary Test of diagnostic command VM.classloader_stats
  27  * @library /testlibrary
  28  * @modules java.base/sun.misc
  29  *          java.compiler
  30  *          java.management
  31  *          jdk.jvmstat/sun.jvmstat.monitor
  32  * @build com.oracle.java.testlibrary.*
  33  * @build com.oracle.java.testlibrary.dcmd.*
  34  * @run testng ClassLoaderStatsTest
  35  */
  36 
  37 import org.testng.annotations.Test;
  38 import org.testng.Assert;
  39 
  40 import com.oracle.java.testlibrary.OutputAnalyzer;
  41 import com.oracle.java.testlibrary.dcmd.CommandExecutor;
  42 import com.oracle.java.testlibrary.dcmd.JMXExecutor;
  43 
  44 import java.io.File;
  45 import java.io.FileInputStream;
  46 import java.io.IOException;
  47 import java.nio.ByteBuffer;
  48 import java.nio.channels.FileChannel;
  49 import java.util.Iterator;
  50 import java.util.regex.Matcher;
  51 import java.util.regex.Pattern;
  52 
  53 public class ClassLoaderStatsTest {
  54 
  55     // ClassLoader         Parent              CLD*               Classes   ChunkSz   BlockSz  Type
  56     // 0x00000007c0215928  0x0000000000000000  0x0000000000000000       0         0         0  org.eclipse.osgi.baseadaptor.BaseAdaptor$1
  57     // 0x00000007c0009868  0x0000000000000000  0x00007fc52aebcc80       1      6144      3768  sun.reflect.DelegatingClassLoader
  58     // 0x00000007c0009868  0x0000000000000000  0x00007fc52b8916d0       1      6144      3688  sun.reflect.DelegatingClassLoader
  59     // 0x00000007c0009868  0x00000007c0038ba8  0x00007fc52afb8760       1      6144      3688  sun.reflect.DelegatingClassLoader
  60     // 0x00000007c0009868  0x0000000000000000  0x00007fc52afbb1a0       1      6144      3688  sun.reflect.DelegatingClassLoader
  61     // 0x0000000000000000  0x0000000000000000  0x00007fc523416070    5019  30060544  29956216  <boot classloader>
  62     //                                                                455   1210368    672848   + unsafe anonymous classes




  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /*
  25  * @test
  26  * @summary Test of diagnostic command VM.classloader_stats
  27  * @library /testlibrary
  28  * @modules java.base/sun.misc
  29  *          java.compiler
  30  *          java.management
  31  *          jdk.jvmstat/sun.jvmstat.monitor
  32  * @build jdk.test.lib.*
  33  * @build jdk.test.lib.dcmd.*
  34  * @run testng ClassLoaderStatsTest
  35  */
  36 
  37 import org.testng.annotations.Test;
  38 import org.testng.Assert;
  39 
  40 import jdk.test.lib.OutputAnalyzer;
  41 import jdk.test.lib.dcmd.CommandExecutor;
  42 import jdk.test.lib.dcmd.JMXExecutor;
  43 
  44 import java.io.File;
  45 import java.io.FileInputStream;
  46 import java.io.IOException;
  47 import java.nio.ByteBuffer;
  48 import java.nio.channels.FileChannel;
  49 import java.util.Iterator;
  50 import java.util.regex.Matcher;
  51 import java.util.regex.Pattern;
  52 
  53 public class ClassLoaderStatsTest {
  54 
  55     // ClassLoader         Parent              CLD*               Classes   ChunkSz   BlockSz  Type
  56     // 0x00000007c0215928  0x0000000000000000  0x0000000000000000       0         0         0  org.eclipse.osgi.baseadaptor.BaseAdaptor$1
  57     // 0x00000007c0009868  0x0000000000000000  0x00007fc52aebcc80       1      6144      3768  sun.reflect.DelegatingClassLoader
  58     // 0x00000007c0009868  0x0000000000000000  0x00007fc52b8916d0       1      6144      3688  sun.reflect.DelegatingClassLoader
  59     // 0x00000007c0009868  0x00000007c0038ba8  0x00007fc52afb8760       1      6144      3688  sun.reflect.DelegatingClassLoader
  60     // 0x00000007c0009868  0x0000000000000000  0x00007fc52afbb1a0       1      6144      3688  sun.reflect.DelegatingClassLoader
  61     // 0x0000000000000000  0x0000000000000000  0x00007fc523416070    5019  30060544  29956216  <boot classloader>
  62     //                                                                455   1210368    672848   + unsafe anonymous classes


< prev index next >