--- a/src/hotspot/os/aix/os_aix.cpp Wed Jan 31 15:10:04 2018 +0100
+++ b/src/hotspot/os/aix/os_aix.cpp Wed Jan 31 16:48:41 2018 +0100
@@ -1,6 +1,6 @@
/*
* Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2012, 2017 SAP SE. All rights reserved.
+ * 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
@@ -117,7 +117,7 @@
#if !defined(_AIXVERSION_610)
extern "C" int getthrds64(pid_t, struct thrdentry64*, int, tid64_t*, int);
extern "C" int getprocs64(procentry64*, int, fdsinfo*, int, pid_t*, int);
-extern "C" int getargs (procsinfo*, int, char*, int);
+extern "C" int getargs(procsinfo*, int, char*, int);
#endif
#define MAX_PATH (2 * K)
@@ -130,6 +130,32 @@
#define ERROR_MP_VMGETINFO_FAILED 102
#define ERROR_MP_VMGETINFO_CLAIMS_NO_SUPPORT_FOR_64K 103
+// excerpts from systemcfg.h that might be missing on older os levels
+#ifndef PV_5_Compat
+ #define PV_5_Compat 0x0F8000 /* Power PC 5 */
+#endif
+#ifndef PV_6
+ #define PV_6 0x100000 /* Power PC 6 */
+#endif
+#ifndef PV_6_1
+ #define PV_6_1 0x100001 /* Power PC 6 DD1.x */
+#endif
+#ifndef PV_6_Compat
+ #define PV_6_Compat 0x108000 /* Power PC 6 */
+#endif
+#ifndef PV_7
+ #define PV_7 0x200000 /* Power PC 7 */
+#endif
+#ifndef PV_7_Compat
+ #define PV_7_Compat 0x208000 /* Power PC 7 */
+#endif
+#ifndef PV_8
+ #define PV_8 0x300000 /* Power PC 8 */
+#endif
+#ifndef PV_8_Compat
+ #define PV_8_Compat 0x308000 /* Power PC 8 */
+#endif
+
static address resolve_function_descriptor_to_code_pointer(address p);
static void vmembk_print_on(outputStream* os);
@@ -1445,17 +1471,48 @@
// Get a string for the cpuinfo that is a summary of the cpu type
void os::get_summary_cpu_info(char* buf, size_t buflen) {
- // This looks good
- libperfstat::cpuinfo_t ci;
- if (libperfstat::get_cpuinfo(&ci)) {
- strncpy(buf, ci.version, buflen);
- } else {
- strncpy(buf, "AIX", buflen);
+ // read _system_configuration.version
+ switch (_system_configuration.version) {
+ case PV_8:
+ strncpy(buf, "Power PC 8", buflen);
+ break;
+ case PV_7:
+ strncpy(buf, "Power PC 7", buflen);
+ break;
+ case PV_6_1:
+ strncpy(buf, "Power PC 6 DD1.x", buflen);
+ break;
+ case PV_6:
+ strncpy(buf, "Power PC 6", buflen);
+ break;
+ case PV_5:
+ strncpy(buf, "Power PC 5", buflen);
+ break;
+ case PV_5_2:
+ strncpy(buf, "Power PC 5_2", buflen);
+ break;
+ case PV_5_3:
+ strncpy(buf, "Power PC 5_3", buflen);
+ break;
+ case PV_5_Compat:
+ strncpy(buf, "PV_5_Compat", buflen);
+ break;
+ case PV_6_Compat:
+ strncpy(buf, "PV_6_Compat", buflen);
+ break;
+ case PV_7_Compat:
+ strncpy(buf, "PV_7_Compat", buflen);
+ break;
+ case PV_8_Compat:
+ strncpy(buf, "PV_8_Compat", buflen);
+ break;
+ default:
+ strncpy(buf, "unknown", buflen);
}
}
void os::pd_print_cpu_info(outputStream* st, char* buf, size_t buflen) {
- // Nothing to do beyond what os::print_cpu_info() does.
+ // Nothing to do beyond of what os::print_cpu_info() does.
}
static void print_signal_handler(outputStream* st, int sig,