RFR: 8332587: RISC-V: secondary_super_cache does not scale well [v9]
Gui Cao
gcao at openjdk.org
Thu Jun 20 03:24:17 UTC 2024
On Thu, 20 Jun 2024 02:20:18 GMT, Fei Yang <fyang at openjdk.org> wrote:
>> Gui Cao has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Add population_count for scalar version
>
> src/hotspot/cpu/riscv/macroAssembler_riscv.cpp line 3635:
>
>> 3633: addi(dst, dst, 1);
>> 3634: mv(tmp2, tmp1);
>> 3635: addi(tmp2, tmp2, -1);
>
> Suggestion: `addi(tmp2, tmp1, -1);`. This help save the preceding `mv` instruction.
Thanks for the review. I've retested the JMH.
JMH tested on SOPHON SG2042 (has not Zbb)
with patch:
Benchmark Mode Cnt Score Error Units
SecondarySupersLookup.testNegative00 avgt 15 20.649 ± 0.147 ns/op
SecondarySupersLookup.testNegative01 avgt 15 20.649 ± 0.117 ns/op
SecondarySupersLookup.testNegative02 avgt 15 20.637 ± 0.116 ns/op
SecondarySupersLookup.testNegative03 avgt 15 20.638 ± 0.113 ns/op
SecondarySupersLookup.testNegative04 avgt 15 20.638 ± 0.127 ns/op
SecondarySupersLookup.testNegative05 avgt 15 20.639 ± 0.115 ns/op
SecondarySupersLookup.testNegative06 avgt 15 20.638 ± 0.119 ns/op
SecondarySupersLookup.testNegative07 avgt 15 20.850 ± 0.457 ns/op
SecondarySupersLookup.testNegative08 avgt 15 20.842 ± 0.459 ns/op
SecondarySupersLookup.testNegative09 avgt 15 20.650 ± 0.124 ns/op
SecondarySupersLookup.testNegative10 avgt 15 20.642 ± 0.127 ns/op
SecondarySupersLookup.testNegative16 avgt 15 20.657 ± 0.157 ns/op
SecondarySupersLookup.testNegative20 avgt 15 20.669 ± 0.152 ns/op
SecondarySupersLookup.testNegative30 avgt 15 20.668 ± 0.166 ns/op
SecondarySupersLookup.testNegative32 avgt 15 20.669 ± 0.168 ns/op
SecondarySupersLookup.testNegative40 avgt 15 20.668 ± 0.174 ns/op
SecondarySupersLookup.testNegative50 avgt 15 20.682 ± 0.194 ns/op
SecondarySupersLookup.testNegative55 avgt 15 113.369 ± 3.792 ns/op
SecondarySupersLookup.testNegative56 avgt 15 113.888 ± 3.769 ns/op
SecondarySupersLookup.testNegative57 avgt 15 115.320 ± 4.271 ns/op
SecondarySupersLookup.testNegative58 avgt 15 115.648 ± 2.985 ns/op
SecondarySupersLookup.testNegative59 avgt 15 117.730 ± 3.370 ns/op
SecondarySupersLookup.testNegative60 avgt 15 142.533 ± 3.636 ns/op
SecondarySupersLookup.testNegative61 avgt 15 144.901 ± 5.267 ns/op
SecondarySupersLookup.testNegative62 avgt 15 145.926 ± 3.799 ns/op
SecondarySupersLookup.testNegative63 avgt 15 207.704 ± 5.370 ns/op
SecondarySupersLookup.testNegative64 avgt 15 210.631 ± 3.832 ns/op
SecondarySupersLookup.testPositive01 avgt 15 20.334 ± 0.455 ns/op
SecondarySupersLookup.testPositive02 avgt 15 20.126 ± 0.101 ns/op
SecondarySupersLookup.testPositive03 avgt 15 20.126 ± 0.097 ns/op
SecondarySupersLookup.testPositive04 avgt 15 20.124 ± 0.102 ns/op
SecondarySupersLookup.testPositive05 avgt 15 20.119 ± 0.100 ns/op
SecondarySupersLookup.testPositive06 avgt 15 20.126 ± 0.098 ns/op
SecondarySupersLookup.testPositive07 avgt 15 20.321 ± 0.462 ns/op
SecondarySupersLookup.testPositive08 avgt 15 20.117 ± 0.098 ns/op
SecondarySupersLookup.testPositive09 avgt 15 20.534 ± 0.555 ns/op
SecondarySupersLookup.testPositive10 avgt 15 20.120 ± 0.100 ns/op
SecondarySupersLookup.testPositive16 avgt 15 20.125 ± 0.104 ns/op
SecondarySupersLookup.testPositive20 avgt 15 20.125 ± 0.116 ns/op
SecondarySupersLookup.testPositive30 avgt 15 20.132 ± 0.110 ns/op
SecondarySupersLookup.testPositive32 avgt 15 20.328 ± 0.449 ns/op
SecondarySupersLookup.testPositive40 avgt 15 20.132 ± 0.096 ns/op
SecondarySupersLookup.testPositive50 avgt 15 20.331 ± 0.460 ns/op
SecondarySupersLookup.testPositive60 avgt 15 20.134 ± 0.104 ns/op
SecondarySupersLookup.testPositive63 avgt 15 20.128 ± 0.104 ns/op
SecondarySupersLookup.testPositive64 avgt 15 20.334 ± 0.456 ns/op
Finished running test 'micro:vm.lang.SecondarySupersLookup'
The JMH test data is a little better than before, Thanks a lot.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/19320#discussion_r1646875539
More information about the hotspot-dev
mailing list