Skip to content

8383460: Replace "sharing" in VM version string with "aot" information - #32486

Closed
iklam wants to merge 1 commit into
openjdk:masterfrom
iklam:8383460-replace-sharing-in-vm-version-string-with-aot-info
Closed

8383460: Replace "sharing" in VM version string with "aot" information#32486
iklam wants to merge 1 commit into
openjdk:masterfrom
iklam:8383460-replace-sharing-in-vm-version-string-with-aot-info

Conversation

@iklam

@iklam iklam commented Aug 21, 2026

Copy link
Copy Markdown
Member

[1] When using the new AOT workflow, the word "sharing" is replaced with "aot training", "aot assembly", or "aot production" as appropriate.
[2] Changed Abstract_VM_Version::vm_info_string() to return a c-heap allocated string. The caller should free it. The old way of enumerating every single possibility is not scalable.



Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed (2 reviews required, with at least 1 Reviewer, 1 Author)

Issue

  • JDK-8383460: Replace "sharing" in VM version string with "aot" information (Enhancement - P4)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/32486/head:pull/32486
$ git checkout pull/32486

Update a local copy of the PR:
$ git checkout pull/32486
$ git pull https://git.openjdk.org/jdk.git pull/32486/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 32486

View PR using the GUI difftool:
$ git pr show -t 32486

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/32486.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper

bridgekeeper Bot commented Aug 21, 2026

Copy link
Copy Markdown

👋 Welcome back iklam! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk

openjdk Bot commented Aug 21, 2026

Copy link
Copy Markdown

@iklam 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:

8383460: Replace "sharing" in VM version string with "aot" information

Reviewed-by: kvn, asmehra

You can use pull request commands such as /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 83 new commits pushed to the master branch:

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 master branch, type /integrate in a new comment.

@openjdk openjdk Bot added the hotspot hotspot-dev@openjdk.org label Aug 21, 2026
@openjdk

openjdk Bot commented Aug 21, 2026

Copy link
Copy Markdown

@iklam The following label will be automatically applied to this pull request:

  • hotspot

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk

openjdk Bot commented Aug 21, 2026

Copy link
Copy Markdown

The total number of required reviews for this PR has been set to 2 based on the presence of this label: hotspot. This can be overridden with the /reviewers command.

@openjdk openjdk Bot added the rfr Pull request is ready for review label Aug 21, 2026
@mlbridge

mlbridge Bot commented Aug 21, 2026

Copy link
Copy Markdown

Webrevs

@vnkozlov vnkozlov left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is annoying to remember to use FREE_C_HEAP_ARRAY(). Can we allocate version string on ResourceArea and use ResourceMark?

@vnkozlov

Copy link
Copy Markdown
Contributor

On other hand you may need to add as many ResourceMark as FREE_C_HEAP_ARRAY.
I will leave it to runtime group reviewer to decide what is the best.

@iklam

iklam commented Aug 21, 2026

Copy link
Copy Markdown
Member Author

On other hand you may need to add as many ResourceMark as FREE_C_HEAP_ARRAY. I will leave it to runtime group reviewer to decide what is the best.

Abstract_VM_Version::vm_info_string() is called very early during VM bootstrap and ResourceMark doesn't work yet (Thread::_current is not yet initialized).

We only call this function in a small number of places so having to free explicitly doesn't seem to be too bad.

@vnkozlov vnkozlov left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for explanation. Changes look good then.

@ashu-mehra ashu-mehra left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@openjdk openjdk Bot added the ready Pull request is ready to be integrated label Aug 26, 2026
@ashu-mehra

Copy link
Copy Markdown
Contributor

Are we sure the pointer is not cached in some global variable/structure by any of the callee to which vm_info_str is passed?

We only call this function in a small number of places so having to free explicitly doesn't seem to be too bad.

I don't mind this. If any one feels strongly about this, I guess another option is to use RAII pattern, like:

class VMInfoString {
  const char* str;
  VMInfoString() {
    str = Abstract_VM_Version::vm_info_string();
  }
  
  ~VMInfoString() {
    FREE_C_HEAP_ARRAY(str);
    str = nullptr;
  }
}

@iklam

iklam commented Aug 26, 2026

Copy link
Copy Markdown
Member Author

Are we sure the pointer is not cached in some global variable/structure by any of the callee to which vm_info_str is passed?

All the calls of VM_Version::vm_info_string() have been touched in this PR. The only ones that save the value is to set the "java.vm.info" property -- there are 3 cases that all have different paths (what a mess!) but in each case the value is copied and, if necessary, the old value is freed inside PathString::set_value()

@ashu-mehra

Copy link
Copy Markdown
Contributor

All the calls of VM_Version::vm_info_string() have been touched in this PR. The only ones that save the value is to set the "java.vm.info" property -- there are 3 cases that all have different paths (what a mess!) but in each case the value is copied and, if necessary, the old value is freed inside PathString::set_value()

Thanks for adding this info. I have no more comments, and the code changes look fine.

@iklam

iklam commented Aug 26, 2026

Copy link
Copy Markdown
Member Author

Thanks @vnkozlov @ashu-mehra for the review
/integrate

@openjdk

openjdk Bot commented Aug 26, 2026

Copy link
Copy Markdown

Going to push as commit 30df8a5.
Since your change was applied there have been 100 commits pushed to the master branch:

Your commit was automatically rebased without conflicts.

@openjdk openjdk Bot added the integrated Pull request has been integrated label Aug 26, 2026
@openjdk openjdk Bot closed this Aug 26, 2026
@openjdk openjdk Bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Aug 26, 2026
@openjdk

openjdk Bot commented Aug 26, 2026

Copy link
Copy Markdown

@iklam Pushed as commit 30df8a5.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hotspot hotspot-dev@openjdk.org integrated Pull request has been integrated

Development

Successfully merging this pull request may close these issues.

3 participants