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

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • 11
    • Affects Version/s: 8, 9, 10, 11
    • Component/s: 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.

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

                Created:
                Updated:
                Resolved: