New Cog & Spur VMs available

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

New Cog & Spur VMs available

Eliot Miranda-2
 
see http://www.mirandabanda.org/files/Cog/VM/VM.r2987/


CogVM binaries as per VMMaker.oscog-eem.769/r2987

platform code:
Type the memory allocators as accepting and answering usqInts to give a chance
at allocating more than 2Gb.

Use unsigned comparisons when testing if there's sufficient heap space in
readImageFromFile:HeapSize:StartingAt:.  Leads to accurate failure message when
failing to allocate large heap.

Correct syntax of inline assembler for byte and word swap operations in win32
16-bit displays.  Thanks to Nicolai Hess!

sqUnixX11.c:
Include the right X11 include file to pull in the def for XK_equal
(keysym.h vs keysymdef.h).
Don't define BytesPerOop or BaseHeaderSize; these should be taken from interp.h.

Integrate Philippe Back's fix for numberic keypads on X11;

Add the XDisplayControlPlugin to the plugins loaded by the image build script.

Use pthread_atfork to reinstall the heartbeat thread post fork.

Make sure SIGALRM is unblocked if using the interval timer heartbeat on linux.

Remove RPATH spec from unix builds.

Include the executable name in the crash.dmp report.

Fix stack backtrace printing on Mac & Unix to not segfault when invoked from
error(char *msg) function.



CoInterpreter:
No longer inline CoInterpreter>>pre/postGCAction: for VM profiling.

Fix instantiation of large non-byte objects.  The old code for
sufficientSpaceToInstantiate:indexableSize: stupidly subtracted BytesPerWord
instead of ShiftForWord from LongSizeNumBits in determining the max size.

Garbage collect/remap the primTraceLog correctly.  If a GC happens
very early in start-up the log circular buffer may not be full and the
existing code assumed it always was.

Add Spur-specific interpreter proxy functions for immediate character and
pinning access.  Implement the new Spur interpreterProxy API for ObjectMemory
(of course pinObject: fails, and isCharacterValue: has a smaller range).


Fix a bug in printing frame flags (order was the wrong way around).

Allow vmParameterAt: 26 put: 0 to disable the heartbeat itimer.

Add AioPlugin to Mac VMs.

Make CoInterpreter>>printFrame: not mislead as to the number of
temps in a block activation.

