This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: [RFA] Mostly implement JVMTI's GetThreadState
Tom Tromey wrote:
"Keith" == Keith Seitz <keiths@redhat.com> writes:
Keith> * include/gc.h (GC_is_thread_suspended): Declare.
Keith> * pthread_stop_world.c (GC_is_thread_suspended): New function.
Do we need this? We don't support Thread.suspend. Do we support the
JVMTI thread suspension thing? I didn't look (or remember).
Yes, we do support thread suspension via JVMTI. Almost our entire JDWP
implementation is now built on JVMTI. JVMTI does not, however, keep
track of what threads are suspended. JDWP knows which threads it has
suspended, but JVMTI does not know anything about this.
Keith> + Thread$State *ts = thread->getState ();
Thread.getState is not implemented. Sorry.
When you say "not implemented", do you mean not "fully" implemented?
'Cause there certainly seems to be "something" implemented (by you in
Aug '06):
::java::lang::Thread$State *
java::lang::Thread::getState()
{
_Jv_InitClass(&::java::lang::Thread$State::class$);
switch (state)
{
case JV_BLOCKED:
return ::java::lang::Thread$State::BLOCKED;
case JV_NEW:
return ::java::lang::Thread$State::NEW;
case JV_RUNNABLE:
return ::java::lang::Thread$State::RUNNABLE;
case JV_TERMINATED:
return ::java::lang::Thread$State::TERMINATED;
case JV_TIMED_WAITING:
return ::java::lang::Thread$State::TIMED_WAITING;
case JV_WAITING:
return ::java::lang::Thread$State::WAITING;
}
// We don't really need a default, but this makes the compiler
// happy.
return ::java::lang::Thread$State::RUNNABLE;
}
In any case, I can take a peek at this/your patch (from reply to
"Implementing JVMTI's GetThreadState") when my plate clears a little.
All we really need for JDWP is to know whether a thread is suspended. [I
hate to say this...] How about if I just truncate the patch (for now) to
exclude all the Thread.State stuff? That will at least allow people to
start playing with this stuff on eclipse.
Keith