JVM execution slow when run in debug mode with debug agent attached

Solution Verified - Updated -

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.defineAnonymousClass or Class.getDeclaredConstructors.Sometimes this 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.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content