Change the time primitives to access the time now, not the time as updated by
the heartbeat (but /don't/ change the time basis for event checking.  This for
performance because use of gettimeofday in e.g. stack overflow can be a
signficant performance overhead.  Move the simulated time implementations
(ioSeconds et al) up to StackInterpreter to reduce duplication.  Add
ioSecondsNow et al to the platform code to support this.

Fix regression in primitiveUtcWithOffset, answer the correct local time offset.

Fix ioSecondsNow to use the time now, not the heartbeat time.

Revamp primitiveVMParameter to avoid overflow in values such as total heap size.
Make statProcessSwitch, statIOProcessEvents, statForceInterruptCheck,
statCheckForEvents, statStackOverflow & statStackPageDivorce 64-bit to avoid
wrapping.  Make sure that positive64BitIntegerFor: will not cause a GC just as
positive32BitIntegerFor: doesn't.

Make primitiveClone cope with variable args, cloning its last
argument.  This for the Newspeak VMMirror.

Add primitiveAllObjects, adapted from VMMaker-dtl.339.mcz

Add Nicolas Cellier's bitblt speedups, reference:
Mantis issue 7802: Fast-up BitBlt rgbAdd rule
Mantis issue 7803: Fast-up BitBlt alpha blending rules

Check for valid bitmap in primitivePixelValueAt aka BitBltSimulation>>
primitivePixelValueAtX:y: Fix provided by Nicolas Cellier. Reference Mantis 7799

Avoid including the instructionPointer in the context when marrying the top
frame during divorceAllFrames for voidVMState..If:.  (how did this ever work??)

Fix a bug in BitBltPlugin>>lockSurfaces.

Add the compression prims to the Newspeak VM's ZipPlugin.

Fix roomToPushNArgs:; the Cog VMs can be more lenient because of the use of a
stack instead of contexts. Fixes some valueWithArguments: failures.

Integrate Nice's improved SmallInteger generated primitives that support
int x float comparison, & hence speed-up int x float comparison enormously.

Integrate VMMaker-dtl.328 (failure of primitiveDisplayString to advance destX).

Integrate 2792, fix memory leaks in SqueakSSL on unix.

Integrate VMMaker-tpr.325 7247: BitBlt Bug in alphaSourceBlendBits8.

Integrate VMMaker-tpr.326, Fix a single-bit constant error in
BitBltSimulation>>copyBits:Fallback: - change 16r3FFF to 16r7FFF to
correct tallyIntoMap behaviour for Scratch using BenBlt on the Pi.

Restrict at-cache to bytecodePrimAt[Put], eliminating it from
primitive[String]At[Put].  Sionara the explicit noAtCache at:[put:] machinery
in CoInterpreter now that the atCache is confined to the interpreter's special
selector at:[put:] bytecodes.  Speeds up Stack VM signfiicantly, e.g. a compile
of Compiler package falls from 1.6s to 1.4s on 2.2GHz Intel Core i7 MacBook Pro.

Restrict at-cache to bytecodePrimAt[Put], eliminating it from primitive[String]
At[Put].  Undoes need for fix in VMMaker-oscog.44 of 7 January 2011:
"Fix leaking of objects into the atCache due to ceSend:super:to:numArgs:'s
use of executeNewMethod without always setting messageSelector."
This renders messageSelector and lkupClass ephemeral, since they are live only
during message lookup and because createActualMessageTo will not cause a GC
these cannot change during message lookup. Hence eliminate them from
markAndTraceInterpreterOops: & mapVMRegisters.

Fix arg count for primPCREExecfromto


Cogit:
Streamline the genPrimReturnEnterCogCodeEnilopmart.
Streamline genExternalizePointersForPrimitiveCall

Have StackToRegisterMappingCogit>>genPushReceiverBytecode
use ReceiverResultReg if it contains self.

Fix a double free bug in unlinkSendsOf:isMNUSelector:.  Harmless cuz the result
is only a bogus count of how many methods freed.  Beef up the cog method
integrity check to verify a its methodObject is a CompiledMethod.

Fix bug in unlinkSendsOf:isMNUSelector: (primitiveFlushCacheBySelector)
where old code could free the method of an active frame.

Fix an assert fail in mapFor:bcpc:performUntil:arg: (this for
primitiveClass where the class table reference can be the first map entry).

Fix a bug in Newspeak remapIfObjectRef:pc:hasYoung: with dynamic super
sends which could compute an invalid target method.

Rename pushExplicitOuterSendReceiverBytecode et al to
pushExplicitOuterReceiverBytecode et al.  These are not sends.

Fix pc-mapping for NewspeakV4.  Dynamic super sends should
/not/ be annotated with IsNSSendCall, but wth the vanilla IsSendCall.
This fixes a bug converting an interpreter activation of a method
with a loop and a dynamic super send to a machine code frame.

For performance, specify that mapFor:[bcpc:]performUntil:arg: are
inlined, eliminating the perform/indirect function call.  This adds of
the order of 3% to the size of a cogit.o's text seg so is acceptable.

Print (nil) next to the selector for cog methods with a nil selector.

Fix bug in Cogit>>unlinkSendsOf:isMNUSelector:, used by
primitiveFlushCacheBySelector.  The method could leave sends
linked to freed MNU PICs.


--
best,
Eliot
Reply | Threaded
Open this post in threaded view
|

Re: New Cog & Spur VMs available

David T. Lewis
 
Hi Eliot,

Very cool to see the new Spur image arriving!  

On Thu, Jun 12, 2014 at 04:08:00PM -0700, Eliot Miranda wrote:
>
> Add the XDisplayControlPlugin to the plugins loaded by the image build
> script.

A minor nit - the XDisplayControlPlugin and AIOPlugin seem to be missing in
these distributions.

>
> Use pthread_atfork to reinstall the heartbeat thread post fork.

This will make the OSProcess/CommandShell tests work (when the plugins are
added). Thanks!
 
Dave
 
Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] New Cog & Spur VMs available

Eliot Miranda-2
In reply to this post by Eliot Miranda-2
 
Hi Stéph,


On Fri, Jun 13, 2014 at 4:38 AM, Stéphane Rollandin <[hidden email]> wrote:
I got a crash right away with newest cogwin when opening my usual working image. No simple case easy to reproduce yet. Dump is attached.

Thanks.  This is fixed in VMMaker.oscog-eem.772.  It was an overzealous bounds check on a relocated call of an interpreter primitive.  The VM complained and aborted because the interpreter primitive;s address was out of the code zone (as of course it should be; it is in the interpreter)  i.e. the VM should not have performed the check and should not have exited.  Apologies.  I'll be building and uploading new VMs soon.

--
best,
Eliot