[Vm-dev] Re: new Cog VMs

Eliot Miranda eliot.miranda at gmail.com
Mon Jan 10 00:28:10 UTC 2011


Hi All,

    find new VMs in
VM.r2344/<http://www.mirandabanda.org/files/Cog/VM/VM.r2344/>
(SimpleStackBasedCogit)
and VM.r2345/ <http://www.mirandabanda.org/files/Cog/VM/VM.r2345/>
(StackToRegisterMappingCogit)
and VMMaker-oscog-45.  These fix a bug that could cause crashes when
converting an interpreted method to a machine-code method on backward branch
(i.e. when the Vm detects an interpreted method is looping).

I hope there are no new issues with
VM.r2344/<http://www.mirandabanda.org/files/Cog/VM/VM.r2344/>
(SimpleStackBasedCogit).
 However, Matthew Fulmer has found that on linux the
VM.r2343/<http://www.mirandabanda.org/files/Cog/VM/VM.r2343/>
 VM.r2345/ <http://www.mirandabanda.org/files/Cog/VM/VM.r2345/>
(StackToRegisterMappingCogit)
VMs crash immediately loading Squeak4.2-10856-beta.image.  I can reproduce
this but haven't had time to investigate.  The StackToRegisterMappingCogit
VMs do start up this image on Mac and Windows.

Agan thanks for pounding on these.  I may not be able to attend to the
linux/StackToRegisterMappingCogit/Squeak4.2-10856-beta.image until next
weekend. Apologies.

best
Eliot

On Thu, Dec 30, 2010 at 6:02 PM, Eliot Miranda <eliot.miranda at gmail.com>wrote:

> Hi All,
>
>      I've released a new version of Cog that has a substantially improved
> code generator along the lines of Peter Deutsch's HPS (VisualWorks) and
> various of Ian Piumarta's VMs.  These all use a simple tecnique to identify
> constant references in bytecode and to support a register-based calling
> convention.  While this does produce faster code it tends to accelerate
> low-level code much more than high-level code as you can see by the
> following benchmarks:
>
> SimpleStackBasedCogit: [1 to: 100000000 do: [:i|]] timeToRun 691
> StackToRegisterMappingCogit: [1 to: 100000000 do: [:i|]] timeToRun 192
> 192 - 691 / 6.91 -72%
>
> SimpleStackBasedCogit: 0 tinyBenchmarks '753495217 bytecodes/sec; 64769127
> sends/sec'
> StackToRegisterMappingCogit: 0 tinyBenchmarks '931756141 bytecodes/sec;
> 128157989 sends/sec'
> 931756141 - 753495217 / 7534952.17 -24%
> 128157989 - 64769127 / 647691.27 -98%
>
> SimpleStackBasedCogit: [Compiler recompileAll] timeToRun 47013 (no
> transcript
> StackToRegisterMappingCogit: [Compiler recompileAll] timeToRun 43406 (no
> transcript)
> 43406 - 47013 / 470.13 -7.67234594686576
>
> The status of this code is essentially beta.  The test suite runs the same
> on the new code generator as on the old, but I think there are still bugs
> because I get the occasional transient error.  I am therefore very
> interested in any reproducible errors you can find.
>
> The VMs (http://www.mirandabanda.org/files/Cog/VM/VM.r2334/) contain a few
> other important changes:
>
> - a bug fix to bytecode<->native pc mappng that produced incorrect results
> for methods containing blocks with ^-returns in them.  One symptom is
> incorrect highlighting of the pc in the debugger, althoguh symptoms could be
> much serious.
>
> - jitting interpreted methods on backward branches.  Currently any
> interpreted method that performs more than 20 backward branches will be
> considered for JIT compilation and if it is suitable (default, <= 60
> literals) will be compiled to native code.
>
> - new callback support.  I need to commit some changes to the Alien package
> to provide access to this but essentially the VM's callback support is now
> able to be ported to architectures with register-based calling conventions
> (ARM, PowerPC, SPARC etc).  I'll try and get the Alien code released soon,
> and to back-port the changes to the standard VM before the end of the
> holiday.
>
> One thing that is still /not/ fixed is the lack of a SoundPlugin on win32.
>  Apologies.  I'll try and get a fix for this before the end of the holidays
> too, but time might be too tight.  There are other priorities such as
> harmonising the standard and Cog VMs for the 4.2 release.
>
> best
> Eliot
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20110109/36eef8b2/attachment.htm


More information about the Vm-dev mailing list