-
Bug
-
Resolution: Fixed
-
P3
-
11, 17, 21, 25
-
b10
REPRODUCER:
import java.nio.file.Path;
import java.time.Duration;
import jdk.jfr.*;
import jdk.jfr.consumer.*;
public class WAT {
@Name("F")
@StackTrace(false)
static class A extends Event {
}
@Name("FF")
@StackTrace(false)
static class B extends Event {
}
public static void main(String... args) throws Exception {
try (Recording r = new Recording()) {
r.enable("F").withStackTrace();
r.enable("FF").withStackTrace();
r.start();
A a = new A();
a.commit();
B b = new B();
b.commit();
r.stop();
Path p = Path.of("wat.jfr");
r.dump(p);
for (RecordedEvent e : RecordingFile.readAllEvents(p)) {
System.out.println(e);
}
}
}
}
OUTPUT:
F {
startTime = 10:40:54.209
eventThread = "main" (javaThreadId = 1)
}
FF {
startTime = 10:40:54.213
eventThread = "main" (javaThreadId = 1)
stackTrace = [
WAT.main(String[]) line: 28
jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Method, Object, Object[])
jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Object, Object[]) line: 62
jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 43
java.lang.reflect.Method.invoke(Object, Object[]) line: 566
...
]
}
The problem is a one-off error in the SettingsManager.
import java.nio.file.Path;
import java.time.Duration;
import jdk.jfr.*;
import jdk.jfr.consumer.*;
public class WAT {
@Name("F")
@StackTrace(false)
static class A extends Event {
}
@Name("FF")
@StackTrace(false)
static class B extends Event {
}
public static void main(String... args) throws Exception {
try (Recording r = new Recording()) {
r.enable("F").withStackTrace();
r.enable("FF").withStackTrace();
r.start();
A a = new A();
a.commit();
B b = new B();
b.commit();
r.stop();
Path p = Path.of("wat.jfr");
r.dump(p);
for (RecordedEvent e : RecordingFile.readAllEvents(p)) {
System.out.println(e);
}
}
}
}
OUTPUT:
F {
startTime = 10:40:54.209
eventThread = "main" (javaThreadId = 1)
}
FF {
startTime = 10:40:54.213
eventThread = "main" (javaThreadId = 1)
stackTrace = [
WAT.main(String[]) line: 28
jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Method, Object, Object[])
jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Object, Object[]) line: 62
jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 43
java.lang.reflect.Method.invoke(Object, Object[]) line: 566
...
]
}
The problem is a one-off error in the SettingsManager.
- links to
-
Commit(master) openjdk/jdk/ea7e9438
-
Review(master) openjdk/jdk/26531