[jdk7u]: What is or should be the difference between BytecodeInterpreter::run and BytecodeInterpreter::runWithChecks

Francis ANDRE francis.andre.kampbell at orange.fr
Tue Oct 22 22:43:28 PDT 2013


Hi Volker


Le 21/10/2013 09:22, Volker Simonis a écrit :
> Hi Francis,
>
> if you build with CC_INTERP the build will create a file called
> bytecodeInterpreterWithChecks.cpp under generated/jvmtifiles in the
> output directory which looks as follows:
>
> #define VM_JVMTI
> #include "interpreter/bytecodeInterpreter.cpp"
>
> So yes, you will end up with both versions in the VM.
Since bytecodeInterpreterWithCheck differs only from bytecodeInterpreter by the 
VM_JVMTI code conditionned by the #define VM_JVMTI, why not using a single run 
method with an additional boolean parameter as

BytecodeInterpreter::run(interpreterState istate, bool runWithCheck);

This would avoid the messy xslt step producing the bytecodeInterpreterWithCheck

>
> If bytecodeInterpreterWithChecks.cpp doesn't get created during your
> build it may be that the Windows makefiles are rotten with regard to
> the C++ interpreter.
Ok I found the problem with the windows make.
>
> You may have a look at the Linux Makefiles in general or at our
> ppc-aix port (http://hg.openjdk.java.net/ppc-aix-port/jdk7u/) where we
> support the C++ interpreter (but only on Linux/PPC64 and AIX/PPC64.
> You can download build logs of our Linux/PPC64 builds from
> http://cr.openjdk.java.net/~simonis/ppc-aix-port/index.html to get an
> idea how a C++ interpreter build should look like.
>
> Regards,
> Volker
>
>
> On Sat, Oct 19, 2013 at 3:04 PM, Francis ANDRE
> <francis.andre.kampbell at orange.fr> wrote:
>> Hi
>>
>> ON a WXP/Cygwin/jdk7u platform with CC_INTERP as true, the hotspot does not
>> compile or link because of the alternate definition of the method
>>   BytecodeInterpreter::run and BytecodeInterpreter::runWIthCheck
>>
>> #if defined(VM_JVMTI)
>> void
>> BytecodeInterpreter::runWithChecks(interpreterState istate) {
>> #else
>> void
>> BytecodeInterpreter::run(interpreterState istate) {
>> #endif
>>
>>    // In order to simplify some tests based on switches set at runtime
>>    // we invoke the interpreter a single time after switches are enabled
>>    // and set simpler to to test variables rather than method calls or
>> complex
>>    // boolean expressions.
>>
>>    static int initialized = 0;
>>    static int checkit = 0;
>> ...
>> ...
>>
>> while elsewhere, both run and runWIthChecks are referenced as for example
>>
>>    // Allow c++ interpreter to do one initialization now that switches are
>> set, etc.
>>    BytecodeInterpreter start_msg(BytecodeInterpreter::initialize);
>>    if (JvmtiExport::can_post_interpreter_events())
>>      BytecodeInterpreter::runWithChecks(&start_msg);
>>    else
>>      BytecodeInterpreter::run(&start_msg);
>>
>>
>> So, should both run and runWithChecks exist at the same time or should they
>> be conditionned by VM_JVMTI?
>>
>> Francis



More information about the hotspot-runtime-dev mailing list