RFR: 8339299: C1 will miss type profile when inline final method [v4]
kuaiwei
duke at openjdk.org
Mon Sep 9 07:31:39 UTC 2024
> I found sometimes C1 will miss type profile and I tried to write a test to demonstrate it.
> It will happen with these conditions
> 1 It's a virtual call and the callee is a final method. So c1 will think it's static bound.
> 2 The interpreter never touch the callsite, so interpreter does not add type profile.
> 3 In c1 compilation, it will be inlined based on CHA.
> 4 In c2 compilation, the CHA is broken, but type profile is missing, so c2 can not inline it.
kuaiwei has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains four additional commits since the last revision:
- Merge branch 'master' of https://github.com/openjdk/jdk into c1_cha_type_profile
- Simplify should_profile_receiver_type
- Modify test case to use whitebox api
- 8339299: C1 will miss type profile when inline final method
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/20786/files
- new: https://git.openjdk.org/jdk/pull/20786/files/fc421c9a..8bd9ee11
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=20786&range=03
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=20786&range=02-03
Stats: 13336 lines in 512 files changed: 8175 ins; 2267 del; 2894 mod
Patch: https://git.openjdk.org/jdk/pull/20786.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/20786/head:pull/20786
PR: https://git.openjdk.org/jdk/pull/20786
More information about the hotspot-compiler-dev
mailing list