RFR: 8350852: Implement JMH benchmark for sparse CodeCache [v2]

Evgeny Astigeevich eastigeevich at openjdk.org
Fri Mar 28 20:23:16 UTC 2025


On Tue, 25 Mar 2025 02:30:24 GMT, Boris Ulasevich <bulasevich at openjdk.org> wrote:

>> Evgeny Astigeevich has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Separate active methods and method calling them with 128Mb dummy space
>
> The results cover different AARCH Neoverse implementations. All three CPUs show performance degradation as sparsity increases (i.e., as groupCount grows). This seems to be a common feature of the Neoverse V2 architecture. Azure Cobalt also degrades more sharply as the number of active methods increases.
> 
> This table, along with earlier measurements, highlights the significant impact of code sparsity across a wide range of platforms. Typically, calling distant methods - rather than those grouped closely together - results in a slowdown of approximately 20%.
> 
> SparseCodeCache |   | G4 |   | Azure Cobalt |   | Google Axion |  
> -- | -- | -- | -- | -- | -- | -- | --
> activeMethodCount | groupCount | us/op | ± | us/op | ± | us/op | ±
> 128 | 1 | 11.972 | 0.004 | 11.092 | 0.007 | 11.201 | 0.059
> 128 | 32 | 13.622 | 0.092 | 15.808 | 0.779 | 11.928 | 0.013
> 128 | 48 | 13.217 | 0.072 | 15.937 | 0.498 | 12.126 | 0.009
> 128 | 64 | 13.668 | 0.04 | 16.137 | 0.517 | 12.171 | 0.139
> 128 | 80 | 13.986 | 0.127 | 17.681 | 0.262 | 12.525 | 0.033
> 128 | 96 | 14.594 | 0.055 | 18.25 | 0.795 | 12.979 | 0.051
> 128 | 112 | 14.77 | 0.078 | 18.529 | 1.004 | 13.129 | 0.049
> 256 | 1 | 23.998 | 0.019 | 22.417 | 0.006 | 22.409 | 0.003
> 256 | 32 | 26.273 | 0.036 | 33.329 | 0.949 | 25.097 | 0.043
> 256 | 48 | 26.61 | 0.063 | 34.566 | 0.343 | 24.771 | 0.118
> 256 | 64 | 26.959 | 0.085 | 35.953 | 0.456 | 24.443 | 0.028
> 256 | 80 | 27.646 | 0.089 | 38.569 | 4.495 | 25.245 | 0.027
> 256 | 96 | 27.829 | 0.128 | 37.749 | 0.991 | 25.536 | 0.031
> 256 | 112 | 28.298 | 0.064 | 40.261 | 0.155 | 25.787 | 0.016
> 512 | 1 | 48.181 | 0.032 | 68.768 | 0.537 | 44.863 | 0.004
> 512 | 32 | 53.157 | 0.044 | 94.262 | 2.801 | 50.037 | 0.038
> 512 | 48 | 55.13 | 0.052 | 106.928 | 3.513 | 54.611 | 0.044
> 512 | 64 | 56.609 | 0.123 | 103.403 | 0.708 | 53.906 | 0.039
> 512 | 80 | 57.146 | 0.091 | 112.929 | 2.522 | 52.923 | 0.081
> 512 | 96 | 59.038 | 0.092 | 141.291 | 2.346 | 56.018 | 0.054
> 512 | 112 | 60.647 | 0.331 | 137.491 | 11.441 | 56.705 | 0.117
> 768 | 1 | 77.086 | 0.402 | 138.572 | 2.444 | 68.464 | 0.056
> 768 | 32 | 89.599 | 0.14 | 159.353 | 4.639 | 94.478 | 1.129
> 768 | 48 | 94.312 | 0.33 | 177.518 | 1.728 | 99.704 | 0.131
> 768 | 64 | 94.243 | 0.218 | 182.263 | 2.634 | 90.027 | 0.19
> 768 | 80 | 95.566 | 0.068 | 185.748 | 32.128 | 96.61 | 0.157
> 768 | 96 | 99.435 | 0.323 | 195.603 | 13.653 | 102.222 | 0.027
> 768 | 112 | 105.814 | 0.366 | 216.653 | 1.694 | 103.918 | 0.497
> 1024 | 1 | 110.407 | 1.27 | 203.428 | 2.049 | 97.032 | 0.739
> 1024 | 32 | 137...

@bulasevich, I reduced a number of values for the parameters and documented assumptions.

@vnkozlov, could you please reapprove? No changes are made in the main code.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/23831#issuecomment-2762364033


More information about the hotspot-compiler-dev mailing list