JVM execution slow when run in debug mode with debug agent attached
Issue
-
Slow class loading when running JVM in debug mode
java -agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=n ClassName -
During remote debugging- (agentlib:jdwp), an application spends a lot of time in JVM internals like
Unsafe.defineAnonymousClassorClass.getDeclaredConstructors.Sometimesthis happens on EDT and UI freezes occur.
Environment
- openjdk version
java-1.8.0-openjdk - Red Hat Enterprise Linux Workstation release 7.4 (Maipo)
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.