On Tue, 20 May 2025 15:32:21 GMT, Suchismith Roy <s...@openjdk.org> wrote:
> JBS Issue : [JDK-8030957](https://bugs.openjdk.org/browse/JDK-8030957) > > These two methods should be implemented in > src/aix/native/sun/management/AixOperatingSystem.c (which has to be created). > > getProcessCpuLoad() can be probably implemented in the same way like on > Solaris be reading /proc/self/psinfo > > For getSystemCpuLoad() we'll probalby have to use 'perfstat_cpu_total()' from > libperf (see > http://publib.boulder.ibm.com/infocenter/pseries/v5r3/topic/com.ibm.aix.prftools/doc/prftools/prftools07.htm#wq407) > > Once this issue has been resolved you should not forget to remove the two > excludes from jdk/test/ProblemList.txt: > > com/sun/management/OperatingSystemMXBean/GetProcessCpuLoad.java aix-all > com/sun/management/OperatingSystemMXBean/GetSystemCpuLoad.java aix-all Are you sure the perfstat functionality is always available ? In HS we do dynamic resolution (see e.g. os_perf_aix.cpp), but maybe that was needed long time ago and is not really needed any more? But please check this . If we only address minimum AIX 7.2 we can probably simplify this approach or even go away from the current dynamic loading approach. See also https://bugs.openjdk.org/browse/JDK-8222719 where I did already some cleanup (but kept the AIX 7.1 vs. 7.2 ) . There is still an fflush(stdout); in UnixOperatingSystem.c - guess this is not needed any more? Maybe you can check the system tools you mentioned with 'trace' or 'tprof' or something similar to find out more about what they do and why they differ? src/jdk.management/aix/native/libmanagement_ext/UnixOperatingSystem.c line 57: > 55: > 56: ret = perfstat_cpu_total(NULL, &cpu_total, > sizeof(perfstat_cpu_total_t), 1); > 57: if (ret <= 0) { I noticed that we check for retval < 0 in os_perf_aix.cpp, should we align this in some way ? ------------- PR Comment: https://git.openjdk.org/jdk/pull/25332#issuecomment-2896875648 PR Comment: https://git.openjdk.org/jdk/pull/25332#issuecomment-3048932756 PR Comment: https://git.openjdk.org/jdk/pull/25332#issuecomment-3056023114 PR Comment: https://git.openjdk.org/jdk/pull/25332#issuecomment-3106958683 PR Review Comment: https://git.openjdk.org/jdk/pull/25332#discussion_r2099545296