Squeak Port for Android: Update

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

Squeak Port for Android: Update

Dimitry Golubovsky
 
Mariano,

Mariano Peck wrote:

> The fork of the adroid VM is from the Interpreter VM, isn't it ?

Yes, as much as I can tell.

> Have you ever consider or have in mind to adapt the Cog StackVM ?  I
> remember John saying that this improved performance in the iPhone.

This might be a direction for future work. But not a small thing, I expect.

BTW as you are (I suppose) looking closely at Cog internals, do you
see where the event loop is, and how to replace it with an external
queue handler?

> Just curiosity...apart from changing the interpreter loop, does this VM
> require more changes in the "VMMaker part" ? because I guess  most of the
> fork is in the platform code.

Since I haven't seen the Slang sources (I have no idea where they are)
of the Event VM, I cannot tell much.

Thanks.

--
Dimitry Golubovsky

Anywhere on the Web
Reply | Threaded
Open this post in threaded view
|

Re: Squeak Port for Android: Update

johnmci


On 2011-04-19, at 6:37 PM, Dimitry Golubovsky wrote:

>
> Mariano,
>
> Mariano Peck wrote:
>
>> The fork of the adroid VM is from the Interpreter VM, isn't it ?
>
> Yes, as much as I can tell.
>
>> Have you ever consider or have in mind to adapt the Cog StackVM ?  I
>> remember John saying that this improved performance in the iPhone.
>
> This might be a direction for future work. But not a small thing, I expect.

It was a matter of just doing the compile with the cog stack vm, no change to the platform code.

--
===========================================================================
John M. McIntosh <[hidden email]>   Twitter:  squeaker68882
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
===========================================================================




Reply | Threaded
Open this post in threaded view
|

Re: Squeak Port for Android: Update

Andreas.Raab
In reply to this post by Dimitry Golubovsky
 
On 4/20/2011 0:37, Dimitry Golubovsky wrote:
> Since I haven't seen the Slang sources (I have no idea where they are)
> of the Event VM, I cannot tell much.

They are right here:

http://squeakvm.org/win32/experimental/androidvm.zip


Cheers,
   - Andreas

Reply | Threaded
Open this post in threaded view
|

Re: Squeak Port for Android: Update

Mariano Martinez Peck
 


On Wed, Apr 20, 2011 at 8:16 AM, Andreas Raab <[hidden email]> wrote:

On 4/20/2011 0:37, Dimitry Golubovsky wrote:
Since I haven't seen the Slang sources (I have no idea where they are)
of the Event VM, I cannot tell much.

They are right here:

http://squeakvm.org/win32/experimental/androidvm.zip


But where is VMMaker? I mean...the mcz or something from VMMaker so that you can recreate the C sources ?
 

Cheers,
 - Andreas




--
Mariano
http://marianopeck.wordpress.com

Reply | Threaded
Open this post in threaded view
|

Re: Squeak Port for Android: Update

Mariano Martinez Peck
In reply to this post by Dimitry Golubovsky
 


On Wed, Apr 20, 2011 at 12:37 AM, Dimitry Golubovsky <[hidden email]> wrote:
Mariano,

Mariano Peck wrote:

> The fork of the adroid VM is from the Interpreter VM, isn't it ?

Yes, as much as I can tell.

> Have you ever consider or have in mind to adapt the Cog StackVM ?  I
> remember John saying that this improved performance in the iPhone.

This might be a direction for future work. But not a small thing, I expect.

BTW as you are (I suppose) looking closely at Cog internals, do you
see where the event loop is, and how to replace it with an external
queue handler?

I know where it is, but I have no idea how to replace it.
The loop is in the metho #interpret.
For Cog is in StackInterpreter >> interpret
 

> Just curiosity...apart from changing the interpreter loop, does this VM
> require more changes in the "VMMaker part" ? because I guess  most of the
> fork is in the platform code.

Since I haven't seen the Slang sources (I have no idea where they are)
of the Event VM, I cannot tell much.

It's a pity if we cannot get the VMMaker :(
 

Thanks.

--
Dimitry Golubovsky

Anywhere on the Web



--
Mariano
http://marianopeck.wordpress.com

Reply | Threaded
Open this post in threaded view
|

Re: Squeak Port for Android: Update

David T. Lewis
In reply to this post by Mariano Martinez Peck
 
On Sun, Apr 24, 2011 at 11:08:31PM +0200, Mariano Martinez Peck wrote:

>  
> On Wed, Apr 20, 2011 at 8:16 AM, Andreas Raab <[hidden email]> wrote:
>
> >
> > On 4/20/2011 0:37, Dimitry Golubovsky wrote:
> >
> >> Since I haven't seen the Slang sources (I have no idea where they are)
> >> of the Event VM, I cannot tell much.
> >>
> >
> > They are right here:
> >
> > http://squeakvm.org/win32/experimental/androidvm.zip
> >
> >
> But where is VMMaker? I mean...the mcz or something from VMMaker so that you
> can recreate the C sources ?

I am not an Android developer, but I think I can point you to the
answer.

Andreas gives an overview of the the VM works on the Google
source project <http://code.google.com/p/squeak-android-vm/>.

If you unpack the sources (androidvm.zip) you will find an Eclipse
project with some Java glue code for integrating the VM into the
Android environment, and bunch of C code in the project/jni folder.
This includes the interp.c file generated from VMMaker, which has
this identification at the top of the file:

/* Automatically generated from Squeak on 17 January 2010 5:57:19 pm
   by VMMaker 3.11.8
 */

The "VMMaker 3.11.8" tag gives an approximate idea of the VMMaker
version, and if you look through the VMMaker archives on SqueakSource,
you can see that this would have come from a VMMaker based on this
version:

  Name: VMMaker-dtl.147
  Time: 1 November 2009, 10:41:36 pm
  Ancestors: VMMaker-dtl.146
 
  VMMaker 3.11.8
  Reference Mantis 7407: BitBlt. Incorrect alpha values for several rules.
  Add VMMaker-BitBlt-AlphaFixes-jmv-M7407.cs bitblt alpha fixes by Juan Vuletich

So you can reasonably conclude that Andreas was using a standard
VMMaker from this time period, possibly with some local changes
but basically a generic VMMaker.

As for the local changes, I would expect that they are the changes
that Andreas posted here:
  http://lists.squeakfoundation.org/pipermail/vm-dev/2009-November/003437.html

So the fileout would be this attachment:
  http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20091113/970e2f4e/EventVM.1.bin

Andreas' posting here has the relevant links:
  http://lists.squeakfoundation.org/pipermail/vm-dev/2011-April/007510.html

So in conclusion, the VMMaker for the Android VM is "hiding" right
where it has always been, in SqS/VMMaker :)

I cannot say for certain, but my expectation is that you could
use any version of VMMaker that you want (including the oscog branch)
as long as you generate an interpreter with no Intel dependencies. So
if you wanted to apply the event VM changes to a StackInterpreter, I
can think of no reason that this would not work also.

HTH,
Dave

Reply | Threaded
Open this post in threaded view
|

Re: Squeak Port for Android: Update

Bert Freudenberg


On 25.04.2011, at 13:13, David T. Lewis wrote:

>
> On Sun, Apr 24, 2011 at 11:08:31PM +0200, Mariano Martinez Peck wrote:
>>
>> On Wed, Apr 20, 2011 at 8:16 AM, Andreas Raab <[hidden email]> wrote:
>>
>>>
>>> On 4/20/2011 0:37, Dimitry Golubovsky wrote:
>>>
>>>> Since I haven't seen the Slang sources (I have no idea where they are)
>>>> of the Event VM, I cannot tell much.
>>>>
>>>
>>> They are right here:
>>>
>>> http://squeakvm.org/win32/experimental/androidvm.zip
>>>
>>>
>> But where is VMMaker? I mean...the mcz or something from VMMaker so that you
>> can recreate the C sources ?
>
> I am not an Android developer, but I think I can point you to the
> answer.
>
> Andreas gives an overview of the the VM works on the Google
> source project <http://code.google.com/p/squeak-android-vm/>.
>
> If you unpack the sources (androidvm.zip) you will find an Eclipse
> project with some Java glue code for integrating the VM into the
> Android environment, and bunch of C code in the project/jni folder.
> This includes the interp.c file generated from VMMaker, which has
> this identification at the top of the file:
>
> /* Automatically generated from Squeak on 17 January 2010 5:57:19 pm
>   by VMMaker 3.11.8
> */
>
> The "VMMaker 3.11.8" tag gives an approximate idea of the VMMaker
> version, and if you look through the VMMaker archives on SqueakSource,
> you can see that this would have come from a VMMaker based on this
> version:
>
>  Name: VMMaker-dtl.147
>  Time: 1 November 2009, 10:41:36 pm
>  Ancestors: VMMaker-dtl.146
>
>  VMMaker 3.11.8
>  Reference Mantis 7407: BitBlt. Incorrect alpha values for several rules.
>  Add VMMaker-BitBlt-AlphaFixes-jmv-M7407.cs bitblt alpha fixes by Juan Vuletich
>
> So you can reasonably conclude that Andreas was using a standard
> VMMaker from this time period, possibly with some local changes
> but basically a generic VMMaker.
>
> As for the local changes, I would expect that they are the changes
> that Andreas posted here:
>  http://lists.squeakfoundation.org/pipermail/vm-dev/2009-November/003437.html
>
> So the fileout would be this attachment:
>  http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20091113/970e2f4e/EventVM.1.bin
>
> Andreas' posting here has the relevant links:
>  http://lists.squeakfoundation.org/pipermail/vm-dev/2011-April/007510.html
>
> So in conclusion, the VMMaker for the Android VM is "hiding" right
> where it has always been, in SqS/VMMaker :)
>
> I cannot say for certain, but my expectation is that you could
> use any version of VMMaker that you want (including the oscog branch)
> as long as you generate an interpreter with no Intel dependencies. So
> if you wanted to apply the event VM changes to a StackInterpreter, I
> can think of no reason that this would not work also.
>
> HTH,
> Dave

... the point being that the generated sources are *identical* across platforms. Only the platform support code differs, all platforms share the same "VM".

- Bert -