[lworld] RFR: 8320296: [lworld] Fix profiling at array store subtype checks in Valhalla
Roland Westrelin
roland at openjdk.org
Fri Dec 15 14:40:07 UTC 2023
On Fri, 15 Dec 2023 12:47:09 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:
>> The issue is that the way valhalla collects profile data at `aastore` is different from what mainline does. It used to not matter because mainline didn't use part of the data it collects but that has changed. In mainline, no profile data is collected for `aaload` and every `aastore` has a `ReceiverTypeData` entry. In valhalla, `aaload` and `aastore` both make use of a `ArrayLoadStoreData` that's unrelated to `ReceiverTypeData`. What I propose to fix this is that `aaload` and `aastore` each have their own profile data structure: `ArrayLoadData` and `ArrayStoreData` . `ArrayLoadData` is identical to `ArrayLoadStoreData` so there's no change to profile collection code for `aaload`. `ArrayStoreData` is a subclass of `ReceiverTypeData` so profile data collection has to be adjusted. The reason for not having the same data structure for `aaload` and `aastore` is that it made fixing the profile collection code easier and increasing the number of types collected by `ReceiverTypeData` (if
we ever want to do that) would not cause a lot of unused data to be collected at `aaload`.
>
> Looks good to me. Thanks for taking care of this, Roland!
@TobiHartmann thanks for the review
-------------
PR Comment: https://git.openjdk.org/valhalla/pull/962#issuecomment-1857985215
More information about the valhalla-dev
mailing list