Fwd: Re: [foreign] RFR: Debug code for ShuffleRecipe translation

Jorn Vernee jbvernee at xs4all.nl
Mon Dec 17 20:07:44 UTC 2018


Thanks, pushed.

Jorn

Maurizio Cimadamore schreef op 2018-12-17 19:58:
> Your v2 webrev looks good!
> 
> Maurizio
> 
> On 17/12/2018 18:54, Jorn Vernee wrote:
>> Forwarding to panama-dev since I hit 'reply' instead of 'reply to all' 
>> by accident
>> 
>> ---
>> 
>> It will list
>> 
>>     Flags:
>>         returnsInMemory
>> 
>> When the return in memory flag is set, but that looks confusing when 
>> there are no flags.
>> 
>> I could change it to list
>> 
>>   CallingSequence: {
>>     returnsInMemory: false
>>     Classes:
>>       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
>>   }
>> 
>> Since we only have the 1 flag any ways. Also adding a level of 
>> indentation the the list of classes.
>> 
>> Updated webrev: 
>> http://cr.openjdk.java.net/~jvernee/panama/webrevs/shuffledebug/webrev.02/
>> 
>> Jorn
>> 
>> Maurizio Cimadamore schreef op 2018-12-17 19:17:
>>> 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