1 /*
2 * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 package sun.management;
27
28 import java.util.List;
29 import sun.management.counter.Counter;
30 /**
31 * An interface for the monitoring and management of the
32 * Java virtual machine.
33 */
34 public interface VMManagement {
35
36 // Optional supports
37 public boolean isCompilationTimeMonitoringSupported();
38 public boolean isThreadContentionMonitoringSupported();
39 public boolean isThreadContentionMonitoringEnabled();
40 public boolean isCurrentThreadCpuTimeSupported();
41 public boolean isOtherThreadCpuTimeSupported();
42 public boolean isThreadCpuTimeEnabled();
43 public boolean isBootClassPathSupported();
44 public boolean isObjectMonitorUsageSupported();
45 public boolean isSynchronizerUsageSupported();
46 public boolean isThreadAllocatedMemorySupported();
47 public boolean isThreadAllocatedMemoryEnabled();
48 public boolean isGcNotificationSupported();
49 public boolean isRemoteDiagnosticCommandsSupported();
50
51 // AOT Subsytem
52 public String getAOTMode();
53 public boolean isAOTRecording();
54 public long getAOTRecordingDuration();
55 public boolean endAOTRecording();
56
57 // Class Loading Subsystem
58 public long getTotalClassCount();
59 public int getLoadedClassCount();
60 public long getUnloadedClassCount();
61 public boolean getVerboseClass();
62
63 // Memory Subsystem
64 public boolean getVerboseGC();
65
66 // Runtime Subsystem
67 public String getManagementVersion();
68 public String getVmId();
69 public String getVmName();
70 public String getVmVendor();
71 public String getVmVersion();
72 public String getVmSpecName();
73 public String getVmSpecVendor();
74 public String getVmSpecVersion();
75 public String getClassPath();
76 public String getLibraryPath();
77 public String getBootClassPath();
78 public List<String> getVmArguments();
79 public long getStartupTime();
80 public long getUptime();
81 public int getAvailableProcessors();
82
83 // Compilation Subsystem
84 public String getCompilerName();
85 public long getTotalCompileTime();
86
87 // Thread Subsystem
88 public long getTotalThreadCount();
89 public int getLiveThreadCount();
90 public int getPeakThreadCount();
91 public int getDaemonThreadCount();
92
93 // Operating System
94 public String getOsName();
95 public String getOsArch();
96 public String getOsVersion();
97
98 // Hotspot-specific Runtime support
99 public long getSafepointCount();
100 public long getTotalSafepointTime();
101 public long getSafepointSyncTime();
102 public long getTotalApplicationNonStoppedTime();
103
104 public long getLoadedClassSize();
105 public long getUnloadedClassSize();
106 public long getClassLoadingTime();
107 public long getMethodDataSize();
108 public long getInitializedClassCount();
109 public long getClassInitializationTime();
110 public long getClassVerificationTime();
111
112 // Performance counter support
113 public List<Counter> getInternalCounters(String pattern);
114 }