8258917: NativeMemoryTracking is handled by launcher inconsistenly#2106
8258917: NativeMemoryTracking is handled by launcher inconsistenly#2106alexmenkov wants to merge 3 commits intoopenjdk:masterfrom alexmenkov:launcherNMT
Conversation
|
👋 Welcome back amenkov! A progress list of the required criteria for merging this PR into |
|
@alexmenkov The following labels will be automatically applied to this pull request:
When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing lists. If you would like to change these labels, use the /label pull request command. |
|
/label add serviceability |
|
@alexmenkov |
|
Added serviceability as serviceability tools use launcher functionality |
Webrevs
|
|
@alexmenkov This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be: You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 118 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
dholmes-ora
left a comment
There was a problem hiding this comment.
Alex,
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.
David
|
Mailing list message from David Holmes on serviceability-dev: On 17/01/2021 10:58 pm, David Holmes wrote:
Also, I'm not sure the scanning logic in SetJvmEnvironment is valid for /* but the argument rules for other commands are different. David |
yes, you are right. |
The impact is minimal (cycle through args, check if it starts from the string). And handle NMT arg in ParseArguments But this change would be much more risky. |
dholmes-ora
left a comment
There was a problem hiding this comment.
Hi Alex,
I think this is functionally correct now - though the comment you added is confusing to me (see below).
However I remain concerned that this requires processing the arg list twice for non-Java launchers. Is that a startup issue we should be concerned about?
Thanks,
David
| * arguments are for the application (i.e. the main class name, or | ||
| * the -jar argument). | ||
| * Non-java launchers: | ||
| * All "-J" arguments are translated to VM args (see TranslateApplicationArgs). |
There was a problem hiding this comment.
What do you mean by this? The -J args are not "translated" here but later in TranslateApplicationArgs.
For non-Java launchers AFAICS you have to process the entire argv array because you don't know where they may appear in general. So to me the comment should be:
- Other launchers (IsJavaArgs())
- All arguments have to be scanned to see if it is a -J argument
There was a problem hiding this comment.
What do you mean by this? The -J args are not "translated" here but later in TranslateApplicationArgs.
I meant that they are translated in TranslateApplicationArgs. Looks like it's not clear. Updated the comment as you suggested.
|
/integrate |
|
@alexmenkov Since your change was applied there have been 170 commits pushed to the
Your commit was automatically rebased without conflicts. Pushed as commit bdc305e. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
|
Mailing list message from David Holmes on serviceability-dev: Alex, On 20/01/2021 11:47 am, Alex Menkov wrote:
You integrated this change but neither Zhengyu nor myself approved the David |
|
Hi David,
I was sure I saw 2 approvals for the fix, but most likely I misread it and there were 2 reviewers. |
|
Mailing list message from David Holmes on serviceability-dev: Hi Alex, On 28/01/2021 7:44 am, Alex Menkov wrote:
Just ask Zhengyu to add his final Review as a comment to show he is okay
No.
Yes, it is our main concern. But that's not to say someone else may not
Please do. I don't know if anyone will look at it, but at least it Thanks, |
zhengyu123
left a comment
There was a problem hiding this comment.
Sorry, I overlooked some of details. Final change looks fine to me.
|
@zhengyu123 Thank you for re-reviewing @dholmes-ora RFE created: JDK-8260675 |
The fix adds NMT handling for non-java launchers
Progress
Issue
Reviewers
Download
$ git fetch https://git.openjdk.java.net/jdk pull/2106/head:pull/2106$ git checkout pull/2106