HotSpot is currently not treating non-static final fields as constants. I think -XX:+TrustFinalNonStaticFields
should fix the issue.
There's also the jdk.internal.vm.annotation.Stable
annotation which might help, but as its name implies, it can only be used for JDK classes. A quick hack to check if it helps as well would be to place your benchmark class in a standard package (e.g. java.lang
) and use --patch-module
to inject it into the base module when you run it.
For wrapper_obj_dse_inter_procedural
have you checked if this is really only an inlining problem (i.e. -XX:+PrintInlining
). If yes, can it be solved by tuning one of the InlineSmallCode
, MaxInlineSize
, FreqInlineSize
, MaxTrivialSize
?
Interesting why C2 is faster than GraalEE for cached_enum_values
?
Have you intentionally not shown the predictable_if_branch()
function?
GC Benchmarks
For the JIT benchmarks you measure "time/operation" and lower numbers are better. For the GC benchmarks you measure "operations/time" and higher is better but I haven't found this information in the write-up which can be confusing. Also it is unclear to me what "operations/time" really means for the different GC benchmarks. Maybe you could be more explicit there?