[kaffe] java.util.date problem (on SH4 & X86)

takahiro tokui t_tokui at kyototechnica.co.jp
Thu Nov 11 21:40:15 PST 2004


We tried to build kaffe-1.1.4 for SH4/linux,and It seems to 
have succeeded in build.

But There is one problem.
It was too late when java.util.date() method was called in a program.
So,I thought first that build on SH4 went wrong.

I build kaffe-1.1.4 on X86/linux to run that same program 
in order to compare with sh4 and X86.
The obtained result is as follows.

    X86:Pentium3 800 256M on IDE-HDD
	  Kernel 2.4.18-3 on an i686
    SH4:SH7751R(SH4) 64M on CompactFlash
      Kernel 2.4.18-4 on SH4

  part of program source:
    long start = System.currentTimeMillis();
    System.out.println((new java.util.Date()));
    long end = System.currentTimeMillis();
    System.out.println("time = " + (end - start));

    Ver  :      1.0.7      :       1.1.4
    SH4  : 1200ms to 30ms  :  2800ms to 2000ms
    X86  :  290ms to  1ms  :   200ms to 100ms
  left time is first call to make instance (include class loading)
  right time is second call to make instance (without class loading)

>From this result, I judged that it was not an SH4 independent problem.

And noticed that there is a difference between 1.0.7 and 1.1.4.
  println result(both SH4,X86):
    1.0.7    Fri Nov 12 13:53:31 JST 2004
    1.1.4    Fri Nov 12 14:02:44 GMT+9:00 2004

Could anyone give me any idea to solve?

Best regards.

Takahiro Tokui

More information about the kaffe mailing list