This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: win32: Why exports of JNI_* symbols from _exe_ files


Danny Smith wrote:
>>>Removing  __declspec(dllimport) from the declaration of foo in main.c fixes.
>>>Also, even if foo() does live in dll and has the __imp__ prefix, the 
>>>dllimport attribute is not necessary and the fixup will occur in the dll.
>>
>>Yes, but isn't there a performance penalty to this?
> 
> 
> One thunk from foo to __imp__foo in the dll.  How often
> are these functions called? If they were calls to some 
> math function in the inner loop of extensive matrix math, I
> might be concerned.  There is also a penalty for using the 
> attribute: the address of *_imp__foo is not a constant, so can't
> be used in file scope initializers

BTW, these functions are used to intialise and query
JVMs. So they are not called that often (probably only
once).

Ranjit.

-- 
Ranjit Mathew          Email: rmathew AT hotmail DOT com

Bangalore, INDIA.      Web: http://ranjitmathew.tripod.com/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]