[lworld] RFR: 8320296: [lworld] Fix profiling at array store subtype checks in Valhalla

Tobias Hartmann thartmann at openjdk.org
Fri Dec 15 12:50:12 UTC 2023


On Tue, 12 Dec 2023 08:59:52 GMT, Roland Westrelin <roland 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!

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

Marked as reviewed by thartmann (Committer).

PR Review: https://git.openjdk.org/valhalla/pull/962#pullrequestreview-1783895541



More information about the valhalla-dev mailing list