RFR: 8340141: C1: rework ciMethod::equals following 8338471 [v7]

Dean Long dlong at openjdk.org
Wed Oct 23 22:08:23 UTC 2024


On Wed, 16 Oct 2024 01:44:42 GMT, Dean Long <dlong at openjdk.org> wrote:

>> This PR changes ciMethod::equals() to a special-purpose debug helper method for the one place in C1 that uses it in an assert.  The reason why making it general purpose is difficult is because JVMTI can add and delete methods.   See the bug report and JDK-8338471 for more details.  I'm open to suggestions for a better name than equals_ignore_version().
>> 
>> An alternative approach, which I think may actually be better, would be to check for old methods first, and bail out if we see any.  Then we can change the assert back to how it was originally, using ==.
>
> Dean Long has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains eight commits:
> 
>  - remove blank line
>  - Merge master
>  - bail out on old methods
>  - redo VM state
>  - fix errors
>  - make sure to be in VM state when checking is_old
>  - simplification based on reviewer comments
>  - rename and restrict usage

I'm still working on this.  It's surprisingly tricky to add new bailout failure points.  We also have to add new bailout check locations so we don't try to continue while in an inconsistent state (same issues as exception handling).
I'm simulating redefined methods randomly (similar to C2 StressBailout and fail_randomly()) to stress test it.

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

PR Comment: https://git.openjdk.org/jdk/pull/21148#issuecomment-2420337538


More information about the hotspot-compiler-dev mailing list