[foreign] RFR: Debug code for ShuffleRecipe translation

Maurizio Cimadamore maurizio.cimadamore at oracle.com
Mon Dec 17 18:17:18 UTC 2018


Looks good to me! One minor nit, unrelated to your patch, is that the 
CallingSequence::asString() generates this 'Flags:' string which is, I 
think, confusing. E.g. this

   CallingSequence: {
     Flags:
     STACK_ARGUMENT_SLOT

Should be replaced by this

   CallingSequence: {
     Classes:
     STACK_ARGUMENT_SLOT

Maurizio

On 17/12/2018 18:11, Jorn Vernee wrote:
> Hi,
>
> This is another piece of debugging code I wrote while porting the 
> binder to Windows that might be useful to have in the future.
>
> This prints info on how a CallingSequence is translated into a 
> ShuffleRecipe, e.g.:
>
> Translating CallingSequence:
>   CallingSequence: {
>     Flags:
>     STACK_ARGUMENT_SLOT
>     VECTOR_ARGUMENT_REGISTER
>     INTEGER_ARGUMENT_REGISTER
>       Storage { INTEGER_ARGUMENT_REGISTER[0] (size=8) } : arg0 @ 0x0
>       Storage { INTEGER_ARGUMENT_REGISTER[1] (size=8) } : arg1 @ 0x0
>     VECTOR_RETURN_REGISTER
>     INTEGER_RETURN_REGISTER
>       Storage { INTEGER_RETURN_REGISTER[0] (size=8) } : __retval @ 0x0
>     X87_RETURN_REGISTER
>   }
>
> into:
>   ShuffleRecipe: {
>     Arguments: {
>       BUFFER: []
>       STACK: []
>       VECTOR: []
>       INTEGER: [PULL, PULL]
>       X87: []
>     }
>     Returns: {
>       BUFFER: []
>       STACK: []
>       VECTOR: []
>       INTEGER: [PULL]
>       X87: []
>     }
>   }
>
> This is guarded by the flag 
> `-Djdk.internal.foreign.abi.ShuffleRecipe.DEBUG=true`.
>
> Webrev: 
> http://cr.openjdk.java.net/~jvernee/panama/webrevs/shuffledebug/webrev.01/
>
> Please let me know what you think.
>
> Thanks,
> Jorn
>


More information about the panama-dev mailing list