Multithreaded method access point causing JVM scan

When debugging a Java process, which is usually ready in 90 seconds, my server application continued timing after 10 minutes because I had a method input breakpoint set before the breakpoint ever even had the ability to shut down.

According to the accepted answer to this SO question, this is at least in part due to the fact that the Hotspot JIT compiler is disabled when a write breakpoint is set. Why does a debugged program slow down so much when using method input debugging?

However, my JVM seemed to work orders of magnitude slower. The process I was debugging was multithreaded, and I was debugging remotely through eclipse. Looking at the task manager when the entry breakpoint was set, one core did a lot more work than the other kernels. With a remote breakpoint, the core load was even.

Although at least some of the slowness can be explained by disabling JIT compilation, I wonder if the checkpoints of the method entry are checked with the debugger process for each method call, actually causing the threads to synchronize during the remote debugger for each method call. For me, it seems like this could lead to a significant slowdown than the loss of JIT.

+4
source share
1 answer

I don’t think that the input control points of the method should lead to the fact that all calls are verified, and I did not read anything, specifically confirming this behavior.

The Java Debug interface provides policies for pausing event flows when a breakpoint is hit, and I think you already know these policies. I would expect the number of workflows to drop, perhaps even more threads than you expected would be suspended, and as a result, overall throughput would decrease significantly.

Also, since you were debugging remotely, is it likely that the network is experiencing delays, etc.?

0
source

Source: https://habr.com/ru/post/1391905/


All Articles