Skip to content
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

JDK-8277383: VM.metaspace optionally show chunk freelist details #6452

Conversation

tstuefe
Copy link
Member

@tstuefe tstuefe commented Nov 18, 2021

A tiny patch to add an optional suboption to print out chunk freelist details with VM.metaspace; this is a followup from analyzing https://bugs.openjdk.java.net/browse/JDK-8277092.


Tested: GHA, SAP nightlies, manual on x64, x86 Linux
Failing compiler test on x86-32 (compiler/c2/irTests/TestUnsignedComparison.java) unrelated, see JDK-8277324
"C2 compilation fails with "bad AD file" on x86-32 after JDK-8276162 due to missing match rule"


Example use:

jcmd  HelloWorld VM.metaspace chunkfreelist

 ...
 
Chunk freelist details:
   Non-Class:
cm non-class-space: 7 chunks, total word size: 326144.
-- List[lv00]: empty
-- List[lv01]:  - <Chunk @0x00007f50d8122db0, state f, base 0x00007f5084600000, level lv01 (262144 words), used 0 words, committed 0 words.> - total : 1 chunks.
-- List[lv02]: empty
-- List[lv03]: empty
-- List[lv04]:  - <Chunk @0x00007f50d8122e88, state f, base 0x00007f5084540000, level lv04 (32768 words), used 0 words, committed 0 words.> - total : 1 chunks.
-- List[lv05]:  - <Chunk @0x00007f50d8122ed0, state f, base 0x00007f5084520000, level lv05 (16384 words), used 0 words, committed 0 words.> - total : 1 chunks.
-- List[lv06]:  - <Chunk @0x00007f50d8122f18, state f, base 0x00007f5084510000, level lv06 (8192 words), used 0 words, committed 0 words.> - total : 1 chunks.
-- List[lv07]:  - <Chunk @0x00007f50d8122f60, state f, base 0x00007f5084508000, level lv07 (4096 words), used 0 words, committed 0 words.> - total : 1 chunks.
-- List[lv08]:  - <Chunk @0x00007f50d8122fa8, state f, base 0x00007f5084504000, level lv08 (2048 words), used 0 words, committed 0 words.> - total : 1 chunks.
-- List[lv09]: empty
-- List[lv10]:  - <Chunk @0x00007f50d8123038, state f, base 0x00007f5084503000, level lv10 (512 words), used 0 words, committed 0 words.> - total : 1 chunks.
-- List[lv11]: empty
-- List[lv12]: empty
total chunks: 7, total word size: 326144.

       Class:
cm class-space: 6 chunks, total word size: 465920.
-- List[lv00]: empty
-- List[lv01]:  - <Chunk @0x00007f50d81229c0, state f, base 0x00000007c0200000, level lv01 (262144 words), used 0 words, committed 0 words.> - total : 1 chunks.
-- List[lv02]:  - <Chunk @0x00007f50d8122a08, state f, base 0x00000007c0100000, level lv02 (131072 words), used 0 words, committed 0 words.> - total : 1 chunks.
-- List[lv03]:  - <Chunk @0x00007f50d8122a50, state f, base 0x00000007c0080000, level lv03 (65536 words), used 0 words, committed 0 words.> - total : 1 chunks.
-- List[lv04]: empty
-- List[lv05]: empty
-- List[lv06]: empty
-- List[lv07]:  - <Chunk @0x00007f50d8122b70, state f, base 0x00000007c0008000, level lv07 (4096 words), used 0 words, committed 0 words.> - total : 1 chunks.
-- List[lv08]:  - <Chunk @0x00007f50d8122bb8, state f, base 0x00000007c0004000, level lv08 (2048 words), used 0 words, committed 0 words.> - total : 1 chunks.
-- List[lv09]:  - <Chunk @0x00007f50d8122c00, state f, base 0x00000007c0002000, level lv09 (1024 words), used 0 words, committed 0 words.> - total : 1 chunks.
-- List[lv10]: empty
-- List[lv11]: empty
-- List[lv12]: empty
total chunks: 6, total word size: 465920.


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8277383: VM.metaspace optionally show chunk freelist details

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/6452/head:pull/6452
$ git checkout pull/6452

Update a local copy of the PR:
$ git checkout pull/6452
$ git pull https://git.openjdk.java.net/jdk pull/6452/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 6452

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/6452.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Nov 18, 2021

👋 Welcome back stuefe! 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
Copy link

openjdk bot commented Nov 18, 2021

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

  • hotspot-runtime

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 added the hotspot-runtime hotspot-runtime-dev@openjdk.org label Nov 18, 2021
@tstuefe tstuefe force-pushed the JDK-8277383-VM-metaspace-optionally-show-chunk-freelist-details branch from 2ece1f2 to 9870321 Compare Nov 19, 2021
@tstuefe tstuefe marked this pull request as ready for review Nov 22, 2021
@openjdk openjdk bot added the rfr Pull request is ready for review label Nov 22, 2021
@mlbridge
Copy link

mlbridge bot commented Nov 22, 2021

Webrevs

@tstuefe tstuefe force-pushed the JDK-8277383-VM-metaspace-optionally-show-chunk-freelist-details branch from 9870321 to 442d9c0 Compare Nov 26, 2021
Copy link
Contributor

@coleenp coleenp left a comment

Seems good.

@openjdk
Copy link

openjdk bot commented Nov 30, 2021

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

8277383: VM.metaspace optionally show chunk freelist details

Reviewed-by: coleenp, shade

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 158 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 ready Pull request is ready to be integrated label Nov 30, 2021
@tstuefe
Copy link
Member Author

tstuefe commented Nov 30, 2021

Seems good.

Thank you, Coleen.

@tstuefe
Copy link
Member Author

tstuefe commented Dec 7, 2021

Ping... may I have a quick second review, this change is really simple.

Copy link
Member

@shipilev shipilev left a comment

Looks fine.

@tstuefe
Copy link
Member Author

tstuefe commented Dec 7, 2021

Thank you @shipilev .

/integrate

@openjdk
Copy link

openjdk bot commented Dec 7, 2021

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

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot closed this Dec 7, 2021
@openjdk openjdk bot added integrated Pull request has been integrated and removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Dec 7, 2021
@openjdk
Copy link

openjdk bot commented Dec 7, 2021

@tstuefe Pushed as commit 3536127.

💡 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-runtime hotspot-runtime-dev@openjdk.org integrated Pull request has been integrated
3 participants