RFR: JDK-8317683: Add JIT memory statistics [v2]
Thomas Stuefe
stuefe at openjdk.org
Fri Oct 13 10:16:07 UTC 2023
On Wed, 11 Oct 2023 12:25:54 GMT, Andrew Dinn <adinn at openjdk.org> wrote:
>> Thomas Stuefe has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains two commits:
>>
>> - Feedback Vladimir
>> - Compilation memory statistic
>
> Also, I know it is not currently an option to specify enum values for cflag types but it would be more coherent from a user perspective if there was one compiler directive with 3 possible values
>
> MemStat = Off*/Collect/Print *=default
Hi @adinn and @vnkozlov ,
I followed Andrew's advice and reworked the command once more. Now we have a just single command called "memstat". It has two valid values, "compile" and "print". The value can be left out for convenience, so that means "collect".
So:
`-XX:CompileCommand=memstat,*.*` synonymous with `-XX:CompileCommand=memstat,*.*,collect` : collects but does not print
`-XX:CompileCommand=memstat,*.*,print` does print
The option itself is an int. That fits nicely into the enum-ish shape. I think some future improvement could generalize that idea into a general enum-value-string-to-int converter.
This was a bit tricky because of the templatized nature of the value. I wish we had just a normal C-like union, this code would be a lot simple :-/
Does this look okay?
-------------
PR Comment: https://git.openjdk.org/jdk/pull/16076#issuecomment-1761263754
More information about the hotspot-compiler-dev
mailing list