On a modern linux-x64 system, I launched jshell (built from current JDK 17 source), attached with "jhsdb clhsdb", and then ran jstack. It took well over a minute, even with a product build. I then tried "jhsdb jstack", and it seemed to take the same amount of time.
When I tried an old JDK 9 build, running jstack from clhsdb still took a long time, but results from "jhsdb jstack" were almost immediate. The output from both looked the same, except for each thread the slower clhsdb jstack version contained:
Locked ownable synchronizers:
- None
However, for the current JDK it is also true that clhsdb jstack displayed this output and jhsdb jstack did not, but both versions were slow. The current JDK also has a bit more information about the thread in the output.
When I tried an old JDK 9 build, running jstack from clhsdb still took a long time, but results from "jhsdb jstack" were almost immediate. The output from both looked the same, except for each thread the slower clhsdb jstack version contained:
Locked ownable synchronizers:
- None
However, for the current JDK it is also true that clhsdb jstack displayed this output and jhsdb jstack did not, but both versions were slow. The current JDK also has a bit more information about the thread in the output.
- duplicates
-
JDK-8324066 "clhsdb jstack" should not by default scan for j.u.c locks because it can be very slow
- Resolved
- relates to
-
JDK-8324066 "clhsdb jstack" should not by default scan for j.u.c locks because it can be very slow
- Resolved