FYI: Avoid function call with JVMPI enabled

Bryce McKinlay mckinlay@redhat.com
Wed Aug 25 15:19:00 GMT 2004


Boehm, Hans wrote:

>I always build with JVMPI disabled, since it does bad things
>to the allocation sequence.  (It adds a third (!) function call
>to every allocation call.  Unless of course you actually turn
>it on, in which case it's MUCH worse.)
>  
>

I hadn't noticed this previously. It turns out that the test to check if 
JVMPI is enabled was not being inlined before calling 
jvmpi_notify_alloc. This patch fixes this by doing the test in a macro. 
The macro ensures that the jvmpi_notify_alloc call is not made unless 
JVMPI is actually enabled.

I'm checking this in.

Bryce

-------------- next part --------------
A non-text attachment was scrubbed...
Name: libjava-jvmpi.patch
Type: text/x-patch
Size: 5055 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/java-patches/attachments/20040825/656ce236/attachment.bin>


More information about the Java-patches mailing list