< prev index next >

src/hotspot/os/aix/libperfstat_aix.cpp

Print this page
rev 48720 : 8196487: AIX: os::get_summary_cpu_info does not need to call into libperfstat

*** 1,7 **** /* ! * Copyright (c) 2012, 2016 SAP SE. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. --- 1,7 ---- /* ! * Copyright (c) 2012, 2018 SAP SE. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 24,34 **** #include "libperfstat_aix.hpp" #include "misc_aix.hpp" #include <dlfcn.h> - #include <sys/systemcfg.h> // Handle to the libperfstat. static void* g_libhandle = NULL; typedef int (*fun_perfstat_cpu_total_t) (perfstat_id_t *name, PERFSTAT_CPU_TOTAL_T_LATEST* userbuff, --- 24,33 ----
*** 156,176 **** } //////////////////// convenience functions, release-independent ///////////////////////////// - // Excerpts from systemcfg.h definitions newer than AIX 5.3 (our oldest build platform) - - #define PV_6 0x100000 /* Power PC 6 */ - #define PV_6_1 0x100001 /* Power PC 6 DD1.x */ - #define PV_7 0x200000 /* Power PC 7 */ - #define PV_5_Compat 0x0F8000 /* Power PC 5 */ - #define PV_6_Compat 0x108000 /* Power PC 6 */ - #define PV_7_Compat 0x208000 /* Power PC 7 */ - #define PV_8 0x300000 /* Power PC 8 */ - #define PV_8_Compat 0x308000 /* Power PC 8 */ - // Retrieve global cpu information. bool libperfstat::get_cpuinfo(cpuinfo_t* pci) { assert(pci, "get_cpuinfo: invalid parameter"); --- 155,164 ----
*** 189,199 **** } } } // Global cpu information. ! strcpy (pci->description, psct.description); pci->processorHZ = psct.processorHZ; pci->ncpus = psct.ncpus; for (int i = 0; i < 3; i++) { pci->loadavg[i] = (double) psct.loadavg[i] / (1 << SBITS); } --- 177,187 ---- } } } // Global cpu information. ! strcpy(pci->description, psct.description); pci->processorHZ = psct.processorHZ; pci->ncpus = psct.ncpus; for (int i = 0; i < 3; i++) { pci->loadavg[i] = (double) psct.loadavg[i] / (1 << SBITS); }
*** 201,249 **** pci->user_clock_ticks = psct.user; pci->sys_clock_ticks = psct.sys; pci->idle_clock_ticks = psct.idle; pci->wait_clock_ticks = psct.wait; - // Get the processor version from _system_configuration. - switch (_system_configuration.version) { - case PV_8: - strcpy(pci->version, "Power PC 8"); - break; - case PV_7: - strcpy(pci->version, "Power PC 7"); - break; - case PV_6_1: - strcpy(pci->version, "Power PC 6 DD1.x"); - break; - case PV_6: - strcpy(pci->version, "Power PC 6"); - break; - case PV_5: - strcpy(pci->version, "Power PC 5"); - break; - case PV_5_2: - strcpy(pci->version, "Power PC 5_2"); - break; - case PV_5_3: - strcpy(pci->version, "Power PC 5_3"); - break; - case PV_5_Compat: - strcpy(pci->version, "PV_5_Compat"); - break; - case PV_6_Compat: - strcpy(pci->version, "PV_6_Compat"); - break; - case PV_7_Compat: - strcpy(pci->version, "PV_7_Compat"); - break; - case PV_8_Compat: - strcpy(pci->version, "PV_8_Compat"); - break; - default: - strcpy(pci->version, "unknown"); - } - return true; } // Retrieve partition information. bool libperfstat::get_partitioninfo(partitioninfo_t* ppi) { --- 189,198 ----
< prev index next >