< prev index next >
src/hotspot/os/linux/os_linux.cpp
Print this page
rev 56578 : 8232211: Remove dead code from os.hpp|cpp
Reviewed-by: TBD
rev 56579 : imported patch dead_os2
*** 146,160 ****
address os::Linux::_initial_thread_stack_bottom = NULL;
uintptr_t os::Linux::_initial_thread_stack_size = 0;
int (*os::Linux::_pthread_getcpuclockid)(pthread_t, clockid_t *) = NULL;
int (*os::Linux::_pthread_setname_np)(pthread_t, const char*) = NULL;
- Mutex* os::Linux::_createThread_lock = NULL;
pthread_t os::Linux::_main_thread;
int os::Linux::_page_size = -1;
bool os::Linux::_supports_fast_thread_cpu_time = false;
- uint32_t os::Linux::_os_version = 0;
const char * os::Linux::_glibc_version = NULL;
const char * os::Linux::_libpthread_version = NULL;
static jlong initial_time_count=0;
--- 146,158 ----
*** 4819,4865 ****
assert(rc == 0, "clock_gettime is expected to return 0 code");
return (tp.tv_sec * NANOSECS_PER_SEC) + tp.tv_nsec;
}
- void os::Linux::initialize_os_info() {
- assert(_os_version == 0, "OS info already initialized");
-
- struct utsname _uname;
-
- uint32_t major;
- uint32_t minor;
- uint32_t fix;
-
- int rc;
-
- // Kernel version is unknown if
- // verification below fails.
- _os_version = 0x01000000;
-
- rc = uname(&_uname);
- if (rc != -1) {
-
- rc = sscanf(_uname.release,"%d.%d.%d", &major, &minor, &fix);
- if (rc == 3) {
-
- if (major < 256 && minor < 256 && fix < 256) {
- // Kernel version format is as expected,
- // set it overriding unknown state.
- _os_version = (major << 16) |
- (minor << 8 ) |
- (fix << 0 ) ;
- }
- }
- }
- }
-
- uint32_t os::Linux::os_version() {
- assert(_os_version != 0, "not initialized");
- return _os_version & 0x00FFFFFF;
- }
-
/////
// glibc on Linux platform uses non-documented flag
// to indicate, that some special sort of signal
// trampoline is used.
// We will never set this flag, and we should
--- 4817,4826 ----
*** 5075,5086 ****
}
init_page_sizes((size_t) Linux::page_size());
Linux::initialize_system_info();
- Linux::initialize_os_info();
-
os::Linux::CPUPerfTicks pticks;
bool res = os::Linux::get_tick_information(&pticks, -1);
if (res && pticks.has_steal_ticks) {
has_initial_tick_info = true;
--- 5036,5045 ----
*** 5253,5265 ****
log_info(os)("os::init_2 setrlimit failed: %s", os::strerror(errno));
}
}
}
- // Initialize lock used to serialize thread creation (see os::create_thread)
- Linux::set_createThread_lock(new Mutex(Mutex::leaf, "createThread_lock", false));
-
// at-exit methods are called in the reverse order of their registration.
// atexit functions are called on return from main or as a result of a
// call to exit(3C). There can be only 32 of these functions registered
// and atexit() does not set errno.
--- 5212,5221 ----
< prev index next >