mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-18 01:54:47 +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
|
@ -37,6 +37,7 @@
|
|||
#include "interpreter/linkResolver.hpp"
|
||||
#include "interpreter/oopMapCache.hpp"
|
||||
#include "jvmtifiles/jvmtiEnv.hpp"
|
||||
#include "logging/logConfiguration.hpp"
|
||||
#include "memory/metaspaceShared.hpp"
|
||||
#include "memory/oopFactory.hpp"
|
||||
#include "memory/universe.inline.hpp"
|
||||
|
@ -3306,6 +3307,10 @@ jint Threads::create_vm(JavaVMInitArgs* args, bool* canTryAgain) {
|
|||
// Initialize the os module before using TLS
|
||||
os::init();
|
||||
|
||||
// Record VM creation timing statistics
|
||||
TraceVmCreationTime create_vm_timer;
|
||||
create_vm_timer.start();
|
||||
|
||||
// Initialize system properties.
|
||||
Arguments::init_system_properties();
|
||||
|
||||
|
@ -3315,6 +3320,9 @@ jint Threads::create_vm(JavaVMInitArgs* args, bool* canTryAgain) {
|
|||
// Update/Initialize System properties after JDK version number is known
|
||||
Arguments::init_version_specific_system_properties();
|
||||
|
||||
// Make sure to initialize log configuration *before* parsing arguments
|
||||
LogConfiguration::initialize(create_vm_timer.begin_time());
|
||||
|
||||
// Parse arguments
|
||||
jint parse_result = Arguments::parse(args);
|
||||
if (parse_result != JNI_OK) return parse_result;
|
||||
|
@ -3341,10 +3349,6 @@ jint Threads::create_vm(JavaVMInitArgs* args, bool* canTryAgain) {
|
|||
|
||||
HOTSPOT_VM_INIT_BEGIN();
|
||||
|
||||
// Record VM creation timing statistics
|
||||
TraceVmCreationTime create_vm_timer;
|
||||
create_vm_timer.start();
|
||||
|
||||
// Timing (must come after argument parsing)
|
||||
TraceTime timer("Create VM", TraceStartupTime);
|
||||
|
||||
|
@ -3492,6 +3496,7 @@ jint Threads::create_vm(JavaVMInitArgs* args, bool* canTryAgain) {
|
|||
// debug stuff, that does not work until all basic classes have been initialized.
|
||||
set_init_completed();
|
||||
|
||||
LogConfiguration::post_initialize();
|
||||
Metaspace::post_initialize();
|
||||
|
||||
HOTSPOT_VM_INIT_END();
|
||||
|
@ -3966,6 +3971,8 @@ bool Threads::destroy_vm() {
|
|||
// exit_globals() will delete tty
|
||||
exit_globals();
|
||||
|
||||
LogConfiguration::finalize();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue