RFR: JDK-8284726: Print active locale settings in hs_err reports and in VM.info

Thomas Stuefe stuefe at openjdk.java.net
Tue Apr 26 11:55:49 UTC 2022


On Tue, 26 Apr 2022 05:57:58 GMT, David Holmes <dholmes at openjdk.org> wrote:

> Seems reasonable - though the macro processing seems overkill for such a short list. :)
> 

Hah, yes, originally I printed more LC variants, but cut down the list because probably nobody needs all of them.

> One query below.
> 
> Thanks, David

> src/hotspot/os/posix/os_posix.cpp line 575:
> 
>> 573:     const char* locale = setlocale(categories[i].c, NULL);
>> 574:     st->print_cr("%s=%s", categories[i].name,
>> 575:                  ((locale != NULL) ? locale : ""));
> 
> I can't see where the query version of setLocale is allowed to return NULL, but if it did isn't that different to being set to "" ?

"The return value is NULL if the request cannot be honored." linux manpage.
I can print "??" instead?

-------------

PR: https://git.openjdk.java.net/jdk/pull/8194


More information about the hotspot-dev mailing list