Return value type fields in registers
tobias.hartmann at oracle.com
Fri Jun 2 13:09:30 UTC 2017
I've executed some quick testing on JPRT on top of Maurizio's latest patch:
I see multiple failures:
ValueTypesTestBench fails with:
# Internal Error (/scratch/opt/jprt/T/P1/112707.tohartma/s/hotspot/src/cpu/x86/vm/macroAssembler_x86.cpp:889), pid=3999, tid=4000
# assert(false) failed: DEBUG MESSAGE: illegal bytecode sequence - method not verified
Stack: [0x00007f9a958b1000,0x00007f9a959b2000], sp=0x00007f9a959afcf0, free space=1019k
Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [libjvm.so+0x169ce1f] VMError::report_and_die(int, char const*, char const*, __va_list_tag*, Thread*, unsigned char*, void*, void*, char const*, int, unsigned long)+0x15f
V [libjvm.so+0x169dbcf] VMError::report_and_die(Thread*, char const*, int, char const*, char const*, __va_list_tag*)+0x2f
V [libjvm.so+0xacf6fd] report_vm_error(char const*, int, char const*, char const*, ...)+0xdd
V [libjvm.so+0x11641c4] MacroAssembler::debug64(char*, long, long*)+0x204
On Windows it still fails with
Caused by: java.lang.RuntimeException: assertEquals: expected 1309945560682 to equal -2494
runtime/valhalla/valuetypes/VboxUnbox.java fails with
java.lang.RuntimeException: assertTrue: expected true, was false
I'm not sure though if those problems are related to your fix. I'll re-run without your changes.
On 01.06.2017 17:51, Roland Westrelin wrote:
> Thanks for the detailed review. Here is a new webrev:
>> I'm seeing build failures  on JPRT and the ValueTypeTestBench fails
>> on Windows  and crashes with an assert  on my machine.
> Build failures should be fixed now. I made sure it builds with
> precompiled headers disabled.
> I tried to figure out what could cause the windows failure but I can't
> say I have a clue. Registers for returns should be the same but used in
> a different order. I don't see why that would make a difference. I don't
> have access to a windows machine so I don't see what I can do about it.
> The assert failure should be fixed now. I added a new test case to
> reproduce it (test76). Interestingly it causes a crash with
> ValueTypeReturnedAsFields off. I found that's because we allocate in
> vreturn, we can actually throw in a return which is not something c2
> 2308 set_bci(InvocationEntryBci);
> in parse1.cpp breaks the exception handling logic. I commented it out
> and everything seems to work. I also look at the code and saw no reason
> for clearing the bci.
>> - Why is the change in line 2869 necessary?
> It's not. Removed.
>> - It would be good to add a reference field to MyValue3 to extend
> Done. It caused some new failures in escape analysis so there's some new
> changes there.
More information about the valhalla-dev