[Vm-dev] Eliot, you did it! (was: new Cog VMs available)

Chris Muller asqueaker at gmail.com
Wed Dec 19 20:39:59 UTC 2012


For the first time ever, the Magma test suite passes on an Intel i7
running Cog!  It ripped through them too about 15 minutes.  Solid as a
rock, thank you so much!

In the app I did still encounter the intermittent problem with an
object which had had its class changed via #primitiveChangeClassTo:.
The notes for 2639 looked like it had a chance to address that -- I'll
try that one when it becomes available.

Thanks again Eliot.


On Sat, Dec 15, 2012 at 6:00 PM, Eliot Miranda <eliot.miranda at gmail.com> wrote:
>
> Hi All,
>
>     new Cog VMs available at http://www.mirandabanda.org/files/Cog/VM/VM.r2636/.  The main change here is to do with corrected headroom and safer signal handling which should hopefully improve stability on linux.
>
> Cog VM binaries as per VMMaker.oscog-eem.234/r2636/r2638.
>
> Use the -z now link flag on the linux builds.  This causes the dynamic linker
> to resolve unresolved symbols on load instead of lazily.  This affects
> reliability in signal handlers, because if the dynamic linker can run at any
> time it can therefore run in a signal handler and cause a deep call chain which
> could corrupt a stack page in the JIT.
> So this aplies three fixes to this issue:
> 	a) correct the stack headroom determination
> 	b) use sigaltstack for signal handlers in the UnixOSProcessPlugin
> 	c) link using -z now on linux.
>
> Use SA_ONSTACK/sigaltstack for signal handlers installed by the
> UnixOSProcessPlugin to avoid running signal handlers on the JIT's stack.
> (r2638: Check for needing sigaltstack properly in setSignalNumber:handler:).
>
> ====
> VMMaker.oscog-eem.233/r2632
>
> Rename misnamed internalIsMutable: and internalIsImmutable:
> to isOopMutable: and isOopImmutable:.  Affects sqVirtualMachine.c,
> but only part of api used in Newspeak VMs.
>
> Merge LargeInteger primitive fixes from VMMaker-dtl.286 and
> tests from VMMaker-dtl.289.
>
> UnixOSProcessPlugin:
> Merge with VMConstruction-Plugins-OSProcessPlugin-dtl.35.
> In particular restore missing code to forwardSignal:toSemaphoreAt:
>
> Get plugin to use SA_ONSTACK/sigaltstack for signal handlers
> if loaded in the JIT.
>
> ====
> VMMaker.oscog-eem.230/r2631
>
> Fix stackPage headroom calculation in CoInterpreter.  Was getting
> things backward.  This increases the stack page headroom by 62%
> from 1564 bytes to 2532 bytes.  Shootout benchmarks unchanged,
> so reduction in frames per page is not an issue for typical code.
>
> This should result in fewer crashes on linux where the dynamic
> linker, if it kicked in during a signal handler, could cause a deep
> call chain at interrupt time and trample the start of the adjoining
> stack page.
>
> Merge LargeInteger primitive fixes from VMMaker-dtl.286.
>
> Change generation of plugin code so that internal plugins call VM
> routines directly and external plugins call through their own local
> copies of the function pointers in InterpreterProxy.  External plugins
> copy the InterpreterProxy functions to their local copies in
> setInterpreter:.
>
> Change implementations of stObject:at:put: to return their value, to
> match the declaration in InterpreterProxy.
>
> Streamline ObjectMemory>>instantiateClass:indexableSize: (hdrSize
> and header3 change together).
>
> Optimize the debug VM by making startOfMemory a macro that
> answers heapBase instead of a method.
>
> Improve stack page printing, and make stack trace printing more
> robust (findClass/SelectorOfMethod:forReceiver:).
>
> Make temporary:in:put: et al answer their values. For stObject:at:put:.
>
> Make jumpTable size err message more explanatory.
>
> Rename misnamed internameIsMutable: and internalIsImmutable:
> to isOopMutable: and isOopImmutable:.  Affects sqVirtualMachine.c,
>
> but only part of api used in Newspeak VMs.--
> best,
> Eliot
>
>


More information about the Vm-dev mailing list