RFR: 8359104: gc/TestAlwaysPreTouchBehavior.java#<gcname> fails on Linux [v2]
Albert Mingkun Yang
ayang at openjdk.org
Thu Sep 11 13:02:08 UTC 2025
On Wed, 10 Sep 2025 14:32:01 GMT, Francesco Andreuzzi <fandreuzzi at openjdk.org> wrote:
>> Andreas Steiner has updated the pull request incrementally with one additional commit since the last revision:
>>
>> extend the accurate rss check
>
> src/hotspot/os/linux/os_linux.cpp line 2382:
>
>> 2380: info->rss = info->pss = info->pssdirty = info->pssanon =
>> 2381: info->pssfile = info->pssshmem = info->swap = info->swappss = -1;
>> 2382: if (f != nullptr) {
>
> You could consider inverting this check, and early-return `false` if `f==nullptr`. That would spare one indentation level
I agree; the null-check should be done right after `fopen` to early-return if sth is wrong.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27192#discussion_r2340739739
More information about the hotspot-dev
mailing list