--- a/hotspot/src/share/vm/runtime/arguments.cpp Wed Sep 23 22:04:23 2015 +0300
+++ b/hotspot/src/share/vm/runtime/arguments.cpp Thu Sep 24 12:36:04 2015 +0200
@@ -32,6 +32,7 @@
#include "gc/shared/genCollectedHeap.hpp"
#include "gc/shared/referenceProcessor.hpp"
#include "gc/shared/taskqueue.hpp"
+#include "logging/logConfiguration.hpp"
#include "memory/allocation.inline.hpp"
#include "memory/universe.inline.hpp"
#include "oops/oop.inline.hpp"
@@ -3190,6 +3191,26 @@
if (FLAG_SET_CMDLINE(bool, PrintGCTimeStamps, true) != Flag::SUCCESS) {
return JNI_EINVAL;
}
+ } else if (match_option(option, "-Xlog", &tail)) {
+ bool ret = false;
+ if (strcmp(tail, ":help") == 0) {
+ LogConfiguration::print_command_line_help(defaultStream::output_stream());
+ vm_exit(0);
+ } else if (strcmp(tail, ":disable") == 0) {
+ LogConfiguration::disable_logging();
+ ret = true;
+ } else if (*tail == '\0') {
+ ret = LogConfiguration::parse_command_line_arguments();
+ assert(ret, "-Xlog without arguments should never fail to parse");
+ } else if (*tail == ':') {
+ ret = LogConfiguration::parse_command_line_arguments(tail + 1);
+ }
+ if (ret == false) {
+ jio_fprintf(defaultStream::error_stream(),
+ "Invalid -Xlog option '-Xlog%s'\n",
+ tail);
+ return JNI_EINVAL;
+ }
// JNI hooks
} else if (match_option(option, "-Xcheck", &tail)) {
if (!strcmp(tail, ":jni")) {