RFR: 8253717: Relocate stack overflow code out of thread.hpp/cpp [v2]
Coleen Phillimore
coleenp at openjdk.java.net
Tue Oct 6 23:50:23 UTC 2020
On Tue, 6 Oct 2020 22:42:53 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> Coleen Phillimore has updated the pull request incrementally with one additional commit since the last revision:
>>
>> 8253717: Relocate stack overflow code out of thread.hpp/cpp
>
> src/hotspot/share/runtime/stackOverflow.hpp line 33:
>
>> 31: class JavaThread;
>> 32:
>> 33: class StackOverflow {
>
> Can we add a descriptive comment of what this class actually represents please - and the fact it is tied to JavaThreads
> only. Ideally this would be within the logical namespace of JavaThread so that it doesn't appear to be a
> standalone/independent entity. Also the name isn't quite right as it doesn't represent an actual stack-overflow but the
> protection/state mechanism around that - so perhaps StackOverflowState or StackOverflowProtection ?
I could rename it StackOverflowState but I'd rather not. Just StackOverflow looks better in the static names, and the
places where it refers to the state variables of JavaThread uses the stack_overflow_state() name.
The static names StackOverflow::stack_shadow_zone_size() for example look really nice in the code without any further
qualification.
How about this as a comment:
// StackOverflow handling is encapsulated in this class. This class contains state variables
// for each JavaThread that implement stack overflow checking and guard page implementation.
-------------
PR: https://git.openjdk.java.net/jdk/pull/522
More information about the hotspot-dev
mailing list