RFR: 8332587: RISC-V: secondary_super_cache does not scale well
Gui Cao
gcao at openjdk.org
Mon Jun 3 06:47:10 UTC 2024
Implementation of subtype checking [JDK-8180450](https://bugs.openjdk.org/browse/JDK-8180450) for linux-riscv64.
By the way, This optimization depends on availability of the Zbb extension which has the cpop instruction.
### Correctness testing:
- [x] Run tier1-3, hotspot:tier4 tests on SOPHON SG2042 (release)
- [x] Run tier1-3 tests with -XX:+UseRVV on qemu 8.1.0 (fastdebug)
- [x] Run all of tier1 with `-XX:+VerifySecondarySupers`
### JMH tested on Banana Pi BPI-F3 board (has Zbb) and Enable UseZbb:
Original:
Benchmark Mode Cnt Score Error Units
SecondarySuperCacheHits.test avgt 15 11.375 ± 0.071 ns/op
SecondarySuperCacheInterContention.test avgt 15 646.087 ± 32.587 ns/op
SecondarySuperCacheInterContention.test:t1 avgt 15 600.090 ± 83.779 ns/op
SecondarySuperCacheInterContention.test:t2 avgt 15 692.084 ± 73.218 ns/op
SecondarySupersLookup.testNegative00 avgt 15 16.420 ± 0.239 ns/op
SecondarySupersLookup.testNegative01 avgt 15 18.307 ± 0.260 ns/op
SecondarySupersLookup.testNegative02 avgt 15 21.695 ± 0.458 ns/op
SecondarySupersLookup.testNegative03 avgt 15 24.855 ± 0.664 ns/op
SecondarySupersLookup.testNegative04 avgt 15 27.305 ± 0.522 ns/op
SecondarySupersLookup.testNegative05 avgt 15 29.719 ± 0.385 ns/op
SecondarySupersLookup.testNegative06 avgt 15 32.231 ± 0.498 ns/op
SecondarySupersLookup.testNegative07 avgt 15 33.747 ± 0.603 ns/op
SecondarySupersLookup.testNegative08 avgt 15 35.856 ± 0.629 ns/op
SecondarySupersLookup.testNegative09 avgt 15 37.077 ± 0.546 ns/op
SecondarySupersLookup.testNegative10 avgt 15 39.408 ± 0.465 ns/op
SecondarySupersLookup.testNegative16 avgt 15 51.041 ± 0.547 ns/op
SecondarySupersLookup.testNegative20 avgt 15 58.722 ± 0.922 ns/op
SecondarySupersLookup.testNegative30 avgt 15 77.310 ± 0.654 ns/op
SecondarySupersLookup.testNegative32 avgt 15 81.116 ± 0.854 ns/op
SecondarySupersLookup.testNegative40 avgt 15 96.311 ± 0.840 ns/op
SecondarySupersLookup.testNegative50 avgt 15 115.427 ± 0.838 ns/op
SecondarySupersLookup.testNegative55 avgt 15 124.371 ± 1.076 ns/op
SecondarySupersLookup.testNegative56 avgt 15 126.796 ± 0.916 ns/op
SecondarySupersLookup.testNegative57 avgt 15 127.952 ± 1.202 ns/op
SecondarySupersLookup.testNegative58 avgt 15 131.956 ± 4.515 ns/op
SecondarySupersLookup.testNegative59 avgt 15 131.858 ± 1.066 ns/op
SecondarySupersLookup.testNegative60 avgt 15 134.294 ± 0.888 ns/op
SecondarySupersLookup.testNegative61 avgt 15 135.462 ± 1.037 ns/op
SecondarySupersLookup.testNegative62 avgt 15 137.805 ± 0.999 ns/op
SecondarySupersLookup.testNegative63 avgt 15 139.335 ± 1.164 ns/op
SecondarySupersLookup.testNegative64 avgt 15 141.401 ± 0.947 ns/op
SecondarySupersLookup.testPositive01 avgt 15 10.731 ± 0.152 ns/op
SecondarySupersLookup.testPositive02 avgt 15 10.726 ± 0.142 ns/op
SecondarySupersLookup.testPositive03 avgt 15 10.728 ± 0.145 ns/op
SecondarySupersLookup.testPositive04 avgt 15 10.730 ± 0.149 ns/op
SecondarySupersLookup.testPositive05 avgt 15 10.730 ± 0.151 ns/op
SecondarySupersLookup.testPositive06 avgt 15 10.730 ± 0.150 ns/op
SecondarySupersLookup.testPositive07 avgt 15 10.731 ± 0.148 ns/op
SecondarySupersLookup.testPositive08 avgt 15 10.730 ± 0.150 ns/op
SecondarySupersLookup.testPositive09 avgt 15 10.730 ± 0.151 ns/op
SecondarySupersLookup.testPositive10 avgt 15 10.734 ± 0.156 ns/op
SecondarySupersLookup.testPositive16 avgt 15 10.742 ± 0.160 ns/op
SecondarySupersLookup.testPositive20 avgt 15 10.730 ± 0.150 ns/op
SecondarySupersLookup.testPositive30 avgt 15 10.735 ± 0.156 ns/op
SecondarySupersLookup.testPositive32 avgt 15 10.731 ± 0.147 ns/op
SecondarySupersLookup.testPositive40 avgt 15 10.744 ± 0.179 ns/op
SecondarySupersLookup.testPositive50 avgt 15 10.733 ± 0.152 ns/op
SecondarySupersLookup.testPositive60 avgt 15 10.748 ± 0.189 ns/op
SecondarySupersLookup.testPositive63 avgt 15 10.726 ± 0.142 ns/op
SecondarySupersLookup.testPositive64 avgt 15 10.733 ± 0.155 ns/op
TypePollution.instanceOfInterfaceSwitchLinearNoSCC avgt 12 51592.312 ± 6662.713 ns/op
TypePollution.instanceOfInterfaceSwitchLinearSCC avgt 12 50294.723 ± 371.807 ns/op
TypePollution.instanceOfInterfaceSwitchTableNoSCC avgt 12 53752.017 ± 346.287 ns/op
TypePollution.instanceOfInterfaceSwitchTableSCC avgt 12 50053.321 ± 642.562 ns/op
TypePollution.parallelInstanceOfInterfaceSwitchLinearNoSCC avgt 12 1830.935 ± 262.496 ms/op
TypePollution.parallelInstanceOfInterfaceSwitchLinearSCC avgt 12 1745.503 ± 201.047 ms/op
TypePollution.parallelInstanceOfInterfaceSwitchTableNoSCC avgt 12 1794.322 ± 283.656 ms/op
TypePollution.parallelInstanceOfInterfaceSwitchTableSCC avgt 12 1808.875 ± 235.126 ms/op
With patch:
Benchmark Mode Cnt Score Error Units
SecondarySuperCacheHits.test avgt 15 11.382 ± 0.027 ns/op
SecondarySuperCacheInterContention.test avgt 15 621.291 ± 40.619 ns/op
SecondarySuperCacheInterContention.test:t1 avgt 15 635.382 ± 58.347 ns/op
SecondarySuperCacheInterContention.test:t2 avgt 15 607.200 ± 65.490 ns/op
SecondarySupersLookup.testNegative00 avgt 15 13.275 ± 0.223 ns/op
SecondarySupersLookup.testNegative01 avgt 15 13.264 ± 0.201 ns/op
SecondarySupersLookup.testNegative02 avgt 15 13.261 ± 0.194 ns/op
SecondarySupersLookup.testNegative03 avgt 15 13.271 ± 0.210 ns/op
SecondarySupersLookup.testNegative04 avgt 15 13.265 ± 0.201 ns/op
SecondarySupersLookup.testNegative05 avgt 15 13.258 ± 0.191 ns/op
SecondarySupersLookup.testNegative06 avgt 15 13.280 ± 0.225 ns/op
SecondarySupersLookup.testNegative07 avgt 15 13.268 ± 0.201 ns/op
SecondarySupersLookup.testNegative08 avgt 15 13.266 ± 0.202 ns/op
SecondarySupersLookup.testNegative09 avgt 15 13.261 ± 0.196 ns/op
SecondarySupersLookup.testNegative10 avgt 15 13.268 ± 0.198 ns/op
SecondarySupersLookup.testNegative16 avgt 15 13.268 ± 0.205 ns/op
SecondarySupersLookup.testNegative20 avgt 15 13.284 ± 0.231 ns/op
SecondarySupersLookup.testNegative30 avgt 15 13.281 ± 0.226 ns/op
SecondarySupersLookup.testNegative32 avgt 15 13.273 ± 0.215 ns/op
SecondarySupersLookup.testNegative40 avgt 15 13.287 ± 0.233 ns/op
SecondarySupersLookup.testNegative50 avgt 15 13.292 ± 0.242 ns/op
SecondarySupersLookup.testNegative55 avgt 15 53.064 ± 0.757 ns/op
SecondarySupersLookup.testNegative56 avgt 15 53.052 ± 0.767 ns/op
SecondarySupersLookup.testNegative57 avgt 15 53.068 ± 0.803 ns/op
SecondarySupersLookup.testNegative58 avgt 15 53.076 ± 0.776 ns/op
SecondarySupersLookup.testNegative59 avgt 15 53.095 ± 0.846 ns/op
SecondarySupersLookup.testNegative60 avgt 15 75.106 ± 1.033 ns/op
SecondarySupersLookup.testNegative61 avgt 15 76.832 ± 4.047 ns/op
SecondarySupersLookup.testNegative62 avgt 15 75.085 ± 1.010 ns/op
SecondarySupersLookup.testNegative63 avgt 15 153.709 ± 0.893 ns/op
SecondarySupersLookup.testNegative64 avgt 15 155.623 ± 0.922 ns/op
SecondarySupersLookup.testPositive01 avgt 15 10.727 ± 0.145 ns/op
SecondarySupersLookup.testPositive02 avgt 15 10.734 ± 0.157 ns/op
SecondarySupersLookup.testPositive03 avgt 15 10.731 ± 0.151 ns/op
SecondarySupersLookup.testPositive04 avgt 15 10.733 ± 0.156 ns/op
SecondarySupersLookup.testPositive05 avgt 15 10.742 ± 0.168 ns/op
SecondarySupersLookup.testPositive06 avgt 15 10.729 ± 0.148 ns/op
SecondarySupersLookup.testPositive07 avgt 15 10.738 ± 0.163 ns/op
SecondarySupersLookup.testPositive08 avgt 15 10.736 ± 0.159 ns/op
SecondarySupersLookup.testPositive09 avgt 15 10.735 ± 0.158 ns/op
SecondarySupersLookup.testPositive10 avgt 15 10.730 ± 0.150 ns/op
SecondarySupersLookup.testPositive16 avgt 15 10.734 ± 0.157 ns/op
SecondarySupersLookup.testPositive20 avgt 15 10.731 ± 0.149 ns/op
SecondarySupersLookup.testPositive30 avgt 15 10.733 ± 0.156 ns/op
SecondarySupersLookup.testPositive32 avgt 15 10.729 ± 0.149 ns/op
SecondarySupersLookup.testPositive40 avgt 15 10.732 ± 0.154 ns/op
SecondarySupersLookup.testPositive50 avgt 15 10.735 ± 0.154 ns/op
SecondarySupersLookup.testPositive60 avgt 15 10.736 ± 0.157 ns/op
SecondarySupersLookup.testPositive63 avgt 15 10.733 ± 0.155 ns/op
SecondarySupersLookup.testPositive64 avgt 15 10.729 ± 0.149 ns/op
TypePollution.instanceOfInterfaceSwitchLinearNoSCC avgt 12 52942.830 ± 851.030 ns/op
TypePollution.instanceOfInterfaceSwitchLinearSCC avgt 12 49901.169 ± 663.837 ns/op
TypePollution.instanceOfInterfaceSwitchTableNoSCC avgt 12 41443.364 ± 1045.602 ns/op
TypePollution.instanceOfInterfaceSwitchTableSCC avgt 12 38050.773 ± 1301.636 ns/op
TypePollution.parallelInstanceOfInterfaceSwitchLinearNoSCC avgt 12 1634.976 ± 5.730 ms/op
TypePollution.parallelInstanceOfInterfaceSwitchLinearSCC avgt 12 1613.755 ± 199.612 ms/op
TypePollution.parallelInstanceOfInterfaceSwitchTableNoSCC avgt 12 1979.354 ± 207.235 ms/op
TypePollution.parallelInstanceOfInterfaceSwitchTableSCC avgt 12 1525.198 ± 167.922 ms/op
-------------
Commit messages:
- Merge remote-tracking branch 'upstream/master' into JDK-8332587
- Fix client VM build
- Merge remote-tracking branch 'upstream/master' into JDK-8332587
- 8332587: RISC-V: secondary_super_cache does not scale well
Changes: https://git.openjdk.org/jdk/pull/19320/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=19320&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8332587
Stats: 370 lines in 6 files changed: 370 ins; 0 del; 0 mod
Patch: https://git.openjdk.org/jdk/pull/19320.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/19320/head:pull/19320
PR: https://git.openjdk.org/jdk/pull/19320
More information about the hotspot-dev
mailing list