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 import jdk.test.lib.Asserts;
25 import java.lang.management.ManagementFactory;
26 import java.lang.management.MemoryManagerMXBean;
27 import java.util.HashMap;
28 import java.util.List;
29 import java.util.Map;
30 import java.util.Optional;
31 import sun.hotspot.code.BlobType;
32
33 /**
34 * @test MemoryPoolsPresenceTest
35 * @library /testlibrary /../../test/lib
36 * @modules java.management
37 * @build MemoryPoolsPresenceTest
38 * @run main ClassFileInstaller sun.hotspot.WhiteBox
39 * sun.hotspot.WhiteBox$WhiteBoxPermission
40 * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
41 * -XX:+WhiteBoxAPI -XX:+SegmentedCodeCache MemoryPoolsPresenceTest
42 * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
43 * -XX:+WhiteBoxAPI -XX:-SegmentedCodeCache MemoryPoolsPresenceTest
44 * @summary verify that MemoryManagerMXBean exists for every code cache segment
45 */
46 public class MemoryPoolsPresenceTest {
47
48 private static final String CC_MANAGER = "CodeCacheManager";
49 private final Map<String, Integer> counters = new HashMap<>();
50
51 public static void main(String args[]) {
52 new MemoryPoolsPresenceTest().runTest();
53 }
54
55 protected void runTest() {
|
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 import jdk.test.lib.Asserts;
25 import java.lang.management.ManagementFactory;
26 import java.lang.management.MemoryManagerMXBean;
27 import java.util.HashMap;
28 import java.util.List;
29 import java.util.Map;
30 import java.util.Optional;
31 import sun.hotspot.code.BlobType;
32
33 /**
34 * @test MemoryPoolsPresenceTest
35 * @library /testlibrary /test/lib
36 * @modules java.management
37 * @build MemoryPoolsPresenceTest
38 * @run main ClassFileInstaller sun.hotspot.WhiteBox
39 * sun.hotspot.WhiteBox$WhiteBoxPermission
40 * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
41 * -XX:+WhiteBoxAPI -XX:+SegmentedCodeCache MemoryPoolsPresenceTest
42 * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
43 * -XX:+WhiteBoxAPI -XX:-SegmentedCodeCache MemoryPoolsPresenceTest
44 * @summary verify that MemoryManagerMXBean exists for every code cache segment
45 */
46 public class MemoryPoolsPresenceTest {
47
48 private static final String CC_MANAGER = "CodeCacheManager";
49 private final Map<String, Integer> counters = new HashMap<>();
50
51 public static void main(String args[]) {
52 new MemoryPoolsPresenceTest().runTest();
53 }
54
55 protected void runTest() {
|