RFR: 8356946: x86: Optimize interpreter profile updates
    Aleksey Shipilev 
    shade at openjdk.org
       
    Wed May 14 09:53:01 UTC 2025
    
    
  
Noticed two awkward things in current x86 interpreter profiling code.
First, we carry the implementation for counter decrements without using them. This is dead code, and can be purged.
Second, we care about overflows for 64-bit for some reason. I think this is a reminiscent of 32-bit x86 support, where we can plausibly have 32-bit counter overflow in a reasonable timeframe. But for 64-bit counter, we need tens of years of constantly bashing the counter to get it to overflow. No other profile counter update code, e.g. in C1, cares about this.
So we can save a few instructions / memory accesses on this path. 
Additional testing:
 - [x] Linux x86_64 server fastdebug, `tier1`
 - [ ] Linux x86_64 server fastdebug, `all`
-------------
Commit messages:
 - Touchup
 - Fix
Changes: https://git.openjdk.org/jdk/pull/25223/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=25223&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8356946
  Stats: 40 lines in 2 files changed: 0 ins; 30 del; 10 mod
  Patch: https://git.openjdk.org/jdk/pull/25223.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/25223/head:pull/25223
PR: https://git.openjdk.org/jdk/pull/25223
    
    
More information about the hotspot-compiler-dev
mailing list