RFR: 8293011: riscv: Duplicated stubs to interpreter for static calls [v3]

Fei Yang fyang at openjdk.org
Wed Aug 31 09:11:08 UTC 2022


On Wed, 31 Aug 2022 05:21:44 GMT, Dingli Zhang <duke at openjdk.org> wrote:

>> Follow up [JDK-8280481](https://bugs.openjdk.org/browse/JDK-8280481).
>> Calls of Java methods have stubs to the interpreter for the cases when an invoked Java method is not compiled. Calls of static Java methods and final Java methods have statically bound information about a callee during compilation. C1 and C2 always generate a new stub for each call. As the generated stubs for calls of the same method are the same, they can be shared.
>> 
>> ## Testing:
>> 
>> - hotspot/jdk tier1 on unmatched board
>> - hotspot/jtreg/compiler/sharedstubs/SharedStubToInterpTest.java on qemu
>> 
>> 
>> ## Results
>> #### Results from [Renaissance 0.14.0](https://github.com/renaissance-benchmarks/renaissance/releases/tag/v0.14.0)
>> Note: 'Nmethods with shared stubs' is the total number of nmethods counted during benchmark's run. 'Final # of nmethods' is a number of nmethods in CodeCache when JVM exited.
>> 
>> - riscv64
>> 
>> +------------------+-------------+----------------------------+---------------------+
>> | Benchmark        | Saved bytes | Nmethods with shared stubs | Final # of nmethods |
>> +------------------+-------------+----------------------------+---------------------+
>> | dotty            |     1099488 |                       4483 |               12447 |
>> | dec-tree         |      511296 |                       2310 |               18583 |
>> | naive-bayes      |      358128 |                       1714 |                8677 |
>> | log-regression   |      365136 |                       1662 |               14626 |
>> | als              |      444576 |                       2107 |                8464 |
>> | finagle-chirper  |      265584 |                       1558 |               11003 |
>> | movie-lens       |      397776 |                       2106 |                6842 |
>> | finagle-http     |      160656 |                        974 |                7243 |
>> | page-rank        |      246672 |                       1261 |               10293 |
>> | chi-square       |      196080 |                        992 |                8841 |
>> | akka-uct         |      138672 |                        595 |                4564 |
>> | reactors         |       57552 |                        328 |                2338 |
>> | scala-stm-bench7 |       42122 |                        254 |                2261 |
>> | philosophers     |       45744 |                        241 |                1945 |
>> | scala-doku       |       48624 |                        213 |                 794 |
>> | rx-scrabble      |       46128 |                        271 |                1945 |
>> | future-genetic   |       37248 |                        234 |                1818 |
>> | scrabble         |       30384 |                        170 |                1628 |
>> | par-mnemonics    |       28176 |                        137 |                1317 |
>> +------------------+-------------+----------------------------+---------------------+
>
> Dingli Zhang has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains two commits:
> 
>  - Add missing copyright
>  - Port JDK-8280481 to RISC-V

Looks fine.

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

Marked as reviewed by fyang (Reviewer).

PR: https://git.openjdk.org/jdk/pull/10057


More information about the hotspot-compiler-dev mailing list