Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -454,8 +454,16 @@ private void profile(Duration profilingDuration) throws Exception {
// dynamically
consumeActivationEventsFromRingBufferAndWriteToFile(profilingDuration);
} finally {
String stopMessage = profiler.execute("stop");
logger.fine(stopMessage);
try {
String stopMessage = profiler.execute("stop");
logger.fine(stopMessage);
} catch (IllegalStateException e) {
if (e.getMessage() != null && e.getMessage().contains("Profiler is not active")) {
logger.fine("Profiler already stopped");
} else {
logger.log(Level.WARNING, "Failure shutting down profiler", e);
}
}
}

// When post-processing is disabled, jfr file will not be parsed and the heavy processing will
Expand Down