PATCH: interpreter.cc bug patch and performance improvements
Chris Sears
cbsears_sf@yahoo.com
Tue Jan 8 10:00:00 GMT 2002
Tom,
thanks, attached is the patch. I'm also posting this to java.
This is a diff -u patch for the 3.0.3 gij interpreter.cc
The bug is fairly simple, no NULLCHECK for insn_arraylength.
The performance improvements fall into two categories:
1) in array loads and stores, pushing the SAVE_PC into
the NULLCHECK throw block.
2) a new macro for array bounds checking, ARRAYBOUNDSCHECK
it also pushes the SAVE_PC into the throw block.
the code uses a clever unsigned arithmetic trick
I read in the PowerPC Compiler Writer's Guide.
The performance improvement on my Pentium III for cm3 is modest
from 644 to 662.
Also, I am having a problem that if anyone could help on, I would be
most thankful. It appears to be a Pentium cache oddness.
It is easy to duplicate on my Pentium III:
Run the cm3 benchmark on a stock 3.0.3. The performance will be 644.
Comment out the insn_nop block and move the insn_nop label in front of
the first NEXT_INSN. Very simple, very dumb optimization.
Performance goes down to 600. Attached is a bad.PATCH file for this.
Doing a little research, I saw a note by Anton Ertl on the web
explaining what seems to be a similar problem.
http://www.complang.tuwien.ac.at/misc/pentium-switch/switch-on-pentium
I have some other very simple optimizations, but if I can't get
past this problem, they won't work, at least not on the Pentium.
I may try on the PowerPC.
thanks,
Chris
__________________________________________________
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: interpret.cc.PATCH
Type: application/octet-stream
Size: 6789 bytes
Desc: interpret.cc.PATCH
URL: <http://gcc.gnu.org/pipermail/java-patches/attachments/20020108/a8d5342e/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bad.PATCH
Type: application/octet-stream
Size: 440 bytes
Desc: bad.PATCH
URL: <http://gcc.gnu.org/pipermail/java-patches/attachments/20020108/a8d5342e/attachment-0001.obj>
More information about the Java-patches
mailing list