On Fri, 1 Dec 2023 00:58:57 GMT, Leonid Mesnik <lmes...@openjdk.org> wrote:

> 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.

Hello Leonid, this looks OK to me. I see that the `windows.properties` and 
`linux.properties` for the `top` command use `-n 1`. Should we be doing a 
similar change in those files too, to use `-n 2`?

-------------

PR Comment: https://git.openjdk.org/jdk/pull/16915#issuecomment-1835801008

Reply via email to