RFR: 8354920: SA core file support on Linux only prints error messages when debug logging is enabled [v2]
Kevin Walls
kevinw at openjdk.org
Tue Apr 22 09:31:54 UTC 2025
On Fri, 18 Apr 2025 09:30:24 GMT, Daniel Jeliński <djelinski at openjdk.org> wrote:
>> Currently if loading a core file fails, the diagnostic information provided on different systems is different; on MacOS we produce an error message, while on Linux we only print information if debug logging is enabled.
>>
>> This PR adds some new messages on Linux to match MacOSX, and changes some of the diagnostic output to error level instead of debug. Additionally, if opening the core or the exe file fails, the system error message (strerror) is printed.
>>
>> Tier1-3 testing clean.
>
> Daniel Jeliński has updated the pull request incrementally with eight additional commits since the last revision:
>
> - Update copyright
> - Add more error messages
> - Add more error messages
> - Add more error messages
> - Add more error messages
> - Add more error messages
> - Add more error messages
> - Add more error messages
src/jdk.hotspot.agent/linux/native/libsaproc/ps_proc.c line 450:
> 448: if ( (ph = (struct ps_prochandle*) calloc(1, sizeof(struct ps_prochandle))) == NULL) {
> 449: snprintf(err_buf, err_buf_len, "can't allocate memory for ps_prochandle");
> 450: print_error("%s\n", err_buf);
This might be one that would print it twice - the caller in LinuxDebuggerLocal.cpp will print what's in err_buf.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24722#discussion_r2053731498
More information about the serviceability-dev
mailing list