Monday, September 8, 2008

It Lives!

Today, we managed to get Squawk to run on the cRIO.  This was after much poking at silly things like the working directory issue mentioned previously.

Some of the errors encountered along the way:

  • We set the page size wrong.  It should have been 16K.
  • usleep() wasn't implemented anywhere in VxWorks.  It shouldn't be in header files if it's not implemented.  It was added to os.c.
  • mprotect() wasn't implemented either.  It was noted somewhere that it only worked on mmap-ed memory, but there was still no provided implementation.  The workaround was to not protect the memory we're using.

The latest error is that the object memory format converter has stopped working.  There isn't any observable reason for this (none of its files changed).  This one is still broken, but I found the option to generate the suite in big endian to begin with.

This is what com.sun.squawk.Test looks like on the cRIO:

Running: com.sun.squawk.Test
x39 count = 1
*** Extending stack *** (stack size=336, remaining stack=5, bcount=-1)
*** Extending stack *** (stack size=672, remaining stack=5, bcount=-1)
*** Extending stack *** (stack size=2688, remaining stack=5, bcount=-1)
*** Extending stack *** (stack size=5376, remaining stack=5, bcount=-1)
*** Extending stack *** (stack size=10752, remaining stack=5, bcount=-1)
*** Extending stack *** (stack size=21504, remaining stack=5, bcount=-1)
*** Extending stack *** (stack size=43008, remaining stack=5, bcount=-1)
*** Extending stack *** (stack size=86016, remaining stack=5, bcount=-1)
*** Extending stack *** (stack size=172032, remaining stack=5, bcount=-1)
*** Extending stack *** (stack size=344064, remaining stack=5, bcount=-1)
x40 recursion level = 114664
x42 printStackTrace - this should be a java.lang.NullPointerException
java.lang.NullPointerException
    at java.lang.Throwable.<init>(Throwable.java:88)
    at java.lang.Exception.<init>(Exception.java:44)
    at java.lang.NullPointerException.<init>(NullPointerException.java:54)
    at com.sun.squawk.VM.nullPointerException(VM.java:394)
    at com.sun.squawk.Test$FOO.toString(Test.java:420)

at com.sun.squawk.Test$FOO$1.run(Test.java:412)
    at com.sun.squawk.Test$FOO.foo(Test.java:410)
    at com.sun.squawk.Test.x42(Test.java:386)
    at com.sun.squawk.Test.runXTests(Test.java:97)
    at com.sun.squawk.Test.main(Test.java:48)
    at com.sun.squawk.Klass.main(Klass.java:3001)
    at com.sun.squawk.Isolate.run(Isolate.java:1565)
    at java.lang.Thread.run(Thread.java:231)
    at com.sun.squawk.VMThread.callRun(VMThread.java:1495)
    at com.sun.squawk.VM.callRun(VM.java:308)
*** Extending stack *** (stack size=78, remaining stack=6, bcount=-1)
[SNIP]
*** Extending stack *** (stack size=82, remaining stack=5, bcount=-1)
Date: Mon Sep 08 12:07:44 PST 2008
Empty loop timings per 16000000 = 64358ms
Empty loop timings(2) per 16000000 = 27864ms
Empty simple call per 1000000 = 3152ms
Empty long call per 1000000 = 3835ms
Empty exception calls per 1000000 = 4423ms
random time test (14886936 empty loop iterations)... 37283ms
Finished tests
--------------------------------------------------------------------
Hits   -   Class:99.99%  Monitor:97.78%  Exit:100.00%  New:89.60%
GCs: 1 o:p>
** VM stopped: exit code = 12345 **

No comments:

Post a Comment