-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Backport of GR-52454: Include signal exit handlers in the image build if JFR #3
Conversation
It seems like truffle issues are causing failures in:
|
This is a backport of oracle/graal#8498 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @roberttoyonaga,
Can you please use git cherry-pick -x
for the backport and update the PR?
Thank you.
@@ -34,7 +34,7 @@ | |||
public class SubstrateExitHandlerFeature implements InternalFeature { | |||
@Override | |||
public void beforeAnalysis(BeforeAnalysisAccess access) { | |||
if (SubstrateOptions.InstallExitHandlers.getValue()) { | |||
if (SubstrateOptions.InstallExitHandlers.getValue() || VMInspectionOptions.hasJfrSupport()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume || VMInspectionOptions.hasNativeMemoryTrackingSupport()
is intentionally missing due to not being present in graalvm 23.1 (for JDK 21)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that's right, the native memory tracking feature isn't available yet in graalVM for JDK21.
252695e
to
46f5dc2
Compare
Thanks for the review @zakkak ! I've redone it using |
Style issues fix in #7 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks @roberttoyonaga!
For future reference please note that it's OK to squash such trivial commits fixing incompatibilities when cherry-picking.
I'm backporting this change so that JFR is able to dump recordings by default if apps are stopped with SIGINT. This is important because without it users must manually specify a recording duration to create dump (or wait until the program finishes on its own). Previously
--install-exit-handlers
had to be specified at build time to get the same behaviour.This should be a low risk because the change only lessens the strictness of the check whether to install exist signal handlers. This only changes the default behaviour when using JFR.
Tested with
mx native-unittest
: passedAlso tested manually with: