VM Maker: VMMaker-oscog.50.mcz

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

VM Maker: VMMaker-oscog.50.mcz

squeak-dev-noreply
 
Eliot Miranda uploaded a new version of VMMaker to project VM Maker:
http://www.squeaksource.com/VMMaker/VMMaker-oscog.50.mcz

==================== Summary ====================

Name: VMMaker-oscog.50
Author: eem
Time: 16 March 2011, 10:56:06 am
UUID: cc1d11ad-11f4-41d6-abfe-48f03fd9a405
Ancestors: VMMaker-eem.737, VMMaker-oscog.49

Sista: Speculative-inlining Smalltalk architecture
SistaStackToRegisterMappingCogit code generator counts
conditional jumps (taken & untaken counts) calling back on
counter trip and provides a primitive to access inline cache
and counter state from methods.

Sista code generator now compiles and runs for a short time (seems
fine in the simulator).
cogit: macro allows excluding Sista-specific code from the CoInterpreter.
Support for shortening objects (for shortening the Array result of
primitiveSistaMethodPICAndCounterData).

CogMTVM source.  Minor refactor/rename for SistaStackToRegisterMappingCogit.
Sista = Speculative inlining Smalltalk architecture.
IsMethodReference/annotateMethodRef: => IsAbsPCReference/annotateAbsolutePCRef:
CogMethodSurrogate hierarchy now holds cogit and clients defer to cogit to create
the CogMethodSurrogate determined by the Cogit, so that SistaStackToRegisterMappingCogit
can add a numCounters field to its CogMethod variant.

Slang:
Add a cogit: pragma to eliminate Sista-specific methods when
generating a non-Sista VM. (but what about prim table?)

Reply | Threaded
Open this post in threaded view
|

Re: VM Maker: VMMaker-oscog.50.mcz

Tapple Gao
 
On Wed, Mar 16, 2011 at 10:02:43PM +0000, [hidden email] wrote:

>  
> Eliot Miranda uploaded a new version of VMMaker to project VM Maker:
> http://www.squeaksource.com/VMMaker/VMMaker-oscog.50.mcz
>
> ==================== Summary ====================
>
> Name: VMMaker-oscog.50
> Author: eem
> Time: 16 March 2011, 10:56:06 am
> UUID: cc1d11ad-11f4-41d6-abfe-48f03fd9a405
> Ancestors: VMMaker-eem.737, VMMaker-oscog.49
>
> Sista: Speculative-inlining Smalltalk architecture

Woah. is this polymorphic inline caching for squeak? we need to
pay you more

--
Matthew Fulmer (a.k.a. Tapple)
Reply | Threaded
Open this post in threaded view
|

Re: VM Maker: VMMaker-oscog.50.mcz

Frank Shearar
 
On 2011/03/17 13:10, Matthew Fulmer wrote:

>
> On Wed, Mar 16, 2011 at 10:02:43PM +0000, [hidden email] wrote:
>>
>> Eliot Miranda uploaded a new version of VMMaker to project VM Maker:
>> http://www.squeaksource.com/VMMaker/VMMaker-oscog.50.mcz
>>
>> ==================== Summary ====================
>>
>> Name: VMMaker-oscog.50
>> Author: eem
>> Time: 16 March 2011, 10:56:06 am
>> UUID: cc1d11ad-11f4-41d6-abfe-48f03fd9a405
>> Ancestors: VMMaker-eem.737, VMMaker-oscog.49
>>
>> Sista: Speculative-inlining Smalltalk architecture
>
> Woah. is this polymorphic inline caching for squeak? we need to
> pay you more

 From what little I understand on http://www.mirandabanda.org/cogblog/,
Cog already uses PICs.

This looks like measurement/instrospection/inspection stuff?

(But otherwise I agree!)

frank
Reply | Threaded
Open this post in threaded view
|

Re: VM Maker: VMMaker-oscog.50.mcz

Eliot Miranda-2
In reply to this post by Tapple Gao
 


On Thu, Mar 17, 2011 at 6:10 AM, Matthew Fulmer <[hidden email]> wrote:

On Wed, Mar 16, 2011 at 10:02:43PM +0000, [hidden email] wrote:
>
> Eliot Miranda uploaded a new version of VMMaker to project VM Maker:
> http://www.squeaksource.com/VMMaker/VMMaker-oscog.50.mcz
>
> ==================== Summary ====================
>
> Name: VMMaker-oscog.50
> Author: eem
> Time: 16 March 2011, 10:56:06 am
> UUID: cc1d11ad-11f4-41d6-abfe-48f03fd9a405
> Ancestors: VMMaker-eem.737, VMMaker-oscog.49
>
> Sista: Speculative-inlining Smalltalk architecture

Woah. is this polymorphic inline caching for squeak? we need to
pay you more

Cog has had polymorphic inline cacheing since the release of the JIT.  This is the substrate necessary to support speculative inlining a.k.a. adaptive optimization.
 

--
Matthew Fulmer (a.k.a. Tapple)

Reply | Threaded
Open this post in threaded view
|

Re: VM Maker: VMMaker-oscog.50.mcz

Eliot Miranda-2
In reply to this post by Frank Shearar
 


On Thu, Mar 17, 2011 at 6:37 AM, Frank Shearar <[hidden email]> wrote:

On 2011/03/17 13:10, Matthew Fulmer wrote:

On Wed, Mar 16, 2011 at 10:02:43PM +0000, [hidden email] wrote:

Eliot Miranda uploaded a new version of VMMaker to project VM Maker:
http://www.squeaksource.com/VMMaker/VMMaker-oscog.50.mcz

==================== Summary ====================

Name: VMMaker-oscog.50
Author: eem
Time: 16 March 2011, 10:56:06 am
UUID: cc1d11ad-11f4-41d6-abfe-48f03fd9a405
Ancestors: VMMaker-eem.737, VMMaker-oscog.49

Sista: Speculative-inlining Smalltalk architecture

Woah. is this polymorphic inline caching for squeak? we need to
pay you more

>From what little I understand on http://www.mirandabanda.org/cogblog/, Cog already uses PICs.

Right.
 

This looks like measurement/instrospection/inspection stuff?

Yes.  Specifically counting of conditional branches and calling back when a counter reaches zero provides a means for the VM to report "hot spots". The image is then invoked in a hot spot, acn use the introspection facilities to discover the types at call sites (that's what PICs record) and from that the image is in a position to create optimized bytecoded methods that speculatively inline code.  The inlining is speculative because the type information in PICs reflects only the types at each send in the current programme and say nothing about what the types may be in the future (but they're a good predictor).  So the inliner must preceed code that assumes types with checks of those types.  You can think of it as hoisting out invariant checks such as class membership as far as possible in an optimized method and then, once past those outer checks, nothing needs to be checked in the inner loops.  Hence performance.

I'm working with Marcus Denker and Colin Putney on this and we're interested in contributions from strong low-level and/or high-level programmers with an interest in optimization.  e.g. if you've read and understood and been excited by Munchnik we're interested in having you aboard.

(But otherwise I agree!)

frank