os.hpp revision 4373
0N/A * or visit www.oracle.com if you need additional information or have any
6020N/A#ifndef SHARE_VM_RUNTIME_OS_HPP
5637N/A#define SHARE_VM_RUNTIME_OS_HPP
0N/A#include "jvmtifiles/jvmti.h"
0N/A#include "runtime/atomic.hpp"
0N/A#include "runtime/extendedPC.hpp"
0N/A#include "runtime/handles.hpp"
0N/A#ifdef TARGET_OS_FAMILY_linux
0N/A# include "jvm_linux.h"
0N/A#ifdef TARGET_OS_FAMILY_solaris
2636N/A# include "jvm_solaris.h"
2636N/A# include "jvm_windows.h"
0N/A#ifdef TARGET_OS_FAMILY_bsd
2636N/Aclass JavaThread;
5694N/Aclass FileHandle;
2636N/Atemplate<class E> class GrowableArray;
2636N/A// %%%%% Moved ThreadState, START_FN, OSThread to new osThread.hpp. -- Rose
0N/Atypedef void (*java_call_t)(JavaValue* value, methodHandle* method, JavaCallArguments* args, Thread* thread);
2636N/A static bool have_special_privileges();
2636N/A static void run_periodic_checks();
2636N/A static double elapsedTime();
0N/A double* process_user_time,
2636N/A double* process_system_time);
5694N/A static bool supports_vtime();
2636N/A static bool enable_vtime();
2636N/A static bool vtime_enabled();
2636N/A static double elapsedVTime();
5694N/A static bool is_server_class_machine();
0N/A static int processor_count() {
2636N/A return _processor_count;
2636N/A static int active_processor_count();
2636N/A static bool uses_stack_guard_pages();
0N/A static bool allocate_stack_guard_pages();
2636N/A static void bang_stack_shadow_pages();
5694N/A static int vm_page_size();
2636N/A static int vm_allocation_granularity();
2636N/A bool executable = false);
2636N/A bool executable = false);
2636N/A bool is_committed = true);
5694N/A bool allow_exec = false);
2636N/A bool allow_exec);
2636N/A static bool numa_has_static_binding();
2636N/A static bool numa_has_group_homing();
2636N/A static bool numa_topology_changed();
2636N/A static int numa_get_group_id();
2636N/A static char* scan_pages(char *start, char* end, page_info* page_expected, page_info* page_found);
2636N/A static char* non_memory_address_word();
5694N/A bool executable = false);
2636N/A static void large_page_init();
2636N/A static bool can_commit_large_page_memory();
2636N/A static bool can_execute_large_page_memory();
2636N/A static bool is_poll_address(address addr) { return addr >= _polling_page && addr < (_polling_page + os::vm_page_size()); }
2636N/A static void make_polling_page_unreadable();
5694N/A static void make_polling_page_readable();
2636N/A static void serialize_thread_states();
2636N/A static int get_serialize_page_shift_count() {
2636N/A return SerializePageShiftCount;
5694N/A static unsigned int get_serialize_page_mask() {
2636N/A return _serialize_page_mask;
2636N/A static void block_on_serialize_page_trap();
5694N/A enum ThreadType {
2636N/A static void initialize_thread();
2636N/A static int current_process_id();
4005N/A static int naked_sleep();
2636N/A enum YieldResult {
2636N/A static void yield_all(int attempts = 0); // Yields to all other threads including lower priority
5694N/A static void loop_breaker(int attempts); // called from within tight loops to possibly influence time-sharing
0N/A static void breakpoint();
2636N/A static const int default_file_open_flags();
0N/A static const char* dll_file_extension();
2636N/A static const char* get_temp_directory();
2636N/A static void print_environment_variables(outputStream* st, const char** env_list, char* buffer, int len);
0N/A static int get_last_error();
2636N/A static bool is_debugger_attached();
2636N/A static void wait_for_keypress_at_exit(void);
2636N/A static void* native_java_library();
2636N/A static bool is_headless_jre();
2636N/A static const char* file_separator();
2636N/A static const char* line_separator();
2636N/A static const char* path_separator();
2636N/A static void init_system_properties_values();
2636N/A static int allocate_thread_local_storage();
0N/A static const char* jlong_format_specifier();
0N/A static const char* julong_format_specifier();
2636N/A static void signal_init();
2636N/A static void signal_init_pd();
5694N/A static int signal_wait();
2636N/A static int signal_lookup();
2636N/A static void* user_handler();
0N/A static void terminate_signal_thread();
0N/A static int sigexitnum_pd();
2636N/A static void os_exception_wrapper(java_call_t f, JavaValue* value, methodHandle* method, JavaCallArguments* args, Thread* thread);
2636N/A // On Windows this will create an actual minidump, on Linux/Solaris it will simply check core dump limits
2636N/A static void check_or_create_dump(void* exceptionRecord, void* contextRecord, char* buffer, size_t bufferSize);
5694N/A static bool is_thread_cpu_time_supported();
0N/A#include "runtime/os_ext.hpp"
2636N/A# include "os_linux.hpp"
2636N/A# include "os_posix.hpp"
2636N/A# include "os_solaris.hpp"
2636N/A# include "os_posix.hpp"
0N/A#ifdef TARGET_OS_FAMILY_windows
2636N/A# include "os_windows.hpp"
2636N/A#ifdef TARGET_OS_FAMILY_bsd
2636N/A# include "os_posix.hpp"
2636N/A# include "os_bsd.hpp"
0N/A#ifdef TARGET_OS_ARCH_linux_x86
2636N/A# include "os_linux_x86.hpp"
2636N/A# include "os_linux_sparc.hpp"
2636N/A# include "os_linux_zero.hpp"
2636N/A# include "os_solaris_x86.hpp"
0N/A# include "os_solaris_sparc.hpp"
5694N/A# include "os_windows_x86.hpp"
2636N/A# include "os_linux_arm.hpp"
0N/A#ifdef TARGET_OS_ARCH_linux_ppc
2636N/A# include "os_linux_ppc.hpp"
5694N/A# include "os_bsd_x86.hpp"
0N/A#ifdef TARGET_OS_ARCH_bsd_zero
2636N/A# include "os_bsd_zero.hpp"
0N/A static bool find(address pc, outputStream* st = tty); // OS specific function to make sense out of an address
2636N/A static void print_statistics();
2636N/A static void hint_no_preempt();