Lines Matching refs:os

93 #include <imagehlp.h>             // For os::dll_address_to_function_name
161 // Implementation of os
163 bool os::getenv(const char* name, char* buffer, int len) {
170 bool os::have_special_privileges() {
178 void os::run_periodic_checks() {
188 void os::init_system_properties_values() {
198 os::jvm_path(home_dir, sizeof(home_dir));
312 void os::breakpoint() {
318 os::breakpoint();
326 address os::get_caller_pc(int n) {
331 if (os::Kernel32Dll::RtlCaptureStackBackTrace(n + 1, 1, (PVOID*)&pc, NULL) == 1) {
338 // os::current_stack_base()
344 address os::current_stack_base() {
371 size_t os::current_stack_size() {
375 sz = (size_t)os::current_stack_base() - (size_t)minfo.AllocationBase;
379 struct tm* os::localtime_pd(const time_t* clock, struct tm* res) {
398 int pid = os::current_process_id();
402 assert(osthr->get_state() == RUNNABLE, "invalid os thread state");
405 int lgrp_id = os::numa_get_group_id();
432 Atomic::dec_ptr((intptr_t*)&os::win32::_os_thread_count);
456 int lgrp_id = os::numa_get_group_id();
469 bool os::create_attached_thread(JavaThread* thread) {
491 bool os::create_main_thread(JavaThread* thread) {
510 bool os::create_thread(Thread* thread, ThreadType thr_type, size_t stack_size) {
532 case os::java_thread:
537 case os::compiler_thread:
543 case os::vm_thread:
544 case os::pgc_thread:
545 case os::cgc_thread:
546 case os::watcher_thread:
603 Atomic::inc_ptr((intptr_t*)&os::win32::_os_thread_count);
618 void os::free_thread(OSThread* osthread) {
640 jlong os::elapsed_counter() {
653 jlong os::elapsed_frequency() {
663 julong os::available_memory() {
667 julong os::win32::available_memory() {
677 julong os::physical_memory() {
681 julong os::allocatable_physical_memory(julong size) {
695 int os::active_processor_count() {
713 void os::set_native_thread_name(const char *name) {
718 bool os::distribute_processes(uint length, uint* distribution) {
723 bool os::bind_to_processor(uint processor_id) {
744 double os::elapsedTime() {
806 bool os::supports_vtime() { return false; }
807 bool os::enable_vtime() { return false; }
808 bool os::vtime_enabled() { return false; }
809 double os::elapsedVTime() {
814 jlong os::javaTimeMillis() {
824 jlong os::javaTimeNanos() {
837 void os::javaTimeNanos_info(jvmtiTimerInfo *info_ptr) {
870 char* os::local_time_string(char *buf, size_t buflen) {
878 bool os::getTimesSecs(double* process_real_time,
903 void os::shutdown() {
922 void os::check_or_create_dump(void* exceptionRecord, void* contextRecord, char* buffer, size_t bufferSize) {
935 if (!os::win32::is_windows_server() && !CreateMinidumpOnCrash) {
939 } else if (os::win32::is_windows_server() && !FLAG_IS_DEFAULT(CreateMinidumpOnCrash) && !CreateMinidumpOnCrash) {
944 dbghelp = os::win32::load_Windows_dll("DBGHELP.DLL", NULL, 0);
1004 void os::abort(bool dump_core)
1006 os::shutdown();
1012 void os::die() {
1025 os::opendir(const char *dirname)
1096 os::readdir(DIR *dirp, dirent *dbuf)
1118 os::closedir(DIR *dirp)
1135 const char* os::get_temp_directory() {
1152 void os::dll_build_name(char *buffer, size_t buflen,
1167 } else if (strchr(pname, *os::path_separator()) != NULL) {
1201 // Needs to be in os specific directory because windows requires another
1203 const char* os::get_current_directory(char *buf, int buflen) {
1220 if ( !os::PSApiDll::GetModuleInformation( GetCurrentProcess(), hmod,
1259 if (!os::PSApiDll::PSApiAvailable()) {
1268 if (!os::PSApiDll::EnumProcessModules(hProcess, modules,
1279 if(!os::PSApiDll::GetModuleFileNameEx(hProcess, modules[i],
1285 if (!os::PSApiDll::GetModuleInformation(hProcess, modules[i],
1309 if (!os::Kernel32Dll::HelpToolsAvailable()) {
1314 hSnapShot = os::Kernel32Dll::CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, pid ) ;
1321 bool not_done = os::Kernel32Dll::Module32First( hSnapShot, &modentry ) != 0;
1330 not_done = os::Kernel32Dll::Module32Next( hSnapShot, &modentry ) != 0;
1340 if (!pid) pid = os::current_process_id();
1342 if (os::win32::is_nt()) return _enumerate_modules_winnt (pid, func, param);
1370 bool os::dll_address_to_library_name(address addr, char* buf,
1381 int pid = os::current_process_id();
1393 bool os::dll_address_to_function_name(address addr, char *buf,
1420 bool os::address_is_in_vm(address addr) {
1422 int pid = os::current_process_id();
1447 void * os::dll_load(const char *name, char *ebuf, int ebuflen)
1466 // else call os::lasterror to obtain system error message
1483 (os::seek_to_file_offset(file_descriptor,IMAGE_FILE_PTR_TO_SIGNATURE)<0)
1487 (os::read(file_descriptor, (void*)&signature_offset,sizeof(signature_offset))))
1491 (os::seek_to_file_offset(file_descriptor,
1497 (os::read(file_descriptor, (void*)&lib_arch,sizeof(lib_arch))))
1503 // file i/o error - report os::lasterror(...) msg
1525 #error Method os::dll_load requires that one of following \
1546 // but some other error took place - report os::lasterror(...) msg
1570 void os::print_dll_info(outputStream *st) {
1571 int pid = os::current_process_id();
1576 void os::print_os_info_brief(outputStream* st) {
1577 os::print_os_info(st);
1580 void os::print_os_info(outputStream* st) {
1583 os::win32::print_windows_version(st);
1586 void os::win32::print_windows_version(outputStream* st) {
1611 if (!os::Kernel32Dll::GetNativeSystemInfoAvailable()){
1614 os::Kernel32Dll::GetNativeSystemInfo(&si);
1646 } else { // future os
1671 void os::pd_print_cpu_info(outputStream* st) {
1675 void os::print_memory_info(outputStream* st) {
1677 st->print(" %dk page", os::vm_page_size()>>10);
1685 st->print(", physical %uk", os::physical_memory() >> 10);
1686 st->print("(%uk free)", os::available_memory() >> 10);
1693 void os::print_siginfo(outputStream *st, void *siginfo) {
1727 void os::print_signal_handlers(outputStream* st, char* buf, size_t buflen) {
1734 void os::jvm_path(char *buf, jint buflen) {
1779 void os::print_jni_name_prefix_on(outputStream* st, int args_size) {
1786 void os::print_jni_name_suffix_on(outputStream* st, int args_size) {
1795 size_t os::lasterror(char* buf, size_t len) {
1831 int os::get_last_error() {
1846 os::signal_notify(sig);
1848 os::signal(sig, (void*)UserHandler);
1851 void* os::user_handler() {
1855 void* os::signal(int signal_number, void* handler) {
1865 void os::signal_raise(int signal_number) {
1880 os::die();
1883 os::signal_raise(SIGINT);
1909 os::signal_raise(SIGTERM);
1919 * The following code is moved from os.cpp for making this
1925 int os::sigexitnum_pd(){
1933 void os::signal_init_pd() {
1959 void os::signal_notify(int signal_number) {
2010 int os::signal_lookup() {
2014 int os::signal_wait() {
2104 const char* os::exception_name(int exception_code, char *buf, size_t size) {
2205 void os::set_error_file(const char *logfile) {
2244 int page_size = os::vm_page_size();
2262 (address) os::non_memory_address_word();
2266 (UnguardOnExecutionViolation > 1 || os::address_is_in_vm(addr))) {
2271 bool res = os::protect_memory((char*) page_start, page_size,
2272 os::MEM_PROT_RWX);
2325 if ( os::is_memory_serialize_page(thread, addr) ) {
2327 os::block_on_serialize_page_trap();
2338 if (os::uses_stack_guard_pages()) {
2399 if (addr < stack_end && addr >= stack_end - os::vm_page_size()) {
2401 assert(!os::uses_stack_guard_pages(),
2413 if (os::is_poll_address(addr)) {
2427 (~((uintptr_t)os::vm_page_size() - (uintptr_t)1)));
2428 os::commit_memory((char *)addr, thread->stack_base() - addr,
2466 if (((uintptr_t)addr) < os::vm_page_size() ) {
2484 !os::win32::is_nt()) {
2610 address os::win32::fast_jni_accessor_wrapper(BasicType type) {
2628 int os::vm_page_size() { return os::win32::vm_page_size(); }
2629 int os::vm_allocation_granularity() {
2630 return os::win32::vm_allocation_granularity();
2686 if (!os::Kernel32Dll::GetNumaHighestNodeNumber(&highest_node_number)) return false;
2691 if (!os::Kernel32Dll::GetNumaNodeProcessorMask(i, &proc_mask_numa_node)) return false;
2712 return os::Kernel32Dll::GetLargePageMinimumAvailable() &&
2713 os::Advapi32Dll::AdvapiAvailable();
2718 os::current_process_id());
2722 os::Advapi32Dll::OpenProcessToken(_hProcess, TOKEN_ADJUST_PRIVILEGES, &_hToken) &&
2723 os::Advapi32Dll::LookupPrivilegeValue(NULL, "SeLockMemoryPrivilege", &luid)) {
2732 if (os::Advapi32Dll::AdjustTokenPrivileges(_hToken, false, &tp, sizeof(tp), NULL, NULL) &&
2757 size_t min_interleave_granularity = UseLargePages ? _large_page_size : os::vm_allocation_granularity();
2760 if (os::Kernel32Dll::NumaCallsAvailable()) {
2792 size_t page_size = UseLargePages ? _large_page_size : os::vm_allocation_granularity();
2813 os::release_memory(p_buf, bytes + chunk_size);
2830 long ran_num = os::random();
2860 p_new = (char *)os::Kernel32Dll::VirtualAllocExNuma(hProc,
2879 os::release_memory(p_buf, bytes_to_release);
2910 void os::large_page_init() {
2921 size_t s = os::Kernel32Dll::GetLargePageMinimum();
2962 void os::pd_split_reserved_memory(char *base, size_t size, size_t split,
2975 bool os::can_release_partial_region() {
2980 // virtual space to get requested alignment, like posix-like os's.
2982 char* os::reserve_memory_aligned(size_t size, size_t alignment) {
2983 assert((alignment & (os::vm_allocation_granularity() - 1)) == 0,
2993 char* extra_base = os::reserve_memory(extra_size, NULL, alignment);
3000 os::release_memory(extra_base, extra_size);
3002 aligned_base = os::reserve_memory(size, aligned_base);
3009 char* os::pd_reserve_memory(size_t bytes, char* addr, size_t alignment_hint) {
3010 assert((size_t)addr % os::vm_allocation_granularity() == 0,
3012 assert(bytes % os::vm_allocation_granularity() == 0, "reserve block size");
3042 char* os::pd_attempt_reserve_memory_at(size_t bytes, char* requested_addr) {
3043 // Windows os::reserve_memory() fails of the requested address range is
3048 size_t os::large_page_size() {
3052 bool os::can_commit_large_page_memory() {
3059 bool os::can_execute_large_page_memory() {
3063 char* os::reserve_memory_special(size_t bytes, char* addr, bool exec) {
3103 bool os::release_memory_special(char* base, size_t bytes) {
3108 void os::print_statistics() {
3112 int err = os::get_last_error();
3114 size_t buf_len = os::lasterror(buf, sizeof(buf));
3115 warning("INFO: os::commit_memory(" PTR_FORMAT ", " SIZE_FORMAT
3120 bool os::pd_commit_memory(char* addr, size_t bytes, bool exec) {
3125 assert((size_t) addr % os::vm_page_size() == 0, "commit on page boundaries");
3126 assert(bytes % os::vm_page_size() == 0, "commit in page-sized chunks");
3182 bool os::pd_commit_memory(char* addr, size_t size, size_t alignment_hint,
3188 void os::pd_commit_memory_or_exit(char* addr, size_t size, bool exec,
3197 void os::pd_commit_memory_or_exit(char* addr, size_t size,
3204 bool os::pd_uncommit_memory(char* addr, size_t bytes) {
3209 assert((size_t) addr % os::vm_page_size() == 0, "uncommit on page boundaries");
3210 assert(bytes % os::vm_page_size() == 0, "uncommit in page-sized chunks");
3214 bool os::pd_release_memory(char* addr, size_t bytes) {
3218 bool os::pd_create_stack_guard_pages(char* addr, size_t size) {
3219 return os::commit_memory(addr, size, !ExecMem);
3222 bool os::remove_stack_guard_pages(char* addr, size_t size) {
3223 return os::uncommit_memory(addr, size);
3227 bool os::protect_memory(char* addr, size_t bytes, ProtType prot,
3247 // One cannot use os::guard_memory() here, as on Win32 guard page
3256 bool os::guard_memory(char* addr, size_t bytes) {
3261 bool os::unguard_memory(char* addr, size_t bytes) {
3266 void os::pd_realign_memory(char *addr, size_t bytes, size_t alignment_hint) { }
3267 void os::pd_free_memory(char *addr, size_t bytes, size_t alignment_hint) { }
3268 void os::numa_make_global(char *addr, size_t bytes) { }
3269 void os::numa_make_local(char *addr, size_t bytes, int lgrp_hint) { }
3270 bool os::numa_topology_changed() { return false; }
3271 size_t os::numa_get_groups_num() { return MAX2(numa_node_list_holder.get_count(), 1); }
3272 int os::numa_get_group_id() { return 0; }
3273 size_t os::numa_get_leaf_groups(int *ids, size_t size) {
3288 bool os::get_page_info(char *start, page_info* info) {
3292 char *os::scan_pages(char *start, char* end, page_info* page_expected, page_info* page_found) {
3296 char* os::non_memory_address_word() {
3306 void os::pd_start_thread(Thread* thread) {
3348 int os::sleep(Thread* thread, jlong ms, bool interruptable) {
3396 void os::infinite_sleep() {
3404 os::YieldResult os::NakedYield() {
3407 if (os::Kernel32Dll::SwitchToThreadAvailable()) {
3408 return SwitchToThread() ? os::YIELD_SWITCHED : os::YIELD_NONEREADY ;
3412 return os::YIELD_UNKNOWN ;
3415 void os::yield() { os::NakedYield(); }
3417 void os::yield_all(int attempts) {
3426 int os::java_to_os_priority[CriticalPriority + 1] = {
3461 os::java_to_os_priority[i] = prio_policy1[i];
3465 os::java_to_os_priority[MaxPriority] = os::java_to_os_priority[CriticalPriority] ;
3470 OSReturn os::set_native_priority(Thread* thread, int priority) {
3476 OSReturn os::get_native_priority(const Thread* const thread, int* priority_ptr) {
3493 void os::hint_no_preempt() {}
3495 void os::interrupt(Thread* thread) {
3517 bool os::is_interrupted(Thread* thread, bool clear_interrupted) {
3538 ExtendedPC os::get_thread_pc(Thread* thread) {
3559 intx os::current_thread_id() { return GetCurrentThreadId(); }
3563 int os::current_process_id()
3568 int os::win32::_vm_page_size = 0;
3569 int os::win32::_vm_allocation_granularity = 0;
3570 int os::win32::_processor_type = 0;
3572 int os::win32::_processor_level = 0;
3573 julong os::win32::_physical_memory = 0;
3574 size_t os::win32::_default_stack_size = 0;
3576 intx os::win32::_os_thread_limit = 0;
3577 volatile intx os::win32::_os_thread_count = 0;
3579 bool os::win32::_is_nt = false;
3580 bool os::win32::_is_windows_2003 = false;
3581 bool os::win32::_is_windows_server = false;
3583 void os::win32::initialize_system_info() {
3621 _default_stack_size = os::current_stack_size();
3633 if (!os::win32::is_nt()) {
3639 HINSTANCE os::win32::load_Windows_dll(const char* name, char *ebuf, int ebuflen) {
3650 "Invalid parameter while calling os::win32::load_windows_dll(): cannot take path: %s", name);
3658 if ((result = (HINSTANCE)os::dll_load(path, ebuf, ebuflen)) != NULL) {
3667 if ((result = (HINSTANCE)os::dll_load(path, ebuf, ebuflen)) != NULL) {
3673 "os::win32::load_windows_dll() cannot load %s from system directories.", name);
3677 void os::win32::setmode_streams() {
3684 bool os::is_debugger_attached() {
3689 void os::wait_for_keypress_at_exit(void) {
3697 int os::message_box(const char* title, const char* message) {
3703 int os::allocate_thread_local_storage() {
3708 void os::free_thread_local_storage(int index) {
3713 void os::thread_local_storage_at_put(int index, void* value) {
3719 void* os::thread_local_storage_at(int index) {
3751 void os::init(void) {
3768 os::win32::is_windows_2003());
3787 jint os::init_2(void) {
3789 address polling_page = (address)VirtualAlloc(NULL, os::vm_page_size(), MEM_RESERVE, PAGE_READONLY);
3792 address return_page = (address)VirtualAlloc(polling_page, os::vm_page_size(), MEM_COMMIT, PAGE_READONLY);
3795 os::set_polling_page( polling_page );
3803 address mem_serialize_page = (address)VirtualAlloc(NULL, os::vm_page_size(), MEM_RESERVE, PAGE_READWRITE);
3806 return_page = (address)VirtualAlloc(mem_serialize_page, os::vm_page_size(), MEM_COMMIT, PAGE_READWRITE);
3809 os::set_memory_serialize_page( mem_serialize_page );
3817 os::large_page_init();
3852 size_t stack_commit_size = round_to(ThreadStackSize*K, os::vm_page_size());
3853 size_t default_reserve_size = os::win32::default_stack_size();
3867 2*BytesPerWord COMPILER2_PRESENT(+1)) * os::vm_page_size();
3906 warning("os::init_2 atexit(perfMemory_exit_helper) failed");
3931 void os::init_3(void) {
3936 void os::make_polling_page_unreadable(void) {
3938 if( !VirtualProtect((char *)_polling_page, os::vm_page_size(), PAGE_NOACCESS, &old_status) )
3943 void os::make_polling_page_readable(void) {
3945 if( !VirtualProtect((char *)_polling_page, os::vm_page_size(), PAGE_READONLY, &old_status) )
3950 int os::stat(const char *path, struct stat *sbuf) {
3956 os::native_path(strcpy(pathbuf, path));
4000 jlong os::current_thread_cpu_time() {
4002 return os::thread_cpu_time(Thread::current(), true /* user+sys */);
4005 jlong os::thread_cpu_time(Thread* thread) {
4007 return os::thread_cpu_time(thread, true /* user+sys */);
4010 jlong os::current_thread_cpu_time(bool user_sys_cpu_time) {
4011 return os::thread_cpu_time(Thread::current(), user_sys_cpu_time);
4014 jlong os::thread_cpu_time(Thread* thread, bool user_sys_cpu_time) {
4016 // If this function changes, os::is_thread_cpu_time_supported() should too
4017 if (os::win32::is_nt()) {
4037 void os::current_thread_cpu_time_info(jvmtiTimerInfo *info_ptr) {
4044 void os::thread_cpu_time_info(jvmtiTimerInfo *info_ptr) {
4051 bool os::is_thread_cpu_time_supported() {
4052 // see os::thread_cpu_time
4053 if (os::win32::is_nt()) {
4090 int os::loadavg(double loadavg[], int nelem) {
4096 bool os::dont_yield() {
4103 int os::open(const char *path, int oflag, int mode) {
4110 os::native_path(strcpy(pathbuf, path));
4115 bool os::dir_is_empty(const char* path) {
4126 int os::create_binary_file(const char* path, bool rewrite_existing) {
4135 jlong os::current_file_offset(int fd) {
4140 jlong os::seek_to_file_offset(int fd, jlong offset) {
4145 jlong os::lseek(int fd, jlong offset, int whence) {
4162 char * os::native_path(char *path) {
4263 int os::ftruncate(int fd, jlong length) {
4289 int os::fsync(int fd) {
4309 int os::available(int fd, jlong *bytes) {
4401 lpBuffer = (INPUT_RECORD *)os::malloc(numEvents * sizeof(INPUT_RECORD), mtInternal);
4408 os::free(lpBuffer, mtInternal);
4429 os::free(lpBuffer, mtInternal);
4437 char* os::pd_map_memory(int fd, const char* file_name, size_t file_offset,
4557 char* os::pd_remap_memory(int fd, const char* file_name, size_t file_offset,
4562 if (!os::unmap_memory(addr, bytes)) {
4570 return os::map_memory(fd, file_name, file_offset, addr, bytes,
4578 bool os::pd_unmap_memory(char* addr, size_t bytes) {
4590 void os::pause() {
4662 int os::PlatformEvent::park (jlong Millis) {
4685 // with os::javaTimeNanos(). Furthermore, we assume that spurious returns from
4708 // see comment at end of os::PlatformEvent::park() below:
4716 void os::PlatformEvent::park () {
4744 void os::PlatformEvent::unpark() {
4789 time -= os::javaTimeMillis(); // convert to relative time
4831 int os::fork_and_exec(char* cmd) {
4871 bool os::check_heap(bool force) {
4901 bool os::find(address addr, outputStream* st) {
4906 LONG WINAPI os::win32::serialize_fault_filter(struct _EXCEPTION_POINTERS* e) {
4914 if (os::is_memory_serialize_page(thread, addr))
4922 bool os::is_headless_jre() { return false; }
4937 if (!os::WinSock2Dll::WinSock2Available()) {
4946 if (os::WinSock2Dll::WSAStartup(MAKEWORD(1,1), &wsadata) != 0) {
4953 struct hostent* os::get_host_by_name(char* name) {
4957 if (!os::WinSock2Dll::WinSock2Available()) {
4960 return (struct hostent*)os::WinSock2Dll::gethostbyname(name);
4963 int os::socket_close(int fd) {
4967 int os::socket_available(int fd, jint *pbytes) {
4972 int os::socket(int domain, int type, int protocol) {
4976 int os::listen(int fd, int count) {
4980 int os::connect(int fd, struct sockaddr* him, socklen_t len) {
4984 int os::accept(int fd, struct sockaddr* him, socklen_t* len) {
4988 int os::sendto(int fd, char* buf, size_t len, uint flags,
4994 int os::recvfrom(int fd, char *buf, size_t nBytes, uint flags,
5000 int os::recv(int fd, char* buf, size_t nBytes, uint flags) {
5004 int os::send(int fd, char* buf, size_t nBytes, uint flags) {
5008 int os::raw_send(int fd, char* buf, size_t nBytes, uint flags) {
5012 int os::timeout(int fd, long timeout) {
5025 int os::get_host_name(char* name, int namelen) {
5029 int os::socket_shutdown(int fd, int howto) {
5033 int os::bind(int fd, struct sockaddr* him, socklen_t len) {
5037 int os::get_sock_name(int fd, struct sockaddr* him, socklen_t* len) {
5041 int os::get_sock_opt(int fd, int level, int optname,
5046 int os::set_sock_opt(int fd, int level, int optname,
5088 void os::SuspendedThreadTask::internal_do_task() {
5124 GetLargePageMinimum_Fn os::Kernel32Dll::_GetLargePageMinimum = NULL;
5125 VirtualAllocExNuma_Fn os::Kernel32Dll::_VirtualAllocExNuma = NULL;
5126 GetNumaHighestNodeNumber_Fn os::Kernel32Dll::_GetNumaHighestNodeNumber = NULL;
5127 GetNumaNodeProcessorMask_Fn os::Kernel32Dll::_GetNumaNodeProcessorMask = NULL;
5128 RtlCaptureStackBackTrace_Fn os::Kernel32Dll::_RtlCaptureStackBackTrace = NULL;
5131 BOOL os::Kernel32Dll::initialized = FALSE;
5132 SIZE_T os::Kernel32Dll::GetLargePageMinimum() {
5138 BOOL os::Kernel32Dll::GetLargePageMinimumAvailable() {
5145 BOOL os::Kernel32Dll::NumaCallsAvailable() {
5152 LPVOID os::Kernel32Dll::VirtualAllocExNuma(HANDLE hProc, LPVOID addr, SIZE_T bytes, DWORD flags, DWORD prot, DWORD node) {
5159 BOOL os::Kernel32Dll::GetNumaHighestNodeNumber(PULONG ptr_highest_node_number) {
5166 BOOL os::Kernel32Dll::GetNumaNodeProcessorMask(UCHAR node, PULONGLONG proc_mask) {
5173 USHORT os::Kernel32Dll::RtlCaptureStackBackTrace(ULONG FrameToSkip,
5187 void os::Kernel32Dll::initializeCommon() {
5204 void os::Kernel32Dll::initialize() {
5210 inline BOOL os::Kernel32Dll::SwitchToThread() {
5214 inline BOOL os::Kernel32Dll::SwitchToThreadAvailable() {
5219 inline BOOL os::Kernel32Dll::HelpToolsAvailable() {
5223 inline HANDLE os::Kernel32Dll::CreateToolhelp32Snapshot(DWORD dwFlags,DWORD th32ProcessId) {
5227 inline BOOL os::Kernel32Dll::Module32First(HANDLE hSnapshot,LPMODULEENTRY32 lpme) {
5231 inline BOOL os::Kernel32Dll::Module32Next(HANDLE hSnapshot,LPMODULEENTRY32 lpme) {
5236 inline BOOL os::Kernel32Dll::GetNativeSystemInfoAvailable() {
5240 inline void os::Kernel32Dll::GetNativeSystemInfo(LPSYSTEM_INFO lpSystemInfo) {
5245 inline BOOL os::PSApiDll::EnumProcessModules(HANDLE hProcess, HMODULE *lpModule, DWORD cb, LPDWORD lpcbNeeded) {
5249 inline DWORD os::PSApiDll::GetModuleFileNameEx(HANDLE hProcess, HMODULE hModule, LPTSTR lpFilename, DWORD nSize) {
5253 inline BOOL os::PSApiDll::GetModuleInformation(HANDLE hProcess, HMODULE hModule, LPMODULEINFO lpmodinfo, DWORD cb) {
5257 inline BOOL os::PSApiDll::PSApiAvailable() {
5263 inline BOOL os::WinSock2Dll::WSAStartup(WORD wVersionRequested, LPWSADATA lpWSAData) {
5267 inline struct hostent* os::WinSock2Dll::gethostbyname(const char *name) {
5271 inline BOOL os::WinSock2Dll::WinSock2Available() {
5276 inline BOOL os::Advapi32Dll::AdjustTokenPrivileges(HANDLE TokenHandle,
5283 inline BOOL os::Advapi32Dll::OpenProcessToken(HANDLE ProcessHandle, DWORD DesiredAccess,
5288 inline BOOL os::Advapi32Dll::LookupPrivilegeValue(LPCTSTR lpSystemName, LPCTSTR lpName, PLUID lpLuid) {
5292 inline BOOL os::Advapi32Dll::AdvapiAvailable() {
5304 SwitchToThread_Fn os::Kernel32Dll::_SwitchToThread = NULL;
5305 CreateToolhelp32Snapshot_Fn os::Kernel32Dll::_CreateToolhelp32Snapshot = NULL;
5306 Module32First_Fn os::Kernel32Dll::_Module32First = NULL;
5307 Module32Next_Fn os::Kernel32Dll::_Module32Next = NULL;
5308 GetNativeSystemInfo_Fn os::Kernel32Dll::_GetNativeSystemInfo = NULL;
5310 void os::Kernel32Dll::initialize() {
5327 BOOL os::Kernel32Dll::SwitchToThread() {
5334 BOOL os::Kernel32Dll::SwitchToThreadAvailable() {
5342 BOOL os::Kernel32Dll::HelpToolsAvailable() {
5351 HANDLE os::Kernel32Dll::CreateToolhelp32Snapshot(DWORD dwFlags,DWORD th32ProcessId) {
5358 BOOL os::Kernel32Dll::Module32First(HANDLE hSnapshot,LPMODULEENTRY32 lpme) {
5365 inline BOOL os::Kernel32Dll::Module32Next(HANDLE hSnapshot,LPMODULEENTRY32 lpme) {
5373 BOOL os::Kernel32Dll::GetNativeSystemInfoAvailable() {
5380 void os::Kernel32Dll::GetNativeSystemInfo(LPSYSTEM_INFO lpSystemInfo) {
5394 EnumProcessModules_Fn os::PSApiDll::_EnumProcessModules = NULL;
5395 GetModuleFileNameEx_Fn os::PSApiDll::_GetModuleFileNameEx = NULL;
5396 GetModuleInformation_Fn os::PSApiDll::_GetModuleInformation = NULL;
5397 BOOL os::PSApiDll::initialized = FALSE;
5399 void os::PSApiDll::initialize() {
5401 HMODULE handle = os::win32::load_Windows_dll("PSAPI.DLL", NULL, 0);
5416 BOOL os::PSApiDll::EnumProcessModules(HANDLE hProcess, HMODULE *lpModule, DWORD cb, LPDWORD lpcbNeeded) {
5422 DWORD os::PSApiDll::GetModuleFileNameEx(HANDLE hProcess, HMODULE hModule, LPTSTR lpFilename, DWORD nSize) {
5428 BOOL os::PSApiDll::GetModuleInformation(HANDLE hProcess, HMODULE hModule, LPMODULEINFO lpmodinfo, DWORD cb) {
5434 BOOL os::PSApiDll::PSApiAvailable() {
5448 WSAStartup_Fn os::WinSock2Dll::_WSAStartup = NULL;
5449 gethostbyname_Fn os::WinSock2Dll::_gethostbyname = NULL;
5450 BOOL os::WinSock2Dll::initialized = FALSE;
5452 void os::WinSock2Dll::initialize() {
5454 HMODULE handle = os::win32::load_Windows_dll("ws2_32.dll", NULL, 0);
5464 BOOL os::WinSock2Dll::WSAStartup(WORD wVersionRequested, LPWSADATA lpWSAData) {
5470 struct hostent* os::WinSock2Dll::gethostbyname(const char *name) {
5476 BOOL os::WinSock2Dll::WinSock2Available() {
5488 AdjustTokenPrivileges_Fn os::Advapi32Dll::_AdjustTokenPrivileges = NULL;
5489 OpenProcessToken_Fn os::Advapi32Dll::_OpenProcessToken = NULL;
5490 LookupPrivilegeValue_Fn os::Advapi32Dll::_LookupPrivilegeValue = NULL;
5491 BOOL os::Advapi32Dll::initialized = FALSE;
5493 void os::Advapi32Dll::initialize() {
5495 HMODULE handle = os::win32::load_Windows_dll("advapi32.dll", NULL, 0);
5508 BOOL os::Advapi32Dll::AdjustTokenPrivileges(HANDLE TokenHandle,
5517 BOOL os::Advapi32Dll::OpenProcessToken(HANDLE ProcessHandle, DWORD DesiredAccess,
5524 BOOL os::Advapi32Dll::LookupPrivilegeValue(LPCTSTR lpSystemName, LPCTSTR lpName, PLUID lpLuid) {
5530 BOOL os::Advapi32Dll::AdvapiAvailable() {