New Cog VMs available

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

New Cog VMs available

Eliot Miranda-2
...at http://www.mirandabanda.org/files/Cog/VM/VM.r3041/.


The principal changes are fixing a performance regression in the 3040 VMs, fixing some Spur bugs in primitiveClone/shallowCopy, and radically simplifying the Spur become implementation,
trading the elimination of lots of post-become class table scanning for adding read barriers to class hierarchy method lookup.


CogVM source as per VMMaker.oscog-eem.820/r3041

Put the handling of the cloning of cogged methods in the clone: implementations,
removing it from the primitive.  Add it to the pinning clone too.

Specialize the store check trampoline generation.
Move it down to the relevant object representations.

Move setting of isRemembered flag to true into SpurGenerationScavenger>>
remember:.  Inline possibleRootStoreInto: (given that remember: is /not/
inlined.  Call remember directly from the ceStoreCheckTrampoline, and
hence have remember: answer its argument.

Fix localization bug.  Variables in initialize methods were not considered
references (cuz there are excluded).  This caused VMMaker.oscog-eem.816's
extraction of zero/false vars to StackInterpreter>>#initialize to cause
nextPollUsecs to be localized to checkForEventsMayContextSwitch:.

Spur:
Fix bug in scanClassPostBecome:effects: with new lazy
selector following policy by... throwing it all away.

The read barriers on method lookup (of the methodClass association in super
sends, of the superclass link, of method dictionaries, method dictionary arrays,
selectors and methods is cheap.  So replace scanning classes and method
dictionaries in the class table post become with read marriewrs on methodClass,
superclass and method dictionary etc on lookup.

The read barrier on an object from which we are going to fetch state (such as a
class or method dictionary) is essentially free on modern machines because the
class index and the state very likely share a cache line, and the register code
for testing is so cheap compared to memory access.  Further the read barrier on
selectors is cheap because the method lookup cache is effective in reducing the
number of message lookups and because nil entries need no check.

So nuke all the followNecessaryForwardingInMethod: machinery including the
cmUsesMethodClass hack.  Nuke scanClassPostBecome:effects:.

Rip out the forwardingCount: measurement code.  It causes
bad performance regressions (due to failing inlines?)

Clean up, e.g. replace followNonImmediateField:ofObject:
uses with followObjField:ofObject:.

canPinObjects can be inlined.


--
best,
Eliot


Reply | Threaded
Open this post in threaded view
|

Re: New Cog VMs available

Frank Shearar-3
On 15 July 2014 20:58, Eliot Miranda <[hidden email]> wrote:
> ...at http://www.mirandabanda.org/files/Cog/VM/VM.r3041/.

... and being tested in CI.

frank