RFR: 8365256: RelocIterator should use indexes instead of pointers [v2]

Dean Long dlong at openjdk.org
Wed Aug 20 20:06:43 UTC 2025


On Mon, 18 Aug 2025 09:47:15 GMT, Johan Sjölen <jsjolen at openjdk.org> wrote:

>> Hi,
>> 
>> This PR replaces the `current` and `end` pointers with a `base` pointer alongside a `current` index and a `len`. This allows us to have `-1` as the initial value for current, while retaining `nullptr` as the 'dead' value for `_mutable_data`.
>> 
>> Performance testing shows no difference/performance improvements on DaCapo Linux x64. I don't think that these are actual improvements, but at least there are no clear regressions.
>> 
>> Testing: GHA
>
> Johan Sjölen has updated the pull request incrementally with two additional commits since the last revision:
> 
>  - Good catch by Vladimir
>  - Vladimir's comments

src/hotspot/share/code/relocInfo.hpp line 606:

> 604:   RelocIterator(CodeSection* cb, address begin = nullptr, address limit = nullptr);
> 605:   RelocIterator(CodeBlob* cb);
> 606:   RelocIterator(relocInfo& ri);

How about making this new ctor private?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26569#discussion_r2289179909


More information about the hotspot-compiler-dev mailing list