RFR: 8280152: AArch64: Reuse runtime call trampolines in C2
    Evgeny Astigeevich 
    duke at openjdk.org
       
    Thu Jul  7 12:48:51 UTC 2022
    
    
  
On Thu, 7 Jul 2022 04:10:57 GMT, Yi-Fan Tsai <duke at openjdk.org> wrote:
> A trampoline stub could be generated for each runtime call. These trampolines could be duplication if the callees are the same. This change delays the stub generation and generates one stub for a distinct callee.
> 
> Benchmark als, chi-square, dec-tree, gauss-mix, log-regression, movie-lens, naive-bayes, page-rank, fj-means, reactors, future-genetic, mnemonics, dotty, scala-kmeans, and finagle-http in Renaissance (0.14.1) are tested. The sum of the used size of CodeHeap 'non-profiled nmethods' and CodeHeap 'profiled nmethods' shows ~4.7% reduction on average.
Changes requested by eastig at github.com (no known OpenJDK username).
src/hotspot/cpu/aarch64/codeBuffer_aarch64.cpp line 29:
> 27: #include "asm/macroAssembler.hpp"
> 28: 
> 29: void CodeBuffer::shared_stub_to_runtime_for(address dest, int caller_offset) {
We create shared trampolines. I recommend to use `shared_trampoline_for` instead.
src/hotspot/cpu/aarch64/codeBuffer_aarch64.hpp line 30:
> 28: 
> 29: public:
> 30:   class SharedStubToRuntimeCallRequest {
Please rename to `SharedTrampolineRequest`.
src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp line 651:
> 649: #endif
> 650:     if (!in_scratch_emit_size) {
> 651:       if (CodeBuffer::supports_shared_stubs() && entry.rspec().type() == relocInfo::runtime_call_type) {
No need for `CodeBuffer::supports_shared_stubs()` because we know we have an implementation.
Please convert it to `assert`.
-------------
PR: https://git.openjdk.org/jdk/pull/9405
    
    
More information about the hotspot-dev
mailing list