src/share/vm/runtime/os.hpp

Print this page


   1 /*
   2  * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *


 144   static void init_before_ergo(void);          // Called after command line parsing
 145                                                // before VM ergonomics processing.
 146   static jint init_2(void);                    // Called after command line parsing
 147                                                // and VM ergonomics processing
 148   static void init_globals(void) {             // Called from init_globals() in init.cpp
 149     init_globals_ext();
 150   }
 151   static void init_3(void);                    // Called at the end of vm init
 152 
 153   // File names are case-insensitive on windows only
 154   // Override me as needed
 155   static int    file_name_strcmp(const char* s1, const char* s2);
 156 
 157   static bool getenv(const char* name, char* buffer, int len);
 158   static bool have_special_privileges();
 159 
 160   static jlong  javaTimeMillis();
 161   static jlong  javaTimeNanos();
 162   static void   javaTimeNanos_info(jvmtiTimerInfo *info_ptr);
 163   static void   run_periodic_checks();

 164 
 165 
 166   // Returns the elapsed time in seconds since the vm started.
 167   static double elapsedTime();
 168 
 169   // Returns real time in seconds since an arbitrary point
 170   // in the past.
 171   static bool getTimesSecs(double* process_real_time,
 172                            double* process_user_time,
 173                            double* process_system_time);
 174 
 175   // Interface to the performance counter
 176   static jlong elapsed_counter();
 177   static jlong elapsed_frequency();
 178 
 179   // The "virtual time" of a thread is the amount of time a thread has
 180   // actually run.  The first function indicates whether the OS supports
 181   // this functionality for the current thread, and if so:
 182   //   * the second enables vtime tracking (if that is required).
 183   //   * the third tells whether vtime is enabled.


   1 /*
   2  * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *


 144   static void init_before_ergo(void);          // Called after command line parsing
 145                                                // before VM ergonomics processing.
 146   static jint init_2(void);                    // Called after command line parsing
 147                                                // and VM ergonomics processing
 148   static void init_globals(void) {             // Called from init_globals() in init.cpp
 149     init_globals_ext();
 150   }
 151   static void init_3(void);                    // Called at the end of vm init
 152 
 153   // File names are case-insensitive on windows only
 154   // Override me as needed
 155   static int    file_name_strcmp(const char* s1, const char* s2);
 156 
 157   static bool getenv(const char* name, char* buffer, int len);
 158   static bool have_special_privileges();
 159 
 160   static jlong  javaTimeMillis();
 161   static jlong  javaTimeNanos();
 162   static void   javaTimeNanos_info(jvmtiTimerInfo *info_ptr);
 163   static void   run_periodic_checks();
 164   static bool   supports_monotonic_clock();
 165 
 166 
 167   // Returns the elapsed time in seconds since the vm started.
 168   static double elapsedTime();
 169 
 170   // Returns real time in seconds since an arbitrary point
 171   // in the past.
 172   static bool getTimesSecs(double* process_real_time,
 173                            double* process_user_time,
 174                            double* process_system_time);
 175 
 176   // Interface to the performance counter
 177   static jlong elapsed_counter();
 178   static jlong elapsed_frequency();
 179 
 180   // The "virtual time" of a thread is the amount of time a thread has
 181   // actually run.  The first function indicates whether the OS supports
 182   // this functionality for the current thread, and if so:
 183   //   * the second enables vtime tracking (if that is required).
 184   //   * the third tells whether vtime is enabled.