RFR: 8364518: Support for Job Objects in os::commit_memory_limit() on Windows [v2]
Joel Sikström
jsikstro at openjdk.org
Mon Aug 4 07:40:12 UTC 2025
On Fri, 1 Aug 2025 15:46:19 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:
>> Joel Sikström has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Print error message if query fails
>
> src/hotspot/os/windows/os_windows.cpp line 3306:
>
>> 3304: if (!res) {
>> 3305: return SIZE_MAX;
>> 3306: }
>
> I wonder if it makes sense to print a warning or sth here.
Looking at how `QueryInformationJobObject` is used in `os::win32::active_processors_in_job_object()`, which is the only other place where it is called, we do this when querying fails:
char buf[512];
size_t buf_len = os::lasterror(buf, sizeof(buf));
warning("Attempt to query job object information failed: %s", buf_len != 0 ? buf : "<unknown error>");
I'll add this to the code to be consistent with hos `os::win32::active_processors_in_job_object()` works, but I'm open to new suggestions as well.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26593#discussion_r2250657359
More information about the hotspot-gc-dev
mailing list