Skip to content
This repository was archived by the owner on Jul 17, 2024. It is now read-only.

Commit 3d6bd8e

Browse files
committed
8328604: remove on_aix() function
Backport-of: 940d1965f831a9f7e4f1ce34e381c038827c7ca2
1 parent 92d6fa4 commit 3d6bd8e

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

772772
// Make sure we run in 1:1 kernel-user-thread mode.
773-
if (os::Aix::on_aix()) {
774-
guarantee(pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM) == 0, "???");
775-
guarantee(pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED) == 0, "???");
776-
}
773+
guarantee(pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM) == 0, "???");
774+
guarantee(pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED) == 0, "???");
777775

778776
// Start in suspended state, and in os::thread_start, wake the thread up.
779777
guarantee(pthread_attr_setsuspendstate_np(&attr, PTHREAD_CREATE_SUSPENDED_NP) == 0, "???");
@@ -1279,22 +1277,10 @@ void os::print_memory_info(outputStream* st) {
12791277

12801278
os::Aix::meminfo_t mi;
12811279
if (os::Aix::get_meminfo(&mi)) {
1282-
if (os::Aix::on_aix()) {
1283-
st->print_cr("physical total : " SIZE_FORMAT, mi.real_total);
1284-
st->print_cr("physical free : " SIZE_FORMAT, mi.real_free);
1285-
st->print_cr("swap total : " SIZE_FORMAT, mi.pgsp_total);
1286-
st->print_cr("swap free : " SIZE_FORMAT, mi.pgsp_free);
1287-
} else {
1288-
// PASE - Numbers are result of QWCRSSTS; they mean:
1289-
// real_total: Sum of all system pools
1290-
// real_free: always 0
1291-
// pgsp_total: we take the size of the system ASP
1292-
// pgsp_free: size of system ASP times percentage of system ASP unused
1293-
st->print_cr("physical total : " SIZE_FORMAT, mi.real_total);
1294-
st->print_cr("system asp total : " SIZE_FORMAT, mi.pgsp_total);
1295-
st->print_cr("%% system asp used : %.2f",
1296-
mi.pgsp_total ? (100.0f * (mi.pgsp_total - mi.pgsp_free) / mi.pgsp_total) : -1.0f);
1297-
}
1280+
st->print_cr("physical total : " SIZE_FORMAT, mi.real_total);
1281+
st->print_cr("physical free : " SIZE_FORMAT, mi.real_free);
1282+
st->print_cr("swap total : " SIZE_FORMAT, mi.pgsp_total);
1283+
st->print_cr("swap free : " SIZE_FORMAT, mi.pgsp_free);
12981284
}
12991285
st->cr();
13001286

@@ -2383,9 +2369,7 @@ void os::init(void) {
23832369
}
23842370

23852371
// Reset the perfstat information provided by ODM.
2386-
if (os::Aix::on_aix()) {
2387-
libperfstat::perfstat_reset();
2388-
}
2372+
libperfstat::perfstat_reset();
23892373

23902374
// Now initialize basic system properties. Note that for some of the values we
23912375
// need libperfstat etc.
@@ -2956,9 +2940,7 @@ void os::Aix::initialize_libo4() {
29562940
}
29572941
}
29582942

2959-
// AIX: initialize the libperfstat library.
29602943
void os::Aix::initialize_libperfstat() {
2961-
assert(os::Aix::on_aix(), "AIX only");
29622944
if (!libperfstat::init()) {
29632945
trcVerbose("libperfstat initialization failed.");
29642946
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)