[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-hotspot-dev
Subject:    LogCompilation suggestion: output system locale
From:       "Chris Newland" <cnewland () chrisnewland ! com>
Date:       2015-09-10 9:07:57
Message-ID: 49fb1d245d3c1f113d85dff4832a7af2.squirrel () excalibur ! xssl ! net
[Download RAW message or body]

Hi,

It would be useful for JITWatch to know the system locale when the HotSpo=
t
log was output in order to parse some of the numeric values (stamp
attribute etc.).

Would you consider this patch to output the locale inside the <vm_version=
>
log header tag?

Kind regards,

Chris

diff -r 4142c190cd5c src/share/vm/utilities/ostream.cpp
--- a/src/share/vm/utilities/ostream.cpp	Thu Sep 03 16:14:02 2015 -0700
+++ b/src/share/vm/utilities/ostream.cpp	Thu Sep 10 09:54:29 2015 +0100
@@ -35,6 +35,10 @@
 #include "utilities/top.hpp"
 #include "utilities/xmlstream.hpp"

+#include <locale.h>
+#include <locale>
+using namespace std;
+
 extern "C" void jio_print(const char* s); // Declarationtion of jvm meth=
od

 outputStream::outputStream(int width) {
@@ -957,6 +961,12 @@
     xs->tail("release");
     xs->head("info"); xs->text("%s",
VM_Version::internal_vm_info_string()); xs->cr();
     xs->tail("info");
+
+    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()




[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic