Hi!
I lately played a little bit around with the Java implementation on armv7a and recognized a couple of "Alignment traps" in the kernel log, which look like this:
Alignment trap: java (X) PC=Y Instr=0xe18880d0 Address=0x235b8342
The instruction is
ldrd r8, sb, [r8, r0], which is "Load Register Dual (register)" and loads two words (= 64 bit) into registers. A3.2.1 of the ARMv7a Reference Manual[1] states that this instruction requires word-alignment. I disassembled my libjvm.so and found that the instruction occurs only once: Unsafe_getLong().
Next I looked into the code and it is quite obvious to me that this alignment can not be guaranteed with the current implementation. Therefore my question: do you see a possibility to replace the getLong() on armv7 with some alignment-friendlier function/insruction - like maybe 2x getInt()? At least for armv7, this would increase performance as now the kernel has to fix it, which means quite some overhead.
Thank you and best regards
Benjamin