« Return to Thread: Re: [rvm-core] [rvm-commits] SF.net SVN: jikesrvm:[15399] rvmroot/branches/RVM-PureNativeThread/ optPhase1/rvm/src

Re: [rvm-core] [rvm-commits] SF.net SVN: jikesrvm:[15399] rvmroot/branches/RVM-PureNativeThread/ optPhase1/rvm/src

by Filip Pizlo-2 :: Rate this Message:

Reply to Author | View in Thread

Not as far as I can see.  That method just tells you when stuff is  
linked, while this tells you every time that it's called.  Think  
strace but for JNI.  Or am I not using -verbose:jni correctly?

-F



On Feb 7, 2009, at 6:04 PM, Ian Rogers wrote:

> Is this replication of -verbose:jni ?
>
> Regards,
> Ian
>
> 2009/2/7  <pizlo@...>:
>> Revision: 15399
>>        http://jikesrvm.svn.sourceforge.net/jikesrvm/?rev=15399&view=rev
>> Author:   pizlo
>> Date:     2009-02-07 06:29:26 +0000 (Sat, 07 Feb 2009)
>>
>> Log Message:
>> -----------
>> added JNI call tracing
>>
>> Modified Paths:
>> --------------
>>  rvmroot/branches/RVM-PureNativeThread/optPhase1/rvm/src/org/
>> jikesrvm/jni/JNIEnvironment.java
>>  rvmroot/branches/RVM-PureNativeThread/optPhase1/rvm/src-generated/
>> options/BooleanOptions.vm.dat
>>
>> Modified: rvmroot/branches/RVM-PureNativeThread/optPhase1/rvm/src/
>> org/jikesrvm/jni/JNIEnvironment.java
>> ===================================================================
>> --- rvmroot/branches/RVM-PureNativeThread/optPhase1/rvm/src/org/
>> jikesrvm/jni/JNIEnvironment.java        2009-02-07 05:40:10 UTC  
>> (rev 15398)
>> +++ rvmroot/branches/RVM-PureNativeThread/optPhase1/rvm/src/org/
>> jikesrvm/jni/JNIEnvironment.java        2009-02-07 06:29:26 UTC  
>> (rev 15399)
>> @@ -15,6 +15,8 @@
>> import org.jikesrvm.VM;
>> import org.jikesrvm.SizeConstants;
>> import org.jikesrvm.mm.mminterface.MemoryManager;
>> +import org.jikesrvm.classloader.RVMMethod;
>> +import org.jikesrvm.compilers.common.CompiledMethods;
>> import org.jikesrvm.runtime.Entrypoints;
>> import org.jikesrvm.runtime.Magic;
>> import org.jikesrvm.runtime.RuntimeEntrypoints;
>> @@ -338,6 +340,18 @@
>>   Address callersFP =  
>> Magic.getCallerFramePointer(Magic.getFramePointer());
>>   basePointerOnEntryToNative = callersFP; // NB old value saved on  
>> call stack
>>   JNITopJavaFP = callersFP;
>> +
>> +    if (VM.traceJNI) {
>> +      RVMMethod m=
>> +        CompiledMethods.getCompiledMethod(
>> +          Magic.getCompiledMethodID(callersFP)).getMethod();
>> +      VM.sysWrite("calling JNI from ");
>> +      VM.sysWrite(m.getDeclaringClass().getDescriptor());
>> +      VM.sysWrite(" ");
>> +      VM.sysWrite(m.getName());
>> +      VM.sysWrite(m.getDescriptor());
>> +      VM.sysWriteln();
>> +    }
>>
>>   // Save current JNI ref stack pointer
>>   int oldJNIRefsSavedFP = JNIRefsSavedFP;
>> @@ -405,7 +419,7 @@
>>   }
>>   return result;
>> }
>> -
>> +
>> /**
>>  * Get a reference from the JNIRefs stack.
>>  * @param offset in JNIRefs stack
>>
>> Modified: rvmroot/branches/RVM-PureNativeThread/optPhase1/rvm/src-
>> generated/options/BooleanOptions.vm.dat
>> ===================================================================
>> --- rvmroot/branches/RVM-PureNativeThread/optPhase1/rvm/src-
>> generated/options/BooleanOptions.vm.dat     2009-02-07 05:40:10 UTC  
>> (rev 15398)
>> +++ rvmroot/branches/RVM-PureNativeThread/optPhase1/rvm/src-
>> generated/options/BooleanOptions.vm.dat     2009-02-07 06:29:26 UTC  
>> (rev 15399)
>> @@ -32,3 +32,6 @@
>> ErrorsFatal false errorsFatal
>> Exit when non-fatal errors are detected; used for regression testing
>>
>> +traceJNI false
>> +Trace when calls into JNI happen
>> +
>>
>>
>> This was sent by the SourceForge.net collaborative development  
>> platform, the world's largest Open Source development site.
>>
>> ------------------------------------------------------------------------------
>> Create and Deploy Rich Internet Apps outside the browser with  
>> Adobe(R)AIR(TM)
>> software. With Adobe AIR, Ajax developers can use existing skills  
>> and code to
>> build responsive, highly engaging applications that combine the  
>> power of local
>> resources and data with the reach of the web. Download the Adobe  
>> AIR SDK and
>> Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
>> _______________________________________________
>> Jikesrvm-commits mailing list
>> Jikesrvm-commits@...
>> https://lists.sourceforge.net/lists/listinfo/jikesrvm-commits
>>
>
> ------------------------------------------------------------------------------
> Create and Deploy Rich Internet Apps outside the browser with  
> Adobe(R)AIR(TM)
> software. With Adobe AIR, Ajax developers can use existing skills  
> and code to
> build responsive, highly engaging applications that combine the  
> power of local
> resources and data with the reach of the web. Download the Adobe AIR  
> SDK and
> Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
> _______________________________________________
> Jikesrvm-commits mailing list
> Jikesrvm-commits@...
> https://lists.sourceforge.net/lists/listinfo/jikesrvm-commits


------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Jikesrvm-core mailing list
Jikesrvm-core@...
https://lists.sourceforge.net/lists/listinfo/jikesrvm-core

 « Return to Thread: Re: [rvm-core] [rvm-commits] SF.net SVN: jikesrvm:[15399] rvmroot/branches/RVM-PureNativeThread/ optPhase1/rvm/src