On Thu, 24 Sep 2026 05:16:09 GMT, David Holmes <[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);
}
-------------
PR Comment: https://git.openjdk.org/jdk/pull/33047#issuecomment-5809461476