You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@harmony.apache.org by Weldon Washburn <we...@gmail.com> on 2007/08/25 15:18:36 UTC

[drlvm][jvmti] do threads started by jvmtiRunAgentThread() only run in native mode?

Does anyone know if these threads need to run java code?  The spec is
vague.  The spec says, "...the created thread can run entirely in
native code."  Does the spec really mean "only" instead of "can"?

-- 
Weldon Washburn

Re: [drlvm][jvmti] do threads started by jvmtiRunAgentThread() only run in native mode?

Posted by Vasily Levchenko <va...@gmail.com>.
Does "only" have any sense in this context? JVMTI agent is piece of native
code, so you have possibility
to  start any kind of native thread (pthread or win32). "However, the
created thread does require a
newly created instance of java.lang.Thread (referenced by the argument
thread) to which it will be associated" is
the next sentence  after  sentence with "can" ;). That mean that the
difference between new created thread via OS thread
library and jvmtiRunAgentThread is in readiness to work with java world from
the beginning.

On 8/25/07, Weldon Washburn <we...@gmail.com> wrote:
>
> Does anyone know if these threads need to run java code?  The spec is
> vague.  The spec says, "...the created thread can run entirely in
> native code."  Does the spec really mean "only" instead of "can"?
>
> --
> Weldon Washburn
>



-- 
--vvl

Re: [drlvm][jvmti] do threads started by jvmtiRunAgentThread() only run in native mode?

Posted by Weldon Washburn <we...@gmail.com>.
On 8/25/07, Ilya Berezhniuk <il...@gmail.com> wrote:
> I think definitely no.
> Spec means that entry point for starting thread is an address in native
> code, and creating Java object for this thread is not required.
> Spec does not deny calling JNI or JVMTI functions from agent thread.
Good point.  I think this is the right analysis. We need to be
prepared if this jvmti thread decides to call java code via JNI
functions.


>
> BTW, Harmony's implementation of JVMTI can involve calling Java code (if it'
> was not fixed already).
>
> --
>
> Ilya
>
>
> 2007/8/25, Weldon Washburn <we...@gmail.com>:
> >
> > Does anyone know if these threads need to run java code?  The spec is
> > vague.  The spec says, "...the created thread can run entirely in
> > native code."  Does the spec really mean "only" instead of "can"?
> >
> > --
> > Weldon Washburn
> >
>


-- 
Weldon Washburn

Re: [drlvm][jvmti] do threads started by jvmtiRunAgentThread() only run in native mode?

Posted by Ilya Berezhniuk <il...@gmail.com>.
I think definitely no.
Spec means that entry point for starting thread is an address in native
code, and creating Java object for this thread is not required.
Spec does not deny calling JNI or JVMTI functions from agent thread.

BTW, Harmony's implementation of JVMTI can involve calling Java code (if it'
was not fixed already).

-- 

Ilya


2007/8/25, Weldon Washburn <we...@gmail.com>:
>
> Does anyone know if these threads need to run java code?  The spec is
> vague.  The spec says, "...the created thread can run entirely in
> native code."  Does the spec really mean "only" instead of "can"?
>
> --
> Weldon Washburn
>