[Vm-dev] New Cog VMs available

Eliot Miranda eliot.miranda at gmail.com
Wed Apr 27 17:34:40 UTC 2016


Hi Clément,

On Wed, Apr 27, 2016 at 10:28 AM, Eliot Miranda <eliot.miranda at gmail.com>
wrote:

> Hi Clément,
>
> On Wed, Apr 27, 2016 at 7:03 AM, Clément Bera <bera.clement at gmail.com>
> wrote:
>
>>
>> Hi,
>>
>> So after *really* struggling I profiled Holger's code.
>>
>> I put results in attachment with version 3427 and version 3684 of the VM.
>>
>> Holger said the code is not open-source, so if you want more information
>> about the code ask him (or I guess I can answer if it's for a specific
>> method).
>>
>> The code execution is well spread around the methods. It's difficult to
>> conclude.
>>
>> It seems (I say, it seems) that the execution spend more time in recent
>> versions in PICs.
>> It could be that the machine code produced there is different because of:
>> - the abstraction with 32/64 bits
>> - the abstraction over literals for ARM
>> - the design changes, if I understood correctly now PIC are created from
>> a prototype.
>> Now it could be something else.
>>
>> I have no time to investigate further right now. Maybe we should try to
>> generate PICs in 3427 and 3684 and check if the machine code is different.
>> Which VMMaker version is 3427 ?
>>
>> What do you guys think ?
>>
>
> It could be the longer jump in the new PICs, but I really doubt it.  But
> there's something wrong with the VM profiler on linux.  It is not showing
> any code in the interpreter run-time, and that might be hiding the real
> reason.  I'll look at this as soon as I have time, but am committed to
> other things today and tomorrow.
>
> _,,,^..^,,,_
> best, Eliot
>

and now that I'bve checked the PCI code again I'm really curious whether a
different entry code (for PICs and methods) would be any faster overall.  I
would test changing
xorl %ecx, %ecx
call cePICAbort0Args
nop
Li: andl $0x00000001, %eax
jmp Lc
nop
Le: *movl %edx, %eax*
* andl $0x00000003, %eax*
jnz Li
movl %ds:(%edx), %eax
andl $0x003fffff, %eax
Lc: cmpl %ecx, %eax
jnz Lnextcase
movl $0x0, %ebx
jmp theMethod.noCheckEntry
to
xorl %ecx, %ecx
call cePICAbort0Args
nop
Li: *movl %edx, %eax*
andl $0x00000001, %eax
jmp Lc
nop
Le: *tstl $0x00000003, %edx*
jnz Li
movl %ds:(%edx), %eax
andl $0x003fffff, %eax
Lc: cmpl %ecx, %eax
jnz Lnextcase
movl $0x0, %ebx
jmp theMethod.noCheckEntry


It saves an instruction in the non-iummediate case and has just as many
instructions in the immediate case.

_,,,^..^,,,_
best, Eliot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20160427/c8727d89/attachment.htm


More information about the Vm-dev mailing list