LogCompilation suggestion: output locale

Vladimir Kozlov vladimir.kozlov at oracle.com
Fri Nov 20 00:39:53 UTC 2015


On 11/3/15 5:44 AM, Chris Newland wrote:
> Hi Vladimir,
>
> Sorry if these are dumb questions:
>
> Do you mean that osstream.cpp should output (for example)
>
> user.language=en
> user.country=GB

I think by default it should be char encoding:

user.local=en.UTF8

But you can add any locale info you want in format you showed. But 
instead "user." use "locale."

>
> by default in the <properties> tag ?
>
> Currently this tag only contains what is set up in
> share/vm/runtime/arguments.cpp plus any properties set with -D.

As I said you can add new
<system_info>
</system_info>

Or better environment information: <env_info> </env_info>

>
> Is VM_Version::print_features() only implemented on sparc and ppc?

It implemented on all platforms:

http://hg.openjdk.java.net/jdk9/hs/hotspot/file/924ad9151e00/src/cpu/ppc/vm/vm_version_ppc.cpp#l293

Thanks,
Vladimir

>
> Having the CPU features and cache line size in the HotSpot log might be
> useful when examining the PrintAssembly :)
>
> Kind regards,
>
> Chris
>
> On Sun, November 1, 2015 02:18, Vladimir Kozlov wrote:
>> Or use existing <properties>.
>>
>>
>> We may need to print VM_Version::print_features() too.
>>
>>
>> Thanks,
>> Vladimir
>>
>>
>> On 11/1/15 10:12 AM, Vladimir Kozlov wrote:
>>
>>> I am fine with adding local information but consider adding new
>>> <system_info> header and add local into it. We may add more system
>>> properties later.
>>>
>>> Thanks,
>>> Vladimir
>>>
>>>
>>> On 10/29/15 5:36 PM, Chris Newland wrote:
>>>
>>>> Hi,
>>>>
>>>>
>>>> It would be useful for JITWatch to know the system locale when the
>>>> LogCompilation output was written in order to parse some of the
>>>> numeric values (stamp attribute etc.).
>>>>
>>>> Would you consider this patch (against tip of jigsaw/jake) to output
>>>> a <locale> tag inside the <vm_version> log header tag?
>>>>
>>>>
>>>> Kind regards,
>>>>
>>>>
>>>> Chris
>>>>
>>>>
>>>>
>>>> diff -r b96d0485a1a9 src/share/vm/utilities/ostream.cpp ---
>>>> a/src/share/vm/utilities/ostream.cpp    Wed Oct 21 13:21:33 2015 -0400
>>>>   +++ b/src/share/vm/utilities/ostream.cpp    Thu Oct 29 09:23:17 2015
>>>>   +0000
>>>> @@ -34,6 +34,8 @@
>>>> #include "utilities/ostream.hpp"
>>>> #include "utilities/top.hpp"
>>>> #include "utilities/xmlstream.hpp"
>>>> +#include <locale.h>
>>>> +#include <locale>
>>>>
>>>>
>>>> extern "C" void jio_print(const char* s); // Declarationtion of jvm
>>>> method
>>>>
>>>> @@ -957,6 +959,9 @@
>>>> xs->tail("release"); xs->head("info"); xs->text("%s",
>>>> VM_Version::internal_vm_info_string()); xs->cr();
>>>> xs->tail("info"); +    std::locale l("");
>>>> +    xs->head("locale"); xs->text("%s", l.name().c_str()); xs->cr();
>>>> +    xs->tail("locale");
>>>> xs->tail("vm_version"); // Record information about the command-line
>>>> invocation. xs->head("vm_arguments");  // Cf. Arguments::print_on()
>>>>
>>>>
>>
>
>


More information about the hotspot-compiler-dev mailing list