< prev index next >

src/hotspot/os/bsd/os_perf_bsd.cpp

Print this page




  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  *
  23  */
  24 #include "precompiled.hpp"
  25 #include "memory/allocation.inline.hpp"
  26 #include "memory/resourceArea.hpp"
  27 #include "runtime/os.hpp"
  28 #include "runtime/os_perf.hpp"
  29 #include "utilities/globalDefinitions.hpp"
  30 #include "vm_version_ext_x86.hpp"
  31 
  32 #ifdef __APPLE__
  33   #import <libproc.h>
  34   #include <sys/time.h>
  35   #include <sys/sysctl.h>
  36   #include <mach/mach.h>
  37   #include <mach/task_info.h>
  38   #include <sys/socket.h>
  39   #include <net/if.h>
  40   #include <net/if_dl.h>
  41   #include <net/route.h>
  42 #endif
  43 
  44 static const double NANOS_PER_SEC = 1000000000.0;
  45 
  46 class CPUPerformanceInterface::CPUPerformance : public CHeapObj<mtInternal> {
  47    friend class CPUPerformanceInterface;
  48  private:
  49   long _total_cpu_nanos;
  50   long _total_csr_nanos;




  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  *
  23  */
  24 #include "precompiled.hpp"
  25 #include "memory/allocation.inline.hpp"
  26 #include "memory/resourceArea.hpp"
  27 #include "runtime/os.hpp"
  28 #include "runtime/os_perf.hpp"
  29 #include "utilities/globalDefinitions.hpp"
  30 #include CPU_HEADER(vm_version_ext)
  31 
  32 #ifdef __APPLE__
  33   #import <libproc.h>
  34   #include <sys/time.h>
  35   #include <sys/sysctl.h>
  36   #include <mach/mach.h>
  37   #include <mach/task_info.h>
  38   #include <sys/socket.h>
  39   #include <net/if.h>
  40   #include <net/if_dl.h>
  41   #include <net/route.h>
  42 #endif
  43 
  44 static const double NANOS_PER_SEC = 1000000000.0;
  45 
  46 class CPUPerformanceInterface::CPUPerformance : public CHeapObj<mtInternal> {
  47    friend class CPUPerformanceInterface;
  48  private:
  49   long _total_cpu_nanos;
  50   long _total_csr_nanos;


< prev index next >