Skip to content

Commit 88abc6a

Browse files
committed
8328604: remove on_aix() function
Backport-of: 940d1965f831a9f7e4f1ce34e381c038827c7ca2
1 parent fd50739 commit 88abc6a

File tree

2 files changed

+9
-39
lines changed

2 files changed

+9
-39
lines changed

src/hotspot/os/aix/os_aix.cpp

Lines changed: 7 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -765,10 +765,8 @@ bool os::create_thread(Thread* thread, ThreadType thr_type,
765765
guarantee(pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED) == 0, "???");
766766

767767
// Make sure we run in 1:1 kernel-user-thread mode.
768-
if (os::Aix::on_aix()) {
769-
guarantee(pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM) == 0, "???");
770-
guarantee(pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED) == 0, "???");
771-
}
768+
guarantee(pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM) == 0, "???");
769+
guarantee(pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED) == 0, "???");
772770

773771
// Start in suspended state, and in os::thread_start, wake the thread up.
774772
guarantee(pthread_attr_setsuspendstate_np(&attr, PTHREAD_CREATE_SUSPENDED_NP) == 0, "???");
@@ -1271,22 +1269,10 @@ void os::print_memory_info(outputStream* st) {
12711269

12721270
os::Aix::meminfo_t mi;
12731271
if (os::Aix::get_meminfo(&mi)) {
1274-
if (os::Aix::on_aix()) {
1275-
st->print_cr("physical total : " SIZE_FORMAT, mi.real_total);
1276-
st->print_cr("physical free : " SIZE_FORMAT, mi.real_free);
1277-
st->print_cr("swap total : " SIZE_FORMAT, mi.pgsp_total);
1278-
st->print_cr("swap free : " SIZE_FORMAT, mi.pgsp_free);
1279-
} else {
1280-
// PASE - Numbers are result of QWCRSSTS; they mean:
1281-
// real_total: Sum of all system pools
1282-
// real_free: always 0
1283-
// pgsp_total: we take the size of the system ASP
1284-
// pgsp_free: size of system ASP times percentage of system ASP unused
1285-
st->print_cr("physical total : " SIZE_FORMAT, mi.real_total);
1286-
st->print_cr("system asp total : " SIZE_FORMAT, mi.pgsp_total);
1287-
st->print_cr("%% system asp used : %.2f",
1288-
mi.pgsp_total ? (100.0f * (mi.pgsp_total - mi.pgsp_free) / mi.pgsp_total) : -1.0f);
1289-
}
1272+
st->print_cr("physical total : " SIZE_FORMAT, mi.real_total);
1273+
st->print_cr("physical free : " SIZE_FORMAT, mi.real_free);
1274+
st->print_cr("swap total : " SIZE_FORMAT, mi.pgsp_total);
1275+
st->print_cr("swap free : " SIZE_FORMAT, mi.pgsp_free);
12901276
}
12911277
st->cr();
12921278

@@ -2367,9 +2353,7 @@ void os::init(void) {
23672353
}
23682354

23692355
// Reset the perfstat information provided by ODM.
2370-
if (os::Aix::on_aix()) {
2371-
libperfstat::perfstat_reset();
2372-
}
2356+
libperfstat::perfstat_reset();
23732357

23742358
// Now initialize basic system properties. Note that for some of the values we
23752359
// need libperfstat etc.
@@ -2940,9 +2924,7 @@ void os::Aix::initialize_libo4() {
29402924
}
29412925
}
29422926

2943-
// AIX: initialize the libperfstat library.
29442927
void os::Aix::initialize_libperfstat() {
2945-
assert(os::Aix::on_aix(), "AIX only");
29462928
if (!libperfstat::init()) {
29472929
trcVerbose("libperfstat initialization failed.");
29482930
assert(false, "libperfstat initialization failed");

src/hotspot/os/aix/os_aix.hpp

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
2-
* Copyright (c) 1999, 2023, Oracle and/or its affiliates. All rights reserved.
3-
* Copyright (c) 2013, 2023 SAP SE. All rights reserved.
2+
* Copyright (c) 1999, 2024, Oracle and/or its affiliates. All rights reserved.
3+
* Copyright (c) 2013, 2024 SAP SE. All rights reserved.
44
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55
*
66
* This code is free software; you can redistribute it and/or modify it
@@ -101,13 +101,6 @@ class os::Aix {
101101
return _on_pase ? true : false;
102102
}
103103

104-
// Function returns true if we run on AIX, false if we run on OS/400
105-
// (pase).
106-
static bool on_aix() {
107-
assert(_on_pase != -1, "not initialized");
108-
return _on_pase ? false : true;
109-
}
110-
111104
// Get 4 byte AIX kernel version number:
112105
// highest 2 bytes: Version, Release
113106
// if available: lowest 2 bytes: Tech Level, Service Pack.
@@ -130,11 +123,6 @@ class os::Aix {
130123
return on_pase() && os_version_short() <= 0x0504;
131124
}
132125

133-
// Convenience method: returns true if running on AIX 5.3 or older.
134-
static bool on_aix_53_or_older() {
135-
return on_aix() && os_version_short() <= 0x0503;
136-
}
137-
138126
// Returns true if we run in SPEC1170 compliant mode (XPG_SUS_ENV=ON).
139127
static bool xpg_sus_mode() {
140128
assert(_xpg_sus_mode != -1, "not initialized");

0 commit comments

Comments
 (0)