RFR: 8303852: current_stack_region() gets called twice unnecessarily [v2]
David Holmes
dholmes at openjdk.org
Sun Aug 20 22:39:54 UTC 2023
> 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.
David Holmes has updated the pull request incrementally with two additional commits since the last revision:
- Excess newlines
- Add spaces around operator
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/15321/files
- new: https://git.openjdk.org/jdk/pull/15321/files/434fdb99..bc7a94ac
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=15321&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=15321&range=00-01
Stats: 3 lines in 2 files changed: 0 ins; 2 del; 1 mod
Patch: https://git.openjdk.org/jdk/pull/15321.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/15321/head:pull/15321
PR: https://git.openjdk.org/jdk/pull/15321
More information about the hotspot-dev
mailing list