new Cog VMs available

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 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.r2697/

CogVM binaries as per VMMaker.oscog-eem.270/r2697

Fix the become issue where methods that are identical are failing
the code test because their penultimate literals are different objects.
Add a flag "cmUsesPenultimateLit" to jitted methods, stealing bits
from stackCheckOffset (which was way larger than needed).
Shrink stackCheckOffset to 12 bits (still an order of magnitude larger
than needed) and add an error check on assigning it.
Also add a check for max method size (2^16-1 bytes) and refuse to
jit a method that generates too much code.
When comparing code, use the cmUsesPenultimateLit flag to decide
if comparison includes penultimate lit or not.

This is mildly insane, but the VM really doesn't know about the penultimate
literal and it shouldn't depend on knowing it can be ignored.  Note that the
CoInterpreter knows about the last literal; it uses this in supersends.
With this hack, Pharo's condenseSources works.

Fix bug in primitiveClone/cloneContext: that causes the copy to be a word short.
Use isPointerNonInt: and isContextNonInt: in a few places.

Implement unknownBytecode.  Send unknownBytecode to the activeContext on
unknown bytecode if the selector is in the specialObjectsArray.

Fix page size bug in platforms/Cross/vm/sqHeapMap.c.

--
best,
Eliot


Reply | Threaded
Open this post in threaded view
|

Re: new Cog VMs available

Frank Shearar-3
On 5 March 2013 22:45, Eliot Miranda <[hidden email]> wrote:

> at http://www.mirandabanda.org/files/Cog/VM/VM.r2697/
>
> CogVM binaries as per VMMaker.oscog-eem.270/r2697
>
> Fix the become issue where methods that are identical are failing
> the code test because their penultimate literals are different objects.
> Add a flag "cmUsesPenultimateLit" to jitted methods, stealing bits
> from stackCheckOffset (which was way larger than needed).
> Shrink stackCheckOffset to 12 bits (still an order of magnitude larger
> than needed) and add an error check on assigning it.
> Also add a check for max method size (2^16-1 bytes) and refuse to
> jit a method that generates too much code.
> When comparing code, use the cmUsesPenultimateLit flag to decide
> if comparison includes penultimate lit or not.
>
> This is mildly insane, but the VM really doesn't know about the penultimate
> literal and it shouldn't depend on knowing it can be ignored.  Note that the
> CoInterpreter knows about the last literal; it uses this in supersends.
> With this hack, Pharo's condenseSources works.
>
> Fix bug in primitiveClone/cloneContext: that causes the copy to be a word
> short.
> Use isPointerNonInt: and isContextNonInt: in a few places.
>
> Implement unknownBytecode.  Send unknownBytecode to the activeContext on
> unknown bytecode if the selector is in the specialObjectsArray.
>
> Fix page size bug in platforms/Cross/vm/sqHeapMap.c.

Build scripts duly updated.

frank

Reply | Threaded
Open this post in threaded view
|

Re: new Cog VMs available

Chris Muller-3
In reply to this post by Eliot Miranda-2
Thanks Eliot.  Unfortunately, for me my app still crashes instantly with:

-----------
[ ... big stack trace ... ]
stack page bytes 4096 available headroom 3300 minimum unused headroom 2596

        (last object overwritten)
-----------

2640 is stable for me (as long as I don't use a write-barrier).



On Tue, Mar 5, 2013 at 4:45 PM, Eliot Miranda <[hidden email]> wrote:

> at http://www.mirandabanda.org/files/Cog/VM/VM.r2697/
>
> CogVM binaries as per VMMaker.oscog-eem.270/r2697
>
> Fix the become issue where methods that are identical are failing
> the code test because their penultimate literals are different objects.
> Add a flag "cmUsesPenultimateLit" to jitted methods, stealing bits
> from stackCheckOffset (which was way larger than needed).
> Shrink stackCheckOffset to 12 bits (still an order of magnitude larger
> than needed) and add an error check on assigning it.
> Also add a check for max method size (2^16-1 bytes) and refuse to
> jit a method that generates too much code.
> When comparing code, use the cmUsesPenultimateLit flag to decide
> if comparison includes penultimate lit or not.
>
> This is mildly insane, but the VM really doesn't know about the penultimate
> literal and it shouldn't depend on knowing it can be ignored.  Note that the
> CoInterpreter knows about the last literal; it uses this in supersends.
> With this hack, Pharo's condenseSources works.
>
> Fix bug in primitiveClone/cloneContext: that causes the copy to be a word
> short.
> Use isPointerNonInt: and isContextNonInt: in a few places.
>
> Implement unknownBytecode.  Send unknownBytecode to the activeContext on
> unknown bytecode if the selector is in the specialObjectsArray.
>
> Fix page size bug in platforms/Cross/vm/sqHeapMap.c.
>
> --
> best,
> Eliot
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: [Vm-dev] new Cog VMs available

timrowledge
In reply to this post by Eliot Miranda-2

But the cog is dead…
http://www.youtube.com/watch?v=tq7XG4XOJsc

tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
Useful random insult:- He fell out of the ugly tree and hit every branch on the way down.



Reply | Threaded
Open this post in threaded view
|

Re: [Vm-dev] new Cog VMs available

Ron Teitelbaum
That's pretty funny!

Ron

> -----Original Message-----
> From: [hidden email] [mailto:squeak-dev-
> [hidden email]] On Behalf Of tim Rowledge
> Sent: Thursday, March 07, 2013 9:09 PM
> To: The general-purpose Squeak developers list
> Subject: [squeak-dev] Re: [Vm-dev] new Cog VMs available
>
>
> But the cog is dead.
> http://www.youtube.com/watch?v=tq7XG4XOJsc
>
> tim
> --
> tim Rowledge; [hidden email]; http://www.rowledge.org/tim Useful
> random insult:- He fell out of the ugly tree and hit every branch on the
way
> down.
>
>
>



Reply | Threaded
Open this post in threaded view
|

Re: [Vm-dev] new Cog VMs available

timrowledge

On 07-03-2013, at 9:32 PM, "Ron Teitelbaum" <[hidden email]> wrote:

> That's pretty funny!

They're actually a pretty good band but I prefer Abney PArk


tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
On a clear disk you can seek forever...



Reply | Threaded
Open this post in threaded view
|

Re: new Cog VMs available

Eliot Miranda-2
In reply to this post by Chris Muller-3
Hi Chris,

    can you package up a reproducible case and point me to the image?  By reproducible I mean save the image with a doit that invokes the code that creates the bug, e.g.

Smalltalk saveAs: 'crash'.
Gofer it
        url: 'http://www.squeaksource.com/MetacelloRepository';
        package: 'ConfigurationOfFFI';
        load.
(Smalltalk at: #ConfigurationOfFFI) project stableVersion load.


On Wed, Mar 6, 2013 at 4:06 PM, Chris Muller <[hidden email]> wrote:
Thanks Eliot.  Unfortunately, for me my app still crashes instantly with:

-----------
[ ... big stack trace ... ]
stack page bytes 4096 available headroom 3300 minimum unused headroom 2596

        (last object overwritten)
-----------

2640 is stable for me (as long as I don't use a write-barrier).



On Tue, Mar 5, 2013 at 4:45 PM, Eliot Miranda <[hidden email]> wrote:
> at http://www.mirandabanda.org/files/Cog/VM/VM.r2697/
>
> CogVM binaries as per VMMaker.oscog-eem.270/r2697
>
> Fix the become issue where methods that are identical are failing
> the code test because their penultimate literals are different objects.
> Add a flag "cmUsesPenultimateLit" to jitted methods, stealing bits
> from stackCheckOffset (which was way larger than needed).
> Shrink stackCheckOffset to 12 bits (still an order of magnitude larger
> than needed) and add an error check on assigning it.
> Also add a check for max method size (2^16-1 bytes) and refuse to
> jit a method that generates too much code.
> When comparing code, use the cmUsesPenultimateLit flag to decide
> if comparison includes penultimate lit or not.
>
> This is mildly insane, but the VM really doesn't know about the penultimate
> literal and it shouldn't depend on knowing it can be ignored.  Note that the
> CoInterpreter knows about the last literal; it uses this in supersends.
> With this hack, Pharo's condenseSources works.
>
> Fix bug in primitiveClone/cloneContext: that causes the copy to be a word
> short.
> Use isPointerNonInt: and isContextNonInt: in a few places.
>
> Implement unknownBytecode.  Send unknownBytecode to the activeContext on
> unknown bytecode if the selector is in the specialObjectsArray.
>
> Fix page size bug in platforms/Cross/vm/sqHeapMap.c.
>
> --
> best,
> Eliot
>
>
>




--
best,
Eliot