JVMTI spec: add error codes for GetThreadListStackTraces

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • 6
    • Affects Version/s: 6
    • Component/s: hotspot
    • b79
    • generic
    • generic

      Two new error code have to be specified for GetThreadListStackTraces:
        JVMTI_ERROR_INVALID_THREAD

      The details are discussed below:

      > Spec questions for GetThreadListStackTraces:
      > Q1: Does it make sense to specify that the GetThreadListStackTraces()
      > also returns JVMTI_ERROR_INVALID_THREAD ?
      > The function has to return some error code if any element of the
      > thread_list array is invalid.
      > None of the universal errors matches this semantics.

      Good point. Oh boy, a new spec bug. Do you want to file it?

      >
      > Q2: Does the function returns stack traces if a thread is not alive?
      > The passes jthread ID can be valid in this case.
      > Should we specify that the function returns JVMTI_ERROR_THREAD_NOT_ALIVE.
      > BTW, the GetStackTrace may return both:
      > JVMTI_ERROR_INVALID_THREAD and JVMTI_ERROR_THREAD_NOT_ALIVE.

      I think not, see this from the spec:

          If a thread terminates before the stack information is collected, a zero length stack (jvmtiStackInfo.frame_count will be zero) will be returned and the thread jvmtiStackInfo.state can be checked.

      Probably should add if it hasn't started yet.

      Thanks,
      Robert

            Assignee:
            Robert Field (Inactive)
            Reporter:
            Serguei Spitsyn
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: