mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8046148: JEP 158: Unified JVM Logging
Reviewed-by: coleenp, sla
This commit is contained in:
parent
0835a6e311
commit
3c2211a492
39 changed files with 2842 additions and 6 deletions
|
@ -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 @@ jint Arguments::parse_each_vm_init_arg(const JavaVMInitArgs* args,
|
|||
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")) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue