Integrated: 8303852: current_stack_region() gets called twice unnecessarily
David Holmes
dholmes at openjdk.org
Wed Aug 23 22:56:38 UTC 2023
On Thu, 17 Aug 2023 02:45:54 GMT, David Holmes <dholmes at openjdk.org> wrote:
> We combine:
>
> address os::current_stack_base();
> size_t os::current_stack_size();
>
> into
>
> void os::current_stack_base_and_size(address* stack_base, size_t* stack_size)
>
> and so avoid making two underlying system calls. The os/platform specific specializations are handled by the `current_stack_region` calls. It made sense to modify that to export the `base` directly rather than the `bottom`. In doing that change it made sense to standardise on the the style of the code used (variable names etc) to make it easier to see where the 5 different versions were the same and where they differ. Having 5 versions is unfortunate ( 3 BSD: one per arch - zero, x64, aarch64; and 2 linux: zero and everything else), but trying to combine them with ifdefs would be even worse in my opinion.
>
> In theory there should be zero functional changes here.
>
> Testing:
> - Tiers 1-3
> - All our internal builds in tiers 1-5
> - GHA
>
> Thanks.
This pull request has now been integrated.
Changeset: 4a50e875
Author: David Holmes <dholmes at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/4a50e87592d76cf1ee315f47b4da1e1156cff7cf
Stats: 254 lines in 10 files changed: 33 ins; 118 del; 103 mod
8303852: current_stack_region() gets called twice unnecessarily
Reviewed-by: stuefe, pchilanomate
-------------
PR: https://git.openjdk.org/jdk/pull/15321
More information about the hotspot-dev
mailing list