806 //
807 // If user_sys_cpu_time is true, user+sys time is returned.
808 // Otherwise, only user time is returned
809 static jlong current_thread_cpu_time(bool user_sys_cpu_time);
810 static jlong thread_cpu_time(Thread* t, bool user_sys_cpu_time);
811
812 // Return a bunch of info about the timers.
813 // Note that the returned info for these two functions may be different
814 // on some platforms
815 static void current_thread_cpu_time_info(jvmtiTimerInfo *info_ptr);
816 static void thread_cpu_time_info(jvmtiTimerInfo *info_ptr);
817
818 static bool is_thread_cpu_time_supported();
819
820 // System loadavg support. Returns -1 if load average cannot be obtained.
821 static int loadavg(double loadavg[], int nelem);
822
823 // Amount beyond the callee frame size that we bang the stack.
824 static int extra_bang_size_in_bytes();
825
826 static char** split_path(const char* path, int* n);
827
828 // Extensions
829 #include "runtime/os_ext.hpp"
830
831 public:
832 class CrashProtectionCallback : public StackObj {
833 public:
834 virtual void call() = 0;
835 };
836
837 // Platform dependent stuff
838 #ifndef _WINDOWS
839 # include "os_posix.hpp"
840 #endif
841 #include OS_CPU_HEADER(os)
842 #include OS_HEADER(os)
843
844 #ifndef OS_NATIVE_THREAD_CREATION_FAILED_MSG
845 #define OS_NATIVE_THREAD_CREATION_FAILED_MSG "unable to create native thread: possibly out of memory or process/resource limits reached"
846 #endif
|
806 //
807 // If user_sys_cpu_time is true, user+sys time is returned.
808 // Otherwise, only user time is returned
809 static jlong current_thread_cpu_time(bool user_sys_cpu_time);
810 static jlong thread_cpu_time(Thread* t, bool user_sys_cpu_time);
811
812 // Return a bunch of info about the timers.
813 // Note that the returned info for these two functions may be different
814 // on some platforms
815 static void current_thread_cpu_time_info(jvmtiTimerInfo *info_ptr);
816 static void thread_cpu_time_info(jvmtiTimerInfo *info_ptr);
817
818 static bool is_thread_cpu_time_supported();
819
820 // System loadavg support. Returns -1 if load average cannot be obtained.
821 static int loadavg(double loadavg[], int nelem);
822
823 // Amount beyond the callee frame size that we bang the stack.
824 static int extra_bang_size_in_bytes();
825
826 static char** split_path(const char* path, size_t* elements, size_t file_name_length);
827
828 // Extensions
829 #include "runtime/os_ext.hpp"
830
831 public:
832 class CrashProtectionCallback : public StackObj {
833 public:
834 virtual void call() = 0;
835 };
836
837 // Platform dependent stuff
838 #ifndef _WINDOWS
839 # include "os_posix.hpp"
840 #endif
841 #include OS_CPU_HEADER(os)
842 #include OS_HEADER(os)
843
844 #ifndef OS_NATIVE_THREAD_CREATION_FAILED_MSG
845 #define OS_NATIVE_THREAD_CREATION_FAILED_MSG "unable to create native thread: possibly out of memory or process/resource limits reached"
846 #endif
|