Skip to content

Commit 940d196

Browse files
committed
8328604: remove on_aix() function
Reviewed-by: clanger, stuefe
1 parent d44aaa3 commit 940d196

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
@@ -786,10 +786,8 @@ bool os::create_thread(Thread* thread, ThreadType thr_type,
786786
guarantee(pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED) == 0, "???");
787787

788788
// Make sure we run in 1:1 kernel-user-thread mode.
789-
if (os::Aix::on_aix()) {
790-
guarantee(pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM) == 0, "???");
791-
guarantee(pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED) == 0, "???");
792-
}
789+
guarantee(pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM) == 0, "???");
790+
guarantee(pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED) == 0, "???");
793791

794792
// Start in suspended state, and in os::thread_start, wake the thread up.
795793
guarantee(pthread_attr_setsuspendstate_np(&attr, PTHREAD_CREATE_SUSPENDED_NP) == 0, "???");
@@ -1295,22 +1293,10 @@ void os::print_memory_info(outputStream* st) {
12951293

12961294
os::Aix::meminfo_t mi;
12971295
if (os::Aix::get_meminfo(&mi)) {
1298-
if (os::Aix::on_aix()) {
1299-
st->print_cr("physical total : " SIZE_FORMAT, mi.real_total);
1300-
st->print_cr("physical free : " SIZE_FORMAT, mi.real_free);
1301-
st->print_cr("swap total : " SIZE_FORMAT, mi.pgsp_total);
1302-
st->print_cr("swap free : " SIZE_FORMAT, mi.pgsp_free);
1303-
} else {
1304-
// PASE - Numbers are result of QWCRSSTS; they mean:
1305-
// real_total: Sum of all system pools
1306-
// real_free: always 0
1307-
// pgsp_total: we take the size of the system ASP
1308-
// pgsp_free: size of system ASP times percentage of system ASP unused
1309-
st->print_cr("physical total : " SIZE_FORMAT, mi.real_total);
1310-
st->print_cr("system asp total : " SIZE_FORMAT, mi.pgsp_total);
1311-
st->print_cr("%% system asp used : %.2f",
1312-
mi.pgsp_total ? (100.0f * (mi.pgsp_total - mi.pgsp_free) / mi.pgsp_total) : -1.0f);
1313-
}
1296+
st->print_cr("physical total : " SIZE_FORMAT, mi.real_total);
1297+
st->print_cr("physical free : " SIZE_FORMAT, mi.real_free);
1298+
st->print_cr("swap total : " SIZE_FORMAT, mi.pgsp_total);
1299+
st->print_cr("swap free : " SIZE_FORMAT, mi.pgsp_free);
13141300
}
13151301
st->cr();
13161302

@@ -2420,9 +2406,7 @@ void os::init(void) {
24202406
}
24212407

24222408
// Reset the perfstat information provided by ODM.
2423-
if (os::Aix::on_aix()) {
2424-
libperfstat::perfstat_reset();
2425-
}
2409+
libperfstat::perfstat_reset();
24262410

24272411
// Now initialize basic system properties. Note that for some of the values we
24282412
// need libperfstat etc.
@@ -2943,9 +2927,7 @@ void os::Aix::initialize_libo4() {
29432927
}
29442928
}
29452929

2946-
// AIX: initialize the libperfstat library.
29472930
void os::Aix::initialize_libperfstat() {
2948-
assert(os::Aix::on_aix(), "AIX only");
29492931
if (!libperfstat::init()) {
29502932
trcVerbose("libperfstat initialization failed.");
29512933
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)