You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@harmony.apache.org by 史成荣 <ic...@gmail.com> on 2007/11/21 14:34:33 UTC
[drlvm][vm]question about the execution of a method
I guess that if the vm want to execute a method, it first tries to find the
native codes, if the native codes exist, the vm execute it, if the native
codes do not exist, it triggers the jit to compile the method, then execute
it.
I am not sure about it and want to know more details of the process. Could
anyone tell me which part of the source code accomplish the execution of a
method ? And I can have a deeper study about it .
Re: [drlvm][vm]question about the execution of a method
Posted by Alexei Fedotov <al...@gmail.com>.
Hello,
Thank you for your interest.
IMHO the method is attributed with access flags, and the native code
is looked for only if ACC_NATIVE is set for the method. You may find
useful checking static JIT_Result compile_do_compilation(Method*
method) from vm/vmcore/src/jit/compile.cpp.
On Nov 21, 2007 4:34 PM, 史成荣 <ic...@gmail.com> wrote:
> I guess that if the vm want to execute a method, it first tries to find the
> native codes, if the native codes exist, the vm execute it, if the native
> codes do not exist, it triggers the jit to compile the method, then execute
> it.
> I am not sure about it and want to know more details of the process. Could
> anyone tell me which part of the source code accomplish the execution of a
> method ? And I can have a deeper study about it .
>
--
With best regards,
Alexei,
ESSD, Intel
Re: [drlvm][vm]question about the execution of a method
Posted by Alexei Fedotov <al...@gmail.com>.
Chengrong,
You are always welcome. Please don't hesitate to ask.
On 11/22/07, 史成荣 <ic...@gmail.com> wrote:
> Thanks for your help, I will go to compile.cpp to hava a deeper look. If I
> get some questions else, I will come back here.
>
> thanks,
> Chengrong.
>
--
With best regards,
Alexei,
ESSD, Intel
Re: [drlvm][vm]question about the execution of a method
Posted by 史成荣 <ic...@gmail.com>.
Thanks for your help, I will go to compile.cpp to hava a deeper look. If I
get some questions else, I will come back here.
thanks,
Chengrong.
Re: [drlvm][vm]question about the execution of a method
Posted by Pavel Pervov <pm...@gmail.com>.
Hello,
When VM executes in JIT mode, JIT always insert a call to an address of a
method. If a method was never executed this address points to compilation
stub for a method. If the method is native - binding is performed and call
site is patched to point to native method instead of compilation stub. If
the method is a java method - then compilation is launced for this method
and after it finishes successfully, call site is also patched to point to
compiled method instead of compilation stub.
All details are located in working_vm/vm/vmcore/src/jit/compile.cpp as
Alexei F have pointed out.
On 11/21/07, 史成荣 <ic...@gmail.com> wrote:
>
> I guess that if the vm want to execute a method, it first tries to find
> the
> native codes, if the native codes exist, the vm execute it, if the native
> codes do not exist, it triggers the jit to compile the method, then
> execute
> it.
> I am not sure about it and want to know more details of the process. Could
> anyone tell me which part of the source code accomplish the execution
> of a
> method ? And I can have a deeper study about it .
>
--
Pavel Pervov,
Intel Enterprise Solutions Software Division