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

Fix 'frames()' in ThreadReferenceImpl.c to prevent quadratic runtime behavior

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 11
    • 8, 9, 10, 11
    • core-svc
    • None
    • b25
    • generic
    • generic

        The frames() method in the file ThreadReferenceImpl.c of the jdwp agent library does not use the GetStackTrace() JVMTI method. Instead it calls GetFrameLocation() for every frame requested. Since GetFrameLocation() iterates the stack for every call, this leads to quadratic runtime behavior. This performance bug is especially visible when debugging stack overflows. Since GetStackTrace() runs in linear time (in regards to the stack depth), it should be used instead.

              simonis Volker Simonis
              simonis Volker Simonis
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: