8269817: serviceability/jvmti/DynamicCodeGenerated/DynamicCodeGeneratedTest.java timed out with -Xcomp
Reviewed-by: cjplummer, kevinw, sspitsyn
This commit is contained in:
parent
0a3b0fc8ad
commit
3ea89711e3
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2021, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -31,6 +31,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import java.lang.ref.Reference;
|
import java.lang.ref.Reference;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public class DynamicCodeGeneratedTest {
|
public class DynamicCodeGeneratedTest {
|
||||||
static {
|
static {
|
||||||
@ -38,20 +40,28 @@ public class DynamicCodeGeneratedTest {
|
|||||||
}
|
}
|
||||||
public static native void changeEventNotificationMode();
|
public static native void changeEventNotificationMode();
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) throws Exception {
|
||||||
// Try to enable DynamicCodeGenerated event while it is posted
|
// Try to enable DynamicCodeGenerated event while it is posted
|
||||||
// using JvmtiDynamicCodeEventCollector from VtableStubs::find_stub
|
// using JvmtiDynamicCodeEventCollector from VtableStubs::find_stub
|
||||||
Thread t = new Thread(() -> {
|
Thread threadChangeENM = new Thread(() -> {
|
||||||
changeEventNotificationMode();
|
changeEventNotificationMode();
|
||||||
});
|
});
|
||||||
t.setDaemon(true);
|
threadChangeENM.setDaemon(true);
|
||||||
t.start();
|
threadChangeENM.start();
|
||||||
|
|
||||||
for (int i = 0; i < 2000; i++) {
|
for (int i = 0; i < 10; i++) {
|
||||||
new Thread(() -> {
|
List<Thread> threads = new ArrayList();
|
||||||
String result = "string" + System.currentTimeMillis();
|
for (int j = 0; j < 200; j++) {
|
||||||
Reference.reachabilityFence(result);
|
Thread t = new Thread(() -> {
|
||||||
}).start();
|
String result = "string" + System.currentTimeMillis();
|
||||||
|
Reference.reachabilityFence(result);
|
||||||
|
});
|
||||||
|
threads.add(t);
|
||||||
|
t.start();
|
||||||
|
}
|
||||||
|
for (Thread t: threads) {
|
||||||
|
t.join();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user