RFR: 8323795: jcmd Compiler.codecache should print total size of code cache [v4]
Tobias Hartmann
thartmann at openjdk.org
Mon Jan 29 10:28:37 UTC 2024
On Mon, 22 Jan 2024 09:43:52 GMT, Yi Yang <yyang at openjdk.org> wrote:
>> CodeHeap 'non-profiled nmethods': size=118592Kb used=29Kb max_used=29Kb free=118562Kb
>> bounds [0x00007fbe84622000, 0x00007fbe84892000, 0x00007fbe8b9f2000]
>> CodeHeap 'profiled nmethods': size=118588Kb used=80Kb max_used=80Kb free=118507Kb
>> bounds [0x00007fbe7c9f2000, 0x00007fbe7cc62000, 0x00007fbe83dc1000]
>> CodeHeap 'non-nmethods': size=8580Kb used=1258Kb max_used=1834Kb free=7321Kb
>> bounds [0x00007fbe83dc1000, 0x00007fbe84031000, 0x00007fbe84622000]
>> total_blobs=474 nmethods=87 adapters=293
>> compilation: enabled
>> stopped_count=0, restarted_count=0
>> full_count=0
>>
>>
>> It's better to accumulates total size of used/free/size, for example
>>
>> -SegmentedCodeCache
>> CodeCache: size=245760Kb used=1366Kb max_used=1943Kb free=244393Kb
>> bounds [0x00007fdcc89f2000, 0x00007fdcc8c62000, 0x00007fdcd79f2000]
>> total_blobs=474, nmethods=87, adapters=293
>> stopped_count=0, restarted_count=0, full_count=0
>> compilation=enabled
>>
>>
>>
>> +SegmentedCodeCache
>> CodeHeap 'non-profiled nmethods': size=118592Kb used=29Kb max_used=29Kb free=118562Kb
>> bounds [0x00007f89c8622000, 0x00007f89c8892000, 0x00007f89cf9f2000]
>> CodeHeap 'profiled nmethods': size=118588Kb used=80Kb max_used=80Kb free=118507Kb
>> bounds [0x00007f89c09f2000, 0x00007f89c0c62000, 0x00007f89c7dc1000]
>> CodeHeap 'non-nmethods': size=8580Kb used=1258Kb max_used=1834Kb free=7321Kb
>> bounds [0x00007f89c7dc1000, 0x00007f89c8031000, 0x00007f89c8622000]
>> CodeCache: size=245760Kb, used=1367Kb, max_used=1943Kb, free=244390Kb
>> total_blobs=474, nmethods=87, adapters=293
>> stopped_count=0, restarted_count=0, full_count=0
>> compilation=enabled
>
> Yi Yang has updated the pull request incrementally with one additional commit since the last revision:
>
> whitespace
`/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)
-------------
Changes requested by thartmann (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/17445#pullrequestreview-1848331584
More information about the hotspot-compiler-dev
mailing list