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