RFR: 8303852: current_stack_region() gets called twice unnecessarily [v3]

David Holmes dholmes at openjdk.org
Wed Aug 23 22:56:37 UTC 2023


On Wed, 23 Aug 2023 19:31:44 GMT, Patricio Chilano Mateo <pchilanomate at openjdk.org> wrote:

>> David Holmes has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Promote os::<os>::current_stack_region to os::current_stack_base_and_size
>
> Looks good to me.

Thanks for the review @pchilano and for catching those typos!

> src/hotspot/os/linux/os_linux.cpp line 5372:
> 
>> 5370: // ** P1 (aka bottom) and size are the address and stack size
>> 5371: //    returned from pthread_attr_getstack().
>> 5372: // ** P2 (aka stack top or base) = P1 - size)
> 
> Preexisting, but isn't P2 = P1 + size? Also an extra parenthesis was left at the end.

Good catch!

> src/hotspot/os_cpu/bsd_zero/os_bsd_zero.cpp line 192:
> 
>> 190: 
>> 191:   if (rslt != 0)
>> 192:     fatal("pthread_stackseg_np failed with error = %s", rslt);
> 
> %d

Fixed - thanks!

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

PR Comment: https://git.openjdk.org/jdk/pull/15321#issuecomment-1690745328
PR Review Comment: https://git.openjdk.org/jdk/pull/15321#discussion_r1303618308
PR Review Comment: https://git.openjdk.org/jdk/pull/15321#discussion_r1303617402


More information about the hotspot-dev mailing list