< prev index next >

src/java.base/unix/native/libjli/java_md_solinux.c

Print this page
rev 56236 : 8241638: launcher time metrics always report 1 on Linux when _JAVA_LAUNCHER_DEBUG set
Reviewed-by: alanb, dholmes
Contributed-by: linzang@tencent.com


 813 void
 814 PostJVMInit(JNIEnv *env, jclass mainClass, JavaVM *vm)
 815 {
 816     // stubbed out for windows and *nixes.
 817 }
 818 
 819 void
 820 RegisterThread()
 821 {
 822     // stubbed out for windows and *nixes.
 823 }
 824 
 825 /*
 826  * on unix, we return a false to indicate this option is not applicable
 827  */
 828 jboolean
 829 ProcessPlatformOption(const char *arg)
 830 {
 831     return JNI_FALSE;
 832 }























 813 void
 814 PostJVMInit(JNIEnv *env, jclass mainClass, JavaVM *vm)
 815 {
 816     // stubbed out for windows and *nixes.
 817 }
 818 
 819 void
 820 RegisterThread()
 821 {
 822     // stubbed out for windows and *nixes.
 823 }
 824 
 825 /*
 826  * on unix, we return a false to indicate this option is not applicable
 827  */
 828 jboolean
 829 ProcessPlatformOption(const char *arg)
 830 {
 831     return JNI_FALSE;
 832 }
 833 
 834 #ifndef __solaris__
 835 
 836 /*
 837  * Provide a CounterGet() implementation based on gettimeofday() which
 838  * is universally available, even though it may not be 'high resolution'
 839  * compared to platforms that provide gethrtime() (like Solaris). It is
 840  * also subject to time-of-day changes, but alternatives may not be
 841  * known to be available at either build time or run time.
 842  */
 843 uint64_t CounterGet() {
 844     uint64_t result = 0;
 845     struct timeval tv;
 846     if (gettimeofday(&tv, NULL) != -1) {
 847         result = 1000000LL * (uint64_t)tv.tv_sec;
 848         result += (uint64_t)tv.tv_usec;
 849     }
 850     return result;
 851 }
 852 
 853 #endif // !__solaris__
< prev index next >