RFR: 8258917: NativeMemoryTracking is handled by launcher inconsistenly [v2]
amenkov at openjdk.java.net
Tue Jan 19 23:06:52 UTC 2021
On Sun, 17 Jan 2021 12:55:35 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> Alex Menkov has updated the pull request incrementally with one additional commit since the last revision:
>> Non-lava launchers should process all "-J" arguments
> This approach results in two scans of the argument list in the IsJavaArgs case. I don't know if we care about startup in the non-Java launchers, but this will likely affect it.
> Also, I'm not sure the scanning logic in SetJvmEnvironment is valid for
> the IsJavaArgs case. It states:
> * Since this must be a VM flag we stop processing once we see
> * an argument the launcher would not have processed beyond (such
> * as -version or -h), or an argument that indicates the following
> * arguments are for the application (i.e. the main class name, or
> * the -jar argument).
> but the argument rules for other commands are different.
yes, you are right.
TranslateApplicationArgs translates all "-J" args.
I updated the fix.
For non-java launchers we don't need to scan java args as we know they don't contain -J-XX:NativeMemoryTracking
More information about the core-libs-dev