-
Notifications
You must be signed in to change notification settings - Fork 729
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
Add option to enforce/disable IProfiler during startup phase #18381
Conversation
e3489bd
to
d46f9a4
Compare
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.
We need both -XX:+
and -XX:-
versions of the option. Not only this is consistent with the rest of the options, but allows the user more flexibility:
- If nothing is specified, the JVM will disable the IProfiler collection for warm runs that use a non-bootstrap SCC and enable for all other runs
- If
-XX:+
is specified, the JVM will always collect IProfiler information during start-up, including warm runs with an explicit SCC - If
-XX:-
is specified, the JVM will never collect IProfiler information during start-up, even if it's a cold run or if it's a bootstrap SCC
For reference, see how the JIT processes the other XX options using the ExternalOptions
enum and _externalOptionStrings
array.
Options may need to have a second look after a CRIU restore.
@mpirvu Would it also be called Also in regards to the |
I am ok with that name.
We can remove it later. Being a JIT option, we don't expect people to use in (except as a temporary workaround at our suggestion). |
I skimmed the code and agree with Marius' feedback about +/- being needed. Otherwise it looks okay to me. |
8b939d0
to
53d0c8b
Compare
This PR is ready to be merged |
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.
This implementation takes away 2 bit flags from the vm->extendedRuntimeFlags2
for something that the VM is not interested in.
I am suggesting the following:
- add two new entries to the
ExternalOptions
enum corresponding to the 2 new options - add the names of the two new options to the
_externalOptionsString
- in
fePostProcess()
when we setTR_NoIProfilerDuringStartupPhase
, useFIND_ARG_IN_VMARGS(EXACT_MATCH, ...)
to detect which scenario we are in and setTR_NoIProfilerDuringStartupPhase
appropriately. Search for similar examples in the code. - modify
OptionsPostRestore::iterateOverExternalOptions()
to process the new options post CRIU restore.
This approach does not require any modification to the VM code.
I'll have it do the same behaviour on the CRIU restore side as a non-CRIU run, which what would a user expect. |
New option: `-XX:[+/-]IProfileDuringStartupPhase` Overrides `-Xjit:noIProfilerDuringStartupPhase` Imitate the behaviour for CRIU restore Signed-off-by: Abdulrahman Alattas <[email protected]>
53d0c8b
to
a92489d
Compare
Latest commit changes:
Possible TODO: openj9/runtime/compiler/control/J9Options.cpp Lines 3165 to 3177 in a92489d
Other than that the PR should be ready to merge. |
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
jenkins compile all jdk17 |
jenkins test sanity zlinux jdk17 |
There were 2 failures on zLinux, but I don't see how they are related to this PR
|
Making a new option,
-XX:[+/-]IProfileDuringStartupPhase
, that enforce/disable IProfiler during the startup phase.If the option is not used the default existing algorithm will determine the behaviour.
This option will replaces the
TR_DisableNoIProfilerDuringStartupPhase
environment variable and overrides-Xjit:noIProfilerDuringStartupPhase
.This option will be used in cold-runs/
populate_scc
scripts to ensure more IProfiler information are being collected and stored in the SCC.Docs: eclipse-openj9/openj9-docs#1204