-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
8323795: jcmd Compiler.codecache should print total size of code cache #17445
Conversation
👋 Welcome back yyang! A progress list of the required criteria for merging this PR into |
Webrevs
|
Can you do next layout of output?:
|
src/hotspot/share/code/codeCache.cpp
Outdated
st->print_cr(" compilation=%s", CompileBroker::should_compile_new_jobs() ? | ||
"enabled" : Arguments::mode() == Arguments::_int ? | ||
"disabled (interpreter mode)" : | ||
"disabled (not enough contiguous free space left)"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you change the order of the compilation=
and the stopped_count=
output?
The title is confusing. Should it be something like "jcmd Compiler.codecache should print total size of code cache"? |
In the first commit, the ouput is confusing(CodeCache and Total CodeHeap) if SegmentedCodeCache is turned off, i.e.
So I made new change to
|
I am fine with last refactoring you did for different |
I agree with Vladimir, I'd prefer something like this:
|
Now it looks like
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, that looks good to me. I'll run testing and report back once it passed.
src/hotspot/share/code/codeCache.cpp
Outdated
"disabled (interpreter mode)" : | ||
"disabled (not enough contiguous free space left)", | ||
CompileBroker::get_total_compiler_stopped_count(), | ||
CompileBroker::get_total_compiler_restarted_count()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The indentation should be fixed.
@y1yang0 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 404 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/test/hotspot/jtreg/vmTestbase/vm/compiler/CodeCacheInfo/Test.java fails
stdout: [CodeHeap 'non-profiled nmethods': size=120032Kb used=3Kb max_used=3Kb free=120028Kb
bounds [0x0000000113a84000, 0x0000000113cf4000, 0x000000011afbc000]
CodeHeap 'profiled nmethods': size=120016Kb used=14Kb max_used=14Kb free=120001Kb
bounds [0x000000010bfbc000, 0x000000010c22c000, 0x00000001134f0000]
CodeHeap 'non-nmethods': size=5712Kb used=1752Kb max_used=1752Kb free=3959Kb
bounds [0x00000001134f0000, 0x0000000113760000, 0x0000000113a84000]
CodeCache: size=245760Kb, used=1769Kb, max_used=1769Kb, free=243988Kb
total_blobs=748, nmethods=15, adapters=651, full_count=0
Compilation: enabled, stopped_count=0, restarted_count=0
];
stderr: [java version "23-internal" 2024-09-17
Java(TM) SE Runtime Environment (fastdebug build 23-internal-2024-01-29-1002351.tobias.hartmann.jdk2)
Java HotSpot(TM) 64-Bit Server VM (fastdebug build 23-internal-2024-01-29-1002351.tobias.hartmann.jdk2, mixed mode, sharing)
]
exitValue = 0
java.lang.RuntimeException: '^(CodeHeap '[^']+': size=\\d+Kb used=\\d+Kb max_used=\\d+Kb free=\\d+Kb\\n bounds \\[0x[0-9a-f]+, 0x[0-9a-f]+, 0x[0-9a-f]+\\]\\n)+ total_blobs=\\d+ nmethods=\\d+ adapters=\\d+\\n compilation: enabled\\n' missing from stdout
at jdk.test.lib.process.OutputAnalyzer.stdoutShouldMatch(OutputAnalyzer.java:389)
at vm.compiler.CodeCacheInfo.Test.main(Test.java:78)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138)
at java.base/java.lang.Thread.run(Thread.java:1575)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The output looks fine to me now. I approve but it needs new round of testing.
/reviewers 2 |
I re-submitted testing and will report back once it passed. |
We have an internal test that relies on the jcmd output and fails with these changes. I'll try to figure out how to fix that test. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. I have the fix for the internal test ready.
Please do an integrate delegate (https://wiki.openjdk.org/display/SKARA/Pull+Request+Commands#PullRequestCommands-/integrate), so that I can push both changes at the same time. Thanks! |
Thanks for reviews @vnkozlov @TobiHartmann /integrate delegate |
@y1yang0 Integration of this pull request has been delegated and may be completed by any project committer using the /integrate pull request command. |
/integrate |
Going to push as commit 3742bc6.
Your commit was automatically rebased without conflicts. |
@TobiHartmann Pushed as commit 3742bc6. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
It's better to accumulates total size of used/free/size, for example
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/17445/head:pull/17445
$ git checkout pull/17445
Update a local copy of the PR:
$ git checkout pull/17445
$ git pull https://git.openjdk.org/jdk.git pull/17445/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 17445
View PR using the GUI difftool:
$ git pr show -t 17445
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/17445.diff
Webrev
Link to Webrev Comment