RFR: 8253717: Relocate stack overflow code out of thread.hpp/cpp [v3]

Coleen Phillimore coleenp at openjdk.java.net
Wed Oct 7 11:44:12 UTC 2020


On Wed, 7 Oct 2020 06:03:20 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

>> Coleen Phillimore has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   fix comments
>
> src/hotspot/share/runtime/stackOverflow.hpp line 135:
> 
>> 133:     return _stack_red_zone_size;
>> 134:   }
>> 135:   static void set_stack_red_zone_size(size_t s) {
> 
> Could we merge these individual setters for set_xxx_zone_size() into one function:
> 
> static initialize_dimensions(size, size, ..)
> ?
> 
> Would make it clearer that these are not to be touched outside initialization.
> 
> That function also should live in the .cpp file.

I was focused primarily on moving the code not cleaning it up, which can come later.  That said, since I touched this
code and the caller, I took your suggestion and will add an initialize_stack_zone_sizes() and inlined the
set_stack_x_zone_size() functions in that.  This is better here.

> src/hotspot/share/runtime/stackOverflow.hpp line 1:
> 
>> 1: /*
> 
> There are a number of newline issues throughout this file. Mostly code too tight (newlines missing between method
> blocks) acc. to hotspot style guide.

Changing above to remove the set_*zone_size function added newlines, so this looks better now.

> src/hotspot/share/runtime/stackOverflow.hpp line 125:
> 
>> 123:   // These values are derived from flags StackRedPages, StackYellowPages,
>> 124:   // StackReservedPages and StackShadowPages. The zone size is determined
>> 125:   // ergonomically if page_size > 4K.
> 
> I think the last sentence is superfluous (the first says it all) and slightly wrong too.

Yes, fixed.

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

PR: https://git.openjdk.java.net/jdk/pull/522


More information about the hotspot-dev mailing list