src/hotspot/os/linux/os_linux.hpp
changeset 58654 562bf1878089
parent 54485 ddc19ea5059c
child 59062 6530de931b8e
equal deleted inserted replaced
58653:71fef5fae9cc 58654:562bf1878089
    53   static bool _supports_fast_thread_cpu_time;
    53   static bool _supports_fast_thread_cpu_time;
    54 
    54 
    55   static GrowableArray<int>* _cpu_to_node;
    55   static GrowableArray<int>* _cpu_to_node;
    56   static GrowableArray<int>* _nindex_to_node;
    56   static GrowableArray<int>* _nindex_to_node;
    57 
    57 
    58   // 0x00000000 = uninitialized,
       
    59   // 0x01000000 = kernel version unknown,
       
    60   // otherwise a 32-bit number:
       
    61   // Ox00AABBCC
       
    62   // AA, Major Version
       
    63   // BB, Minor Version
       
    64   // CC, Fix   Version
       
    65   static uint32_t _os_version;
       
    66 
       
    67  protected:
    58  protected:
    68 
    59 
    69   static julong _physical_memory;
    60   static julong _physical_memory;
    70   static pthread_t _main_thread;
    61   static pthread_t _main_thread;
    71   static Mutex* _createThread_lock;
       
    72   static int _page_size;
    62   static int _page_size;
    73 
    63 
    74   static julong available_memory();
    64   static julong available_memory();
    75   static julong physical_memory() { return _physical_memory; }
    65   static julong physical_memory() { return _physical_memory; }
    76   static void set_physical_memory(julong phys_mem) { _physical_memory = phys_mem; }
    66   static void set_physical_memory(julong phys_mem) { _physical_memory = phys_mem; }
   134   static void set_fpu_control_word(int fpu_control);
   124   static void set_fpu_control_word(int fpu_control);
   135   static pthread_t main_thread(void)                                { return _main_thread; }
   125   static pthread_t main_thread(void)                                { return _main_thread; }
   136   // returns kernel thread id (similar to LWP id on Solaris), which can be
   126   // returns kernel thread id (similar to LWP id on Solaris), which can be
   137   // used to access /proc
   127   // used to access /proc
   138   static pid_t gettid();
   128   static pid_t gettid();
   139   static void set_createThread_lock(Mutex* lk)                      { _createThread_lock = lk; }
       
   140   static Mutex* createThread_lock(void)                             { return _createThread_lock; }
       
   141   static void hotspot_sigmask(Thread* thread);
   129   static void hotspot_sigmask(Thread* thread);
   142 
   130 
   143   static address   initial_thread_stack_bottom(void)                { return _initial_thread_stack_bottom; }
   131   static address   initial_thread_stack_bottom(void)                { return _initial_thread_stack_bottom; }
   144   static uintptr_t initial_thread_stack_size(void)                  { return _initial_thread_stack_size; }
   132   static uintptr_t initial_thread_stack_size(void)                  { return _initial_thread_stack_size; }
   145 
   133 
   194 
   182 
   195   static void capture_initial_stack(size_t max_size);
   183   static void capture_initial_stack(size_t max_size);
   196 
   184 
   197   // Stack overflow handling
   185   // Stack overflow handling
   198   static bool manually_expand_stack(JavaThread * t, address addr);
   186   static bool manually_expand_stack(JavaThread * t, address addr);
   199   static int max_register_window_saves_before_flushing();
       
   200 
   187 
   201   // fast POSIX clocks support
   188   // fast POSIX clocks support
   202   static void fast_thread_clock_init(void);
   189   static void fast_thread_clock_init(void);
   203 
   190 
   204   static int pthread_getcpuclockid(pthread_t tid, clockid_t *clock_id) {
   191   static int pthread_getcpuclockid(pthread_t tid, clockid_t *clock_id) {
   208   static bool supports_fast_thread_cpu_time() {
   195   static bool supports_fast_thread_cpu_time() {
   209     return _supports_fast_thread_cpu_time;
   196     return _supports_fast_thread_cpu_time;
   210   }
   197   }
   211 
   198 
   212   static jlong fast_thread_cpu_time(clockid_t clockid);
   199   static jlong fast_thread_cpu_time(clockid_t clockid);
   213 
       
   214   static void initialize_os_info();
       
   215   static bool os_version_is_known();
       
   216   static uint32_t os_version();
       
   217 
   200 
   218   // Stack repair handling
   201   // Stack repair handling
   219 
   202 
   220   // none present
   203   // none present
   221 
   204