150 151 // Get summary strings for system information in buffer provided 152 static void get_summary_cpu_info(char* buf, size_t buflen); 153 static void get_summary_os_info(char* buf, size_t buflen); 154 155 static void initialize_initial_active_processor_count(); 156 157 LINUX_ONLY(static void pd_init_container_support();) 158 159 public: 160 static void init(void); // Called before command line parsing 161 162 static void init_container_support() { // Called during command line parsing. 163 LINUX_ONLY(pd_init_container_support();) 164 } 165 166 static void init_before_ergo(void); // Called after command line parsing 167 // before VM ergonomics processing. 168 static jint init_2(void); // Called after command line parsing 169 // and VM ergonomics processing 170 static void init_globals(void) { // Called from init_globals() in init.cpp 171 init_globals_ext(); 172 } 173 174 // unset environment variable 175 static bool unsetenv(const char* name); 176 177 static bool have_special_privileges(); 178 179 static jlong javaTimeMillis(); 180 static jlong javaTimeNanos(); 181 static void javaTimeNanos_info(jvmtiTimerInfo *info_ptr); 182 static void javaTimeSystemUTC(jlong &seconds, jlong &nanos); 183 static void run_periodic_checks(); 184 static bool supports_monotonic_clock(); 185 186 // Returns the elapsed time in seconds since the vm started. 187 static double elapsedTime(); 188 189 // Returns real time in seconds since an arbitrary point 190 // in the past. 191 static bool getTimesSecs(double* process_real_time, 192 double* process_user_time, 808 static jlong thread_cpu_time(Thread* t, bool user_sys_cpu_time); 809 810 // Return a bunch of info about the timers. 811 // Note that the returned info for these two functions may be different 812 // on some platforms 813 static void current_thread_cpu_time_info(jvmtiTimerInfo *info_ptr); 814 static void thread_cpu_time_info(jvmtiTimerInfo *info_ptr); 815 816 static bool is_thread_cpu_time_supported(); 817 818 // System loadavg support. Returns -1 if load average cannot be obtained. 819 static int loadavg(double loadavg[], int nelem); 820 821 // Amount beyond the callee frame size that we bang the stack. 822 static int extra_bang_size_in_bytes(); 823 824 static char** split_path(const char* path, size_t* elements, size_t file_name_length); 825 826 // support for mapping non-volatile memory using MAP_SYNC 827 static bool supports_map_sync(); 828 829 // Extensions 830 #include "runtime/os_ext.hpp" 831 832 public: 833 class CrashProtectionCallback : public StackObj { 834 public: 835 virtual void call() = 0; 836 }; 837 838 // Platform dependent stuff 839 #ifndef _WINDOWS 840 # include "os_posix.hpp" 841 #endif 842 #include OS_CPU_HEADER(os) 843 #include OS_HEADER(os) 844 845 #ifndef OS_NATIVE_THREAD_CREATION_FAILED_MSG 846 #define OS_NATIVE_THREAD_CREATION_FAILED_MSG "unable to create native thread: possibly out of memory or process/resource limits reached" 847 #endif 848 849 public: 850 #ifndef PLATFORM_PRINT_NATIVE_STACK | 150 151 // Get summary strings for system information in buffer provided 152 static void get_summary_cpu_info(char* buf, size_t buflen); 153 static void get_summary_os_info(char* buf, size_t buflen); 154 155 static void initialize_initial_active_processor_count(); 156 157 LINUX_ONLY(static void pd_init_container_support();) 158 159 public: 160 static void init(void); // Called before command line parsing 161 162 static void init_container_support() { // Called during command line parsing. 163 LINUX_ONLY(pd_init_container_support();) 164 } 165 166 static void init_before_ergo(void); // Called after command line parsing 167 // before VM ergonomics processing. 168 static jint init_2(void); // Called after command line parsing 169 // and VM ergonomics processing 170 171 // unset environment variable 172 static bool unsetenv(const char* name); 173 174 static bool have_special_privileges(); 175 176 static jlong javaTimeMillis(); 177 static jlong javaTimeNanos(); 178 static void javaTimeNanos_info(jvmtiTimerInfo *info_ptr); 179 static void javaTimeSystemUTC(jlong &seconds, jlong &nanos); 180 static void run_periodic_checks(); 181 static bool supports_monotonic_clock(); 182 183 // Returns the elapsed time in seconds since the vm started. 184 static double elapsedTime(); 185 186 // Returns real time in seconds since an arbitrary point 187 // in the past. 188 static bool getTimesSecs(double* process_real_time, 189 double* process_user_time, 805 static jlong thread_cpu_time(Thread* t, bool user_sys_cpu_time); 806 807 // Return a bunch of info about the timers. 808 // Note that the returned info for these two functions may be different 809 // on some platforms 810 static void current_thread_cpu_time_info(jvmtiTimerInfo *info_ptr); 811 static void thread_cpu_time_info(jvmtiTimerInfo *info_ptr); 812 813 static bool is_thread_cpu_time_supported(); 814 815 // System loadavg support. Returns -1 if load average cannot be obtained. 816 static int loadavg(double loadavg[], int nelem); 817 818 // Amount beyond the callee frame size that we bang the stack. 819 static int extra_bang_size_in_bytes(); 820 821 static char** split_path(const char* path, size_t* elements, size_t file_name_length); 822 823 // support for mapping non-volatile memory using MAP_SYNC 824 static bool supports_map_sync(); 825 826 public: 827 class CrashProtectionCallback : public StackObj { 828 public: 829 virtual void call() = 0; 830 }; 831 832 // Platform dependent stuff 833 #ifndef _WINDOWS 834 # include "os_posix.hpp" 835 #endif 836 #include OS_CPU_HEADER(os) 837 #include OS_HEADER(os) 838 839 #ifndef OS_NATIVE_THREAD_CREATION_FAILED_MSG 840 #define OS_NATIVE_THREAD_CREATION_FAILED_MSG "unable to create native thread: possibly out of memory or process/resource limits reached" 841 #endif 842 843 public: 844 #ifndef PLATFORM_PRINT_NATIVE_STACK |