RFR: 8320129: "top" command during jtreg failure handler does not display CPU usage on OSX
Leonid Mesnik
lmesnik at openjdk.org
Fri Dec 1 01:04:20 UTC 2023
Description of problem and propsed fix from @plummercj
'
In test/failure_handler/src/share/conf/mac.properties we have:
process.top.app=top
process.top.args=-l 1
So top is run with the "-l 1" args, causing it to do one iteration and then exit. Unfortunately the first iteration always shows all 0's for CPU usage. If you do at least 2 iterations, you do see the proper CPU usage on the 2nd iteration. The user just needs to know to scroll down to see it. I suggest we start using "-l 2" unless someone has a better idea.
BTW, for proper CPU usage you can instead look at the failure handler "ps" output, which seems to be correct. But it is nice to have "top" produce the correct output so all the CPU hogs are at the top of the list.
'
I verified that top report contains now 2 samples.
-------------
Commit messages:
- 8320129: "top" command during jtreg failure handler does not display CPU usage on OSX
Changes: https://git.openjdk.org/jdk/pull/16915/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16915&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8320129
Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
Patch: https://git.openjdk.org/jdk/pull/16915.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/16915/head:pull/16915
PR: https://git.openjdk.org/jdk/pull/16915
More information about the core-libs-dev
mailing list