United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-6392604 : JVMTI spec: add error codes for GetThreadListStackTraces

Details
Type:
Bug
Submit Date:
2006-03-01
Status:
Resolved
Updated Date:
2011-09-22
Project Name:
JDK
Resolved Date:
2006-07-31
Component:
hotspot
OS:
generic
Sub-Component:
jvmti
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
6
Fixed Versions:

Related Reports

Sub Tasks

Description
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

                                    

Comments
EVALUATION

Need to add the invalid thread error code and clarify that not yet started threads are handled the same as terminated threads.
                                     
2006-03-17



Hardware and Software, Engineered to Work Together