RFR: 8298526: The detection state allows records in the stopped state to be closed when JFR.stop [v6]
Erik Gahlin
egahlin at openjdk.org
Sun Dec 18 14:11:47 UTC 2022
On Sun, 18 Dec 2022 08:49:22 GMT, xpbob <duke at openjdk.org> wrote:
> test 2 cases can be recorded normally 1.
Looks like the logic can be simplified to something like this. The generated filename will not be a directory.
recording.setSettings(s);
SafePath safePath = null;
+ // Generate dump filename if user has specified a time-based recording
+ if (duration != null && path == null) {
+ path = resolvePath(recording, null).toString();
+ }
+
if (path != null) {
try {
if (dumpOnExit == null) {
I also think you need to update tests.
For example, jdk.jfr.startupargs.TestStartDuration could fail due to a race condition if the recording is closed after it is finished. Today the test waits for a stopped state. This will not happen.
If you like, I can take over the issue? This might be more than you have planned for.
-------------
PR: https://git.openjdk.org/jdk/pull/11625
More information about the hotspot-jfr-dev
mailing list