26 package jdk.jfr.event.runtime;
27
28 import jdk.jfr.Recording;
29 import jdk.jfr.consumer.*;
30 import jdk.test.lib.Asserts;
31 import jdk.test.lib.dcmd.PidJcmdExecutor;
32 import jdk.test.lib.jfr.EventNames;
33 import jdk.test.lib.jfr.Events;
34 import jdk.test.lib.process.OutputAnalyzer;
35
36 import java.util.*;
37 import java.util.concurrent.FutureTask;
38 import java.util.stream.Collectors;
39
40 /**
41 * @test
42 * @key jfr
43 *
44 * @library /lib /
45 *
46 * @run main/othervm jdk.jfr.event.runtime.TestBiasedLockRevocationEvents
47 */
48 public class TestBiasedLockRevocationEvents {
49
50 public static void main(String[] args) throws Throwable {
51 testSingleRevocation();
52 testBulkRevocation();
53 testSelfRevocation();
54 testExitedThreadRevocation();
55 testBulkRevocationNoRebias();
56 testRevocationSafepointIdCorrelation();
57 }
58
59 // Default value of BiasedLockingBulkRebiasThreshold is 20, and BiasedLockingBulkRevokeTreshold is 40.
60 // Using a value that will hit the first threshold once, and the second one the next time.
61 private static final int BULK_REVOKE_THRESHOLD = 25;
62
63 static void touch(Object lock) {
64 synchronized(lock) {
65 }
66 }
|
26 package jdk.jfr.event.runtime;
27
28 import jdk.jfr.Recording;
29 import jdk.jfr.consumer.*;
30 import jdk.test.lib.Asserts;
31 import jdk.test.lib.dcmd.PidJcmdExecutor;
32 import jdk.test.lib.jfr.EventNames;
33 import jdk.test.lib.jfr.Events;
34 import jdk.test.lib.process.OutputAnalyzer;
35
36 import java.util.*;
37 import java.util.concurrent.FutureTask;
38 import java.util.stream.Collectors;
39
40 /**
41 * @test
42 * @key jfr
43 *
44 * @library /lib /
45 *
46 * @run main/othervm -XX:BiasedLockingStartupDelay=0 jdk.jfr.event.runtime.TestBiasedLockRevocationEvents
47 */
48 public class TestBiasedLockRevocationEvents {
49
50 public static void main(String[] args) throws Throwable {
51 testSingleRevocation();
52 testBulkRevocation();
53 testSelfRevocation();
54 testExitedThreadRevocation();
55 testBulkRevocationNoRebias();
56 testRevocationSafepointIdCorrelation();
57 }
58
59 // Default value of BiasedLockingBulkRebiasThreshold is 20, and BiasedLockingBulkRevokeTreshold is 40.
60 // Using a value that will hit the first threshold once, and the second one the next time.
61 private static final int BULK_REVOKE_THRESHOLD = 25;
62
63 static void touch(Object lock) {
64 synchronized(lock) {
65 }
66 }
|