diff --git a/src/hotspot/os/aix/os_aix.cpp b/src/hotspot/os/aix/os_aix.cpp index fb54d36e9c7..87c8770a5b0 100644 --- a/src/hotspot/os/aix/os_aix.cpp +++ b/src/hotspot/os/aix/os_aix.cpp @@ -786,10 +786,8 @@ bool os::create_thread(Thread* thread, ThreadType thr_type, guarantee(pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED) == 0, "???"); // Make sure we run in 1:1 kernel-user-thread mode. - if (os::Aix::on_aix()) { - guarantee(pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM) == 0, "???"); - guarantee(pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED) == 0, "???"); - } + guarantee(pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM) == 0, "???"); + guarantee(pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED) == 0, "???"); // Start in suspended state, and in os::thread_start, wake the thread up. guarantee(pthread_attr_setsuspendstate_np(&attr, PTHREAD_CREATE_SUSPENDED_NP) == 0, "???"); @@ -1295,22 +1293,10 @@ void os::print_memory_info(outputStream* st) { os::Aix::meminfo_t mi; if (os::Aix::get_meminfo(&mi)) { - if (os::Aix::on_aix()) { - st->print_cr("physical total : " SIZE_FORMAT, mi.real_total); - st->print_cr("physical free : " SIZE_FORMAT, mi.real_free); - st->print_cr("swap total : " SIZE_FORMAT, mi.pgsp_total); - st->print_cr("swap free : " SIZE_FORMAT, mi.pgsp_free); - } else { - // PASE - Numbers are result of QWCRSSTS; they mean: - // real_total: Sum of all system pools - // real_free: always 0 - // pgsp_total: we take the size of the system ASP - // pgsp_free: size of system ASP times percentage of system ASP unused - st->print_cr("physical total : " SIZE_FORMAT, mi.real_total); - st->print_cr("system asp total : " SIZE_FORMAT, mi.pgsp_total); - st->print_cr("%% system asp used : %.2f", - mi.pgsp_total ? (100.0f * (mi.pgsp_total - mi.pgsp_free) / mi.pgsp_total) : -1.0f); - } + st->print_cr("physical total : " SIZE_FORMAT, mi.real_total); + st->print_cr("physical free : " SIZE_FORMAT, mi.real_free); + st->print_cr("swap total : " SIZE_FORMAT, mi.pgsp_total); + st->print_cr("swap free : " SIZE_FORMAT, mi.pgsp_free); } st->cr(); @@ -2420,9 +2406,7 @@ void os::init(void) { } // Reset the perfstat information provided by ODM. - if (os::Aix::on_aix()) { - libperfstat::perfstat_reset(); - } + libperfstat::perfstat_reset(); // Now initialize basic system properties. Note that for some of the values we // need libperfstat etc. @@ -2943,9 +2927,7 @@ void os::Aix::initialize_libo4() { } } -// AIX: initialize the libperfstat library. void os::Aix::initialize_libperfstat() { - assert(os::Aix::on_aix(), "AIX only"); if (!libperfstat::init()) { trcVerbose("libperfstat initialization failed."); assert(false, "libperfstat initialization failed"); diff --git a/src/hotspot/os/aix/os_aix.hpp b/src/hotspot/os/aix/os_aix.hpp index a1db2b2be3c..22fb5327bf9 100644 --- a/src/hotspot/os/aix/os_aix.hpp +++ b/src/hotspot/os/aix/os_aix.hpp @@ -1,6 +1,6 @@ /* - * Copyright (c) 1999, 2023, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2013, 2023 SAP SE. All rights reserved. + * Copyright (c) 1999, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2024 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 @@ -101,13 +101,6 @@ class os::Aix { return _on_pase ? true : false; } - // Function returns true if we run on AIX, false if we run on OS/400 - // (pase). - static bool on_aix() { - assert(_on_pase != -1, "not initialized"); - return _on_pase ? false : true; - } - // Get 4 byte AIX kernel version number: // highest 2 bytes: Version, Release // if available: lowest 2 bytes: Tech Level, Service Pack. @@ -130,11 +123,6 @@ class os::Aix { return on_pase() && os_version_short() <= 0x0504; } - // Convenience method: returns true if running on AIX 5.3 or older. - static bool on_aix_53_or_older() { - return on_aix() && os_version_short() <= 0x0503; - } - // Returns true if we run in SPEC1170 compliant mode (XPG_SUS_ENV=ON). static bool xpg_sus_mode() { assert(_xpg_sus_mode != -1, "not initialized");