RFR: 8221653 [lworld] Calling convention - C1 to Interpreter

Tobias Hartmann tobias.hartmann at oracle.com
Fri Mar 29 08:02:39 UTC 2019


Hi Ioi,

this looks good to me, nice test refactoring!

I also don't like all the 'caller_is_c1' arguments but can't think of a better way :(

Thanks,
Tobias

On 29.03.19 05:27, Ioi Lam wrote:
> https://bugs.openjdk.java.net/browse/JDK-8221653
> http://cr.openjdk.java.net/~iklam/valhalla/8221653-c1-calls-interp.v01/
> 
> This is the first step of making C1/C2 work together. Since C1 doesn't scalarize outgoing
> parameters, I changed the method dispatch code to detect when a call is made by C1 code, and jump to
> Method::_from_compiled_value_entry (in contrast, C2 would jump to Method::_from_compiled_entry or
> Method::_from_compiled_value_ro_entry).
> 
> I am not particularly proud of sprinkling caller_is_c1 all over the code. Does anyone have a better
> suggestion?
> 
> For testing, I added TestCallingConventionC1.java. I also improved the @Test annotation in
> jtreg/compiler/valhalla/valuetypes/ValueTypeTest.java to specify whether C1 or C2 should be used.
> 
> In addition, I changed the order of how the VM arguments are put together in
> ValueTypeTest::execute_vm(). This allows the individual tests to override arguments specified by
> ValueTypeTest.java.
> 
> With this changeset, to test C1-only, the command-line has changed to
> 
>         cd test/hotspot/jtreg/compiler/valhalla/valuetypes
>         jtreg -Dtest.c1=true \
>             -vmoptions:-XX:+EnableValhallaC1 \
>             -vmoptions:-XX:TieredStopAtLevel=1 \
>             -vmoptions:-XX:-ValueTypePassFieldsAsArgs \
>             -vmoptions:-XX:-ValueTypeReturnedAsFields \
>             .
> 
> Testing:
> 
> + All */valhalla/* tests passed with default configuration (C2 only)
> + All jtreg/compiler/valhalla/* tests passed in C1-only mode
> 
> Thanks
> - Ioi


More information about the valhalla-dev mailing list