RFR: 8253717: Relocate stack overflow code out of thread.hpp/cpp [v5]
Thomas Stuefe
stuefe at openjdk.java.net
Wed Oct 7 18:25:19 UTC 2020
On Wed, 7 Oct 2020 15:22:31 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
>> This change moves the significant amount of stack overflow related code (with ascii art!) out of thread files into a
>> new file. Many of the functions are static functions and some go through JavaThread::_stack_overflow_state where
>> needed. All functions are moved and not modified except for qualification. I also added a delegating constructor to
>> JavaThread::JavaThread so reordered the assignments as initializers from JavaThread::initialize.
>> Tested with tier1-6 and builds on arm32, ppc, s390 and zero.
>
> Coleen Phillimore has updated the pull request incrementally with one additional commit since the last revision:
>
> Added some const to StackOverflow declarations
One small nit, otherwise okay.
src/hotspot/share/runtime/stackOverflow.cpp line 38:
> 36: size_t StackOverflow::_stack_shadow_zone_size = 0;
> 37:
> 38: void StackOverflow::initialize_stack_zone_sizes(size_t alignment) {
I think you can remove the parameter and hard-code 4K inside this function. The reason is that the "StackXXXPages"
parameters are defined as "number of 4k units", not "number of pages".
-------------
Changes requested by stuefe (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/522
More information about the hotspot-dev
mailing list