< prev index next >

src/hotspot/os/bsd/os_perf_bsd.cpp

Print this page
rev 56924 : 8233787: Break cycle in vm_version* includes
Reviewed-by:


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




   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  *
  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 CPU_HEADER(vm_version_ext)
  30 
  31 #ifdef __APPLE__
  32   #import <libproc.h>
  33   #include <sys/time.h>
  34   #include <sys/sysctl.h>
  35   #include <mach/mach.h>
  36   #include <mach/task_info.h>
  37   #include <sys/socket.h>
  38   #include <net/if.h>
  39   #include <net/if_dl.h>
  40   #include <net/route.h>
  41 #endif
  42 
  43 static const double NANOS_PER_SEC = 1000000000.0;
  44 
  45 class CPUPerformanceInterface::CPUPerformance : public CHeapObj<mtInternal> {
  46    friend class CPUPerformanceInterface;
  47  private:
  48   long _total_cpu_nanos;
  49   long _total_csr_nanos;


< prev index next >