LogCompilation suggestion: output locale

Chris Newland cnewland at chrisnewland.com
Thu Oct 29 09:36:40 UTC 2015


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,


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->head("info"); xs->text("%s",
VM_Version::internal_vm_info_string()); xs->cr();
+    std::locale l("");
+    xs->head("locale"); xs->text("%s", l.name().c_str()); xs->cr();
+    xs->tail("locale");
     // Record information about the command-line invocation.
     xs->head("vm_arguments");  // Cf. Arguments::print_on()

More information about the hotspot-compiler-dev mailing list