This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: [PATCH] Speedup gij/libjava loading on darwin
I got a nice reproducible testcase, and yes indeed, it's the linker.
Here's what it looks like on my G4 laptop running Tiger, with
'libgcj-1' linked with -single_module and 'libgcj-2' linked without it:
+ ld -dynamic -arch ppc -bind_at_load -multiply_defined suppress -
weak_reference_mismatches non-weak -o ArrayClass.exe -lcrt1.o /Users/
geoffk/build/egcs-mainline/gcc/crt2.o -L. ArrayClassmain.o
ArrayClass.o -lgcj-1 -liconv -lpthread -ldl -lgcc_s.1 -lSystemStubs -
lSystem
real 0m5.186s
user 0m4.380s
sys 0m0.298s
+ ./ArrayClass.exe
class ArrayClass
class [LArrayClass;
class [[LArrayClass;
class [[[LArrayClass;
class [[[[LArrayClass;
real 0m0.430s
user 0m0.104s
sys 0m0.114s
+ ld -dynamic -arch ppc -bind_at_load -multiply_defined suppress -
weak_reference_mismatches non-weak -o ArrayClass.exe -lcrt1.o /Users/
geoffk/build/egcs-mainline/gcc/crt2.o -L. ArrayClassmain.o
ArrayClass.o -lgcj-2 -liconv -lpthread -ldl -lgcc_s.1 -lSystemStubs -
lSystem
real 0m0.206s
user 0m0.040s
sys 0m0.080s
+ ./ArrayClass.exe
class ArrayClass
class [LArrayClass;
class [[LArrayClass;
class [[[LArrayClass;
class [[[[LArrayClass;
real 0m0.546s
user 0m0.349s
sys 0m0.130s
That's a slowdown in the link time from 0.2 seconds to 5.1 seconds!
I've filed a Radar, number 4226076, for this. I believe I managed to
add both Andrew and Andreas to the Radar's security list so you can
both see it; let me know if that actually worked.
You'll notice, though, that even on Tiger with the new dyld, the run
time is faster with -single_module.Attachment:
smime.p7s
Description: S/MIME cryptographic signature