23 * questions.
24 */
25 package jdk.jfr.api.consumer;
26
27 import java.nio.file.Path;
28 import java.time.Duration;
29 import java.util.ArrayList;
30 import java.util.List;
31
32 import jdk.jfr.Recording;
33 import jdk.jfr.consumer.RecordedEvent;
34 import jdk.jfr.consumer.RecordedFrame;
35 import jdk.jfr.consumer.RecordedStackTrace;
36 import jdk.jfr.consumer.RecordingFile;
37 import jdk.test.lib.Asserts;
38 import jdk.test.lib.Utils;
39 import jdk.test.lib.jfr.EventNames;
40 import jdk.test.lib.jfr.Events;
41 import jdk.test.lib.jfr.RecurseThread;
42
43 /*
44 * @test
45 * @key jfr
46 * @library /test/lib
47 * @run main/othervm jdk.jfr.api.consumer.TestRecordedFullStackTrace
48 */
49 public class TestRecordedFullStackTrace {
50
51 private final static String EVENT_NAME = EventNames.ExecutionSample;
52 private final static int MAX_DEPTH = 64; // currently hardcoded in jvm
53
54 public static void main(String[] args) throws Throwable {
55
56 RecurseThread[] threads = new RecurseThread[3];
57 for (int i = 0; i < threads.length; ++i) {
58 int depth = MAX_DEPTH - 1 + i;
59 threads[i] = new RecurseThread(depth);
60 threads[i].setName("recursethread-" + depth);
61 threads[i].start();
62 }
63
64 for (RecurseThread thread : threads) {
65 while (!thread.isInRunLoop()) {
|
23 * questions.
24 */
25 package jdk.jfr.api.consumer;
26
27 import java.nio.file.Path;
28 import java.time.Duration;
29 import java.util.ArrayList;
30 import java.util.List;
31
32 import jdk.jfr.Recording;
33 import jdk.jfr.consumer.RecordedEvent;
34 import jdk.jfr.consumer.RecordedFrame;
35 import jdk.jfr.consumer.RecordedStackTrace;
36 import jdk.jfr.consumer.RecordingFile;
37 import jdk.test.lib.Asserts;
38 import jdk.test.lib.Utils;
39 import jdk.test.lib.jfr.EventNames;
40 import jdk.test.lib.jfr.Events;
41 import jdk.test.lib.jfr.RecurseThread;
42
43 /**
44 * @test
45 * @key jfr
46 * @requires vm.hasJFR
47 * @library /test/lib
48 * @run main/othervm jdk.jfr.api.consumer.TestRecordedFullStackTrace
49 */
50 public class TestRecordedFullStackTrace {
51
52 private final static String EVENT_NAME = EventNames.ExecutionSample;
53 private final static int MAX_DEPTH = 64; // currently hardcoded in jvm
54
55 public static void main(String[] args) throws Throwable {
56
57 RecurseThread[] threads = new RecurseThread[3];
58 for (int i = 0; i < threads.length; ++i) {
59 int depth = MAX_DEPTH - 1 + i;
60 threads[i] = new RecurseThread(depth);
61 threads[i].setName("recursethread-" + depth);
62 threads[i].start();
63 }
64
65 for (RecurseThread thread : threads) {
66 while (!thread.isInRunLoop()) {
|