Future archaeology

Andrew Hughes pointed out yesterday that the ARM interpreter and JIT are slated for removal in IcedTea6-1.11 unless someone steps up to maintain it. Currently there’s only one place where the all information about what’s required is collated—inside my head—so I thought I’d better write it up before I start forgetting. It’s entirely possible the interpreter will be removed, but it’s also possible that someone will end up trying to resurrect it months or years down the line. If you are that person and you are reading this then you owe me a beer ;)

The first change that broke the ARM code was the fix for PR icedtea/323, aka Sun bug 6939182. I described the required fix here:

“[In the ARM code] last_Java_sp is set to the address of the top Zero frame wherever the frame anchor is set up. It needs changing such that last_Java_sp is set to thread->zero_stack()->sp() (and the new field last_Java_fp gets set to what last_Java_sp used to be set to).”

The second change that broke the ARM code was the fix for PR icedtea/484, aka Sun bug 6951784. I described the required fix here:

“I have had to change the calling convention within Zero and Shark. All method entries (the C function that executes the method) now return an integer which is the number of deoptimized frames they have left on the stack. Whenever a method is called it is now the caller’s responsibility to check whether frames have been deoptimized and reenter the interpreter if they have.”

The third change, currently in progress, reverts the last commit by the ARM code’s author, Ed Nevill: fix for fast bytecodes with ARM/Shark. This piece of code was accidentally incorporated in one of the webrevs when Zero was upstreamed, and isn’t conditionalised correctly. It can cause problems when the ARM code is not present, and there’s no neat fix. Given that the ARM code has been broken for five days shy of a year now I’ve asked for it to be removed from OpenJDK. This is Sun bug 7030207. If the ARM code is resurrected, this patch will require reinstating (with more specific conditionalisation please!)

The fourth change, currently in the future, is JSR 292. Explicit method handle stuff should just work–it’ll be handled by Zero–but the ARM interpreter and JIT will need updating to support three new instructions: invokedynamic, fast_aldc and fast_aldc_w. The latter two are internal instructions, in case you wondered why you’d never heard of them before!

Ok, that is all.

6 thoughts on “Future archaeology

  1. I’m hoping this isn’t meaning that Zero/Shark support for ARM isn’t going away… I’d still like a viable alternative to the Oracle ’embedded’ JRE for my SheevaPlug!

    Rgds

    Damon

  2. PR323 and PR484 have been fixed by Aph, Andrew Haley, in Icedtea6 HEAD and been updated to handle fast_aldc and fast_aldc_w! This means that the next Icedtea6 1.11 release contains an updated ARM port that work in combination with Zero from HS20.

    TODO: Shark and IcedTea7
    LLVM needs to get updated before we can make Shark work on ARM again. The latest redesigned MC-JIT in LLVM 3.0 are currently only working on Mach-O object based platforms like Darwin.

    For IcedTea7 we need to implement invokedynamic JSR 292.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.