equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
3388 VM_Version::early_initialize(); |
3388 VM_Version::early_initialize(); |
3389 |
3389 |
3390 // Check version |
3390 // Check version |
3391 if (!is_supported_jni_version(args->version)) return JNI_EVERSION; |
3391 if (!is_supported_jni_version(args->version)) return JNI_EVERSION; |
3392 |
3392 |
|
3393 // Initialize library-based TLS |
|
3394 ThreadLocalStorage::init(); |
|
3395 |
3393 // Initialize the output stream module |
3396 // Initialize the output stream module |
3394 ostream_init(); |
3397 ostream_init(); |
3395 |
3398 |
3396 // Process java launcher properties. |
3399 // Process java launcher properties. |
3397 Arguments::process_sun_java_launcher_properties(args); |
3400 Arguments::process_sun_java_launcher_properties(args); |
3398 |
3401 |
3399 // Initialize the os module before using TLS |
3402 // Initialize the os module |
3400 os::init(); |
3403 os::init(); |
3401 |
3404 |
3402 // Record VM creation timing statistics |
3405 // Record VM creation timing statistics |
3403 TraceVmCreationTime create_vm_timer; |
3406 TraceVmCreationTime create_vm_timer; |
3404 create_vm_timer.start(); |
3407 create_vm_timer.start(); |
3448 jint os_init_2_result = os::init_2(); |
3451 jint os_init_2_result = os::init_2(); |
3449 if (os_init_2_result != JNI_OK) return os_init_2_result; |
3452 if (os_init_2_result != JNI_OK) return os_init_2_result; |
3450 |
3453 |
3451 jint adjust_after_os_result = Arguments::adjust_after_os(); |
3454 jint adjust_after_os_result = Arguments::adjust_after_os(); |
3452 if (adjust_after_os_result != JNI_OK) return adjust_after_os_result; |
3455 if (adjust_after_os_result != JNI_OK) return adjust_after_os_result; |
3453 |
|
3454 // Initialize library-based TLS |
|
3455 ThreadLocalStorage::init(); |
|
3456 |
3456 |
3457 // Initialize output stream logging |
3457 // Initialize output stream logging |
3458 ostream_init_log(); |
3458 ostream_init_log(); |
3459 |
3459 |
3460 // Convert -Xrun to -agentlib: if there is no JVM_OnLoad |
3460 // Convert -Xrun to -agentlib: if there is no JVM_OnLoad |