LogCompilation suggestion: output system locale
Chris Newland
cnewland at chrisnewland.com
Thu Sep 10 09:07:57 UTC 2015
Hi,
It would be useful for JITWatch to know the system locale when the HotSpot
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 method
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()
More information about the hotspot-dev
mailing list