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 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 * @library /test/lib
44 *
45 * @run main/othervm jdk.jfr.event.runtime.TestBiasedLockRevocationEvents
46 */
47 public class TestBiasedLockRevocationEvents {
48
49 public static void main(String[] args) throws Throwable {
50 testSingleRevocation();
51 testBulkRevocation();
52 testSelfRevocation();
53 testExitedThreadRevocation();
54 testBulkRevocationNoRebias();
55 testRevocationSafepointIdCorrelation();
56 }
57
58 // Default value of BiasedLockingBulkRebiasThreshold is 20, and BiasedLockingBulkRevokeTreshold is 40.
59 // Using a value that will hit the first threshold once, and the second one the next time.
60 private static final int BULK_REVOKE_THRESHOLD = 25;
61
62 static void touch(Object lock) {
|
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 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 * @requires vm.hasJFR
44 * @library /test/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) {
|