RFR(S): 8185334: [MVT] nmethod::print_nmethod_labels() does not work with -XX:+ValueTypePassFieldsAsArgs
Tobias Hartmann
tobias.hartmann at oracle.com
Wed Jul 26 09:07:20 UTC 2017
Hi,
please review the following patch:
https://bugs.openjdk.java.net/browse/JDK-8185334
http://cr.openjdk.java.net/~thartmann/valhalla/vt_prototype/webrev.32/
If -XX:+ValueTypePassFieldsAsArgs is enabled, the compiled method parameters in the -XX:CompileCommand=print output should be adjusted to point to the actual fields being passed. The current output looks like this:
# {method} {0x00007fb6d1dafe60} 'test35' '(JQcompiler/valhalla/valuetypes/MyValue1;IQcompiler/valhalla/valuetypes/MyValue2;)J' in 'compiler/valhalla/valuetypes/ValueTypeTestBench'
# this: rsi:rsi = 'compiler/valhalla/valuetypes/ValueTypeTestBench'
# parm0: rdx:rdx = long
# parm1: rcx:rcx = 'compiler/valhalla/valuetypes/MyValue1'
# parm2: r8 = int
# parm3: r9:r9 = 'compiler/valhalla/valuetypes/MyValue2'
With the patch it looks like this:
# {method} {0x00007fdb5089ce60} 'test35' '(JQcompiler/valhalla/valuetypes/MyValue1;IQcompiler/valhalla/valuetypes/MyValue2;)J' in 'compiler/valhalla/valuetypes/ValueTypeTestBench'
# parm0: rsi:rsi = 'java/lang/Object'
# parm1: rdx:rdx = long
# parm2: rcx:rcx = long
# parm3: r8 = int
# parm4: r9 = int
# parm5: rdi = short
# parm6: [sp+0xa0] = 'java/lang/Object' (sp of caller)
# parm7: [sp+0xa8] = array
# parm8: [sp+0xb0] = long
# parm9: [sp+0xb8] = int
# parm10: [sp+0xc0] = byte
# parm11: [sp+0xc8] = boolean
# parm12: [sp+0xd0] = long
# parm13: [sp+0xd8] = int
# parm14: [sp+0xe0] = byte
# parm15: [sp+0xe8] = boolean
# parm16: [sp+0xf0] = int
# parm17: [sp+0xf8] = long
# parm18: [sp+0x100] = int
# parm19: [sp+0x108] = byte
[...]
This patch includes some other cleanups:
- sharedRuntime_x86_64.cpp: We should not use VOID as placeholder because this confuses other signature printing code
- compiledMethod.cpp: We can safely assume that the method has a value type argument if an extended signature is available. I moved the verification code into #ifdef ASSERT.
- signature.cpp:
-> If the type is 'L;' (no Klass information) we currently print
# parm0: rsi:rsi = ''
With the changes we print:
# parm0: rsi:rsi = 'java/lang/Object'
Thanks,
Tobias
More information about the valhalla-dev
mailing list