Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6960970

Debugger very slow during stepping

XMLWordPrintable

    • x86
    • linux

      See http://netbeans.org/bugzilla/show_bug.cgi?id=187407

      Steps to reproduce:
      Get project from https://java-nio-charset-enhanced.dev.java.net/source/browse/java-nio-charset-enhanced/branches/JDK-7/j_l_Character_names/?rev=1094

      $ svn co -r 1094 https://java-nio-charset-enhanced.dev.java.net/svn/java-nio-charset-enhanced/branches/JDK-7/j_l_Character_names --username guest

      Build the project with configuration=parse_UnicodeSpec in NetBeans

      $ cd JDK-7/j_l_Character_names
      $ /opt/java/jdk1.7.0-b84/fastdebug/bin/java -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=localhost:41614 -Dfile.encoding=UTF-8 -classpath build/classes build.tools.generatecharacter.UnicodeSpec make/tools/UnicodeData/UnicodeData.txt

      In a second terminal:
      $ jdb -attach 41614
      stop at build.tools.generatecharacter.UnicodeSpec:337
      resume
       (breakpoint is hit)
      next
      next
       (it takes a long time to complete)

      When a breakpoint is submitted to line 340 and continue is used instead of step over, it completes much faster:

      $ jdb -attach 41614
      stop at build.tools.generatecharacter.UnicodeSpec:337
      stop at build.tools.generatecharacter.UnicodeSpec:340
      resume
       (breakpoint is hit)
      resume
       (next breakpoint is hit in a short time)

      With resume, the application executes much faster than with a step request active. The CPU is consumed by the debuggee and there's no communication with the debugger, therefore there seems to be something inefficient in the debugger backend.

            sspitsyn Serguei Spitsyn
            mentlich Martin Entlicher
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Imported:
              Indexed: