On Thu, 24 Sep 2026 15:51:23 GMT, Chris Plummer <[email protected]> wrote:
>>> I'm a bit concerned that we will suddenly see warnings popping up during
>>> testing that were previously hidden. Someone will have to run this through
>>> all the SA tests in our CI to see if there is any negative affect
>>> (@plummercj ?).
>>
>> Agree. I tested it and passed serviceability/sa tests on my Linux box, but
>> it is worth to test on other platforms.
>> Maybe it shouldn't be problems because warning message would printed onto
>> stdout.
>>
>>
>>> I'm also wondering whether the prefix should identify that it comes from
>>> the SA e.g. "Serviceability Agent Warning:" and "Serviceability Agent
>>> Error:" ?
>>
>> Currently debug log has a prefix ("libsaproc DEBUG: "), OTOH error log does
>> not have any prefix. I think error log should also have a prefix if warning
>> message has it.
>>
>>
>> void print_debug(const char* format,...) {
>> if (_libsaproc_debug) {
>> va_list alist;
>>
>> va_start(alist, format);
>> fputs("libsaproc DEBUG: ", stderr);
>> vfprintf(stderr, format, alist);
>> va_end(alist);
>> }
>> }
>>
>> void print_error(const char* format,...) {
>> va_list alist;
>> va_start(alist, format);
>> fputs("ERROR: ", stderr);
>> vfprintf(stderr, format, alist);
>> va_end(alist);
>> }
>
>> Maybe it shouldn't be problems because warning message would printed onto
>> stdout.
>
> Yes, that was the main point of print_warning. It prints on stdout, so it
> should not result in any test failures since they only complain if there is
> output on stderr. I'll try these changes out in our CI once Yasumasa is done.
>
>> Currently debug log has a prefix ("libsaproc DEBUG: "), OTOH error log does
>> not have any prefix. I think error log should also have a prefix if warning
>> message has it.
>
> I think "libsaproc DEBUG/ERROR/WARNING" is ok.
> @plummercj Could you try it on your CI?
It passes all my CI testing.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/33047#issuecomment-5834040420