Skip to content

8307537: Print blobs/nmethods/adapters stats per code heap in CodeCache::print_summary#30803

Closed
eastig wants to merge 3 commits intoopenjdk:masterfrom
eastig:JDK-8307537
Closed

8307537: Print blobs/nmethods/adapters stats per code heap in CodeCache::print_summary#30803
eastig wants to merge 3 commits intoopenjdk:masterfrom
eastig:JDK-8307537

Conversation

@eastig
Copy link
Copy Markdown
Member

@eastig eastig commented Apr 17, 2026

This PR adds blobs/nmethods/adapters stats per code heap in CodeCahe::print_summary:

CodeHeap 'non-profiled nmethods': size=118592Kb used=370Kb max_used=370Kb free=118221Kb
 bounds [0x00007f2093d3a000, 0x00007f2093faa000, 0x00007f209b10a000]
 blobs=397, nmethods=397, adapters=0, full_count=0
CodeHeap 'profiled nmethods': size=118592Kb used=2134Kb max_used=2134Kb free=116457Kb
 bounds [0x00007f208c109000, 0x00007f208c379000, 0x00007f20934d9000]
 blobs=1091, nmethods=1091, adapters=0, full_count=0
CodeHeap 'non-nmethods': size=8580Kb used=4461Kb max_used=4506Kb free=4118Kb
 bounds [0x00007f20934d9000, 0x00007f2093949000, 0x00007f2093d3a000]
 blobs=478, nmethods=0, adapters=387, full_count=0
CodeCache: size=245764Kb, used=6965Kb, max_used=7010Kb, free=238796Kb
 total_blobs=1966, nmethods=1488, adapters=387, full_count=0
Compilation: enabled, stopped_count=0, restarted_count=0

This information is useful for debugging CodeCache.

Testing: fastdebug, tier1-tier2 passed.



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-8307537: Print blobs/nmethods/adapters stats per code heap in CodeCache::print_summary (Enhancement - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 30803

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

Using diff file

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

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link
Copy Markdown

bridgekeeper Bot commented Apr 17, 2026

👋 Welcome back eastigeevich! 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
Copy Markdown

openjdk Bot commented Apr 17, 2026

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

8307537: Print blobs/nmethods/adapters stats per code heap in CodeCache::print_summary

Reviewed-by: kvn, dfenacci

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 32 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 serviceability serviceability-dev@openjdk.org hotspot-compiler hotspot-compiler-dev@openjdk.org labels Apr 17, 2026
@openjdk
Copy link
Copy Markdown

openjdk Bot commented Apr 17, 2026

@eastig The following labels will be automatically applied to this pull request:

  • hotspot-compiler
  • serviceability

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.

@openjdk
Copy link
Copy Markdown

openjdk Bot commented Apr 17, 2026

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

@openjdk openjdk Bot added the rfr Pull request is ready for review label Apr 17, 2026
@mlbridge
Copy link
Copy Markdown

mlbridge Bot commented Apr 17, 2026

Webrevs

@eastig eastig changed the title 8307537: Print blobs/nmethods/adapters stats per code heap in CodeCahe::print_summary 8307537: Print blobs/nmethods/adapters stats per code heap in CodeCache::print_summary Apr 17, 2026
Copy link
Copy Markdown
Contributor

@vnkozlov vnkozlov left a comment

Choose a reason for hiding this comment

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

Good. One comment.

Comment thread src/hotspot/share/code/codeCache.cpp Outdated
st->print_cr(" size=" JULONG_FORMAT "Kb, used=" JULONG_FORMAT
"Kb, max_used=" JULONG_FORMAT "Kb, free=" JULONG_FORMAT "Kb",
total_size, total_used, total_max_used, total_free);
st->print_cr(" total_blobs=" UINT32_FORMAT ", nmethods=" UINT32_FORMAT
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.

Should we use ' ': total blobs since total relates to all counts in this line,

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Agree it is better to use ' '.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Done

p2i(heap->high()),
p2i(heap->high_boundary()));

full_count += get_codemem_full_count(heap->code_blob_type());
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.

Unfortunately get_codemem_full_count() is also used by JFR. Otherwise we could remove it.

@vnkozlov
Copy link
Copy Markdown
Contributor

Good. I submitted our testing.

Copy link
Copy Markdown
Contributor

@dafedafe dafedafe left a comment

Choose a reason for hiding this comment

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

Nice and useful addition to the CodeCache summary. Thanks @eastig for exposing the counts. LGTM

Copy link
Copy Markdown
Contributor

@vnkozlov vnkozlov left a comment

Choose a reason for hiding this comment

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

My testing passed. Good.

@openjdk openjdk Bot added the ready Pull request is ready to be integrated label Apr 20, 2026
@eastig
Copy link
Copy Markdown
Member Author

eastig commented Apr 21, 2026

@vnkozlov @dafedafe Thank you for reviewing.

@eastig
Copy link
Copy Markdown
Member Author

eastig commented Apr 21, 2026

/integrate

@openjdk
Copy link
Copy Markdown

openjdk Bot commented Apr 21, 2026

Going to push as commit 8353f2e.
Since your change was applied there have been 49 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 Apr 21, 2026
@openjdk openjdk Bot closed this Apr 21, 2026
@openjdk openjdk Bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Apr 21, 2026
@openjdk
Copy link
Copy Markdown

openjdk Bot commented Apr 21, 2026

@eastig Pushed as commit 8353f2e.

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

Development

Successfully merging this pull request may close these issues.

3 participants