RFR: 8229147: Linux os::create_thread() overcounts guardpage size with newer glibc (>=2.27)
David Holmes
dholmes at openjdk.org
Sun Apr 23 01:49:56 UTC 2023
On Sat, 22 Apr 2023 14:00:07 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
>> Can we also assert the lifecycle for this flag is correct? E.g.:
>>
>>
>> private:
>> static bool _init_adjust_...; // Maybe simpler name?
>> static bool _adjust_...;
>>
>> static void init_...() {
>> ...
>> _init_adjust_... = true;
>> }
>>
>> public:
>> static bool adjust_stacksize_for_guard_pages() {
>> assert(_init_adjust..., "Should be initialized");
>> return _adjust_...;
>> }
>
> I would it prefer if this switch were named like the behaviour we probe for, not the action that results from it. E.g. "_glibc_includes_guards_in_stack_size". Also makes it clearer that this is a glibc-only thing. And I agree with @shipilev that this looks like a flag. I sometimes prefix local globals with `g_`.
>
> But its up to you.
<sigh>
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13571#discussion_r1174490748
More information about the hotspot-runtime-dev
mailing list