squeak.cog.spur-sunos32x86

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

squeak.cog.spur-sunos32x86

stes
 

The latest github sources of the "opensmalltalk" vm can also be compiled on
Solaris 11.

bash-4.4$ git remote -v
origin http://github.com/OpenSmalltalk/opensmalltalk-vm (fetch)

I've made some modifications in a branch "solaris" and those modifications
although in the end not so difficult, they are less trivial than the
modification that was required to get the "classic vm" compile.

In fact the internals of the "opensmalltalk" vm seem to rely on "assembly
language", but this may also be the case with the "classic vm" (I haven't
look into it, and I'm a beginner with squeak vm).

Anyway the result of the compile for the 32-bit "squeak cog spur" vm is now:

bash-4.4$ find ./squeak.cog.spur-sunos32x86/
./squeak.cog.spur-sunos32x86/
./squeak.cog.spur-sunos32x86/bin
./squeak.cog.spur-sunos32x86/bin/squeak
./squeak.cog.spur-sunos32x86/lib
./squeak.cog.spur-sunos32x86/lib/squeak
./squeak.cog.spur-sunos32x86/lib/squeak/5.0-202003240214-solaris
./squeak.cog.spur-sunos32x86/lib/squeak/5.0-202003240214-solaris/vm-display-null.a
./squeak.cog.spur-sunos32x86/lib/squeak/5.0-202003240214-solaris/XDisplayControlPlugin.a
./squeak.cog.spur-sunos32x86/lib/squeak/5.0-202003240214-solaris/squeak
./squeak.cog.spur-sunos32x86/lib/squeak/5.0-202003240214-solaris/vm-sound-OSS.so
./squeak.cog.spur-sunos32x86/lib/squeak/5.0-202003240214-solaris/UUIDPlugin.so
./squeak.cog.spur-sunos32x86/lib/squeak/5.0-202003240214-solaris/vm-sound-pulse.so
./squeak.cog.spur-sunos32x86/lib/squeak/5.0-202003240214-solaris/SqueakFFIPrims.so
./squeak.cog.spur-sunos32x86/lib/squeak/5.0-202003240214-solaris/B3DAcceleratorPlugin.so
./squeak.cog.spur-sunos32x86/lib/squeak/5.0-202003240214-solaris/UnixOSProcessPlugin.so
./squeak.cog.spur-sunos32x86/lib/squeak/5.0-202003240214-solaris/vm-sound-OSS.a
./squeak.cog.spur-sunos32x86/lib/squeak/5.0-202003240214-solaris/XDisplayControlPlugin.so
./squeak.cog.spur-sunos32x86/lib/squeak/5.0-202003240214-solaris/ImmX11Plugin.a
./squeak.cog.spur-sunos32x86/lib/squeak/5.0-202003240214-solaris/UnicodePlugin.a
./squeak.cog.spur-sunos32x86/lib/squeak/5.0-202003240214-solaris/LocalePlugin.a
./squeak.cog.spur-sunos32x86/lib/squeak/5.0-202003240214-solaris/Squeak3D.so
./squeak.cog.spur-sunos32x86/lib/squeak/5.0-202003240214-solaris/UnixOSProcessPlugin.a
./squeak.cog.spur-sunos32x86/lib/squeak/5.0-202003240214-solaris/FileAttributesPlugin.a
./squeak.cog.spur-sunos32x86/lib/squeak/5.0-202003240214-solaris/vm-sound-null.a
./squeak.cog.spur-sunos32x86/lib/squeak/5.0-202003240214-solaris/FileAttributesPlugin.so
./squeak.cog.spur-sunos32x86/lib/squeak/5.0-202003240214-solaris/ImmX11Plugin.so
./squeak.cog.spur-sunos32x86/lib/squeak/5.0-202003240214-solaris/SqueakFFIPrims.a
./squeak.cog.spur-sunos32x86/lib/squeak/5.0-202003240214-solaris/UnicodePlugin.so
./squeak.cog.spur-sunos32x86/lib/squeak/5.0-202003240214-solaris/vm-sound-pulse.a
./squeak.cog.spur-sunos32x86/lib/squeak/5.0-202003240214-solaris/vm-display-X11.a
./squeak.cog.spur-sunos32x86/lib/squeak/5.0-202003240214-solaris/vm-sound-Sun.a
./squeak.cog.spur-sunos32x86/lib/squeak/5.0-202003240214-solaris/vm-sound-Sun.so
./squeak.cog.spur-sunos32x86/lib/squeak/5.0-202003240214-solaris/B3DAcceleratorPlugin.a
./squeak.cog.spur-sunos32x86/lib/squeak/5.0-202003240214-solaris/vm-sound-null.so
./squeak.cog.spur-sunos32x86/lib/squeak/5.0-202003240214-solaris/SqueakSSL.so
./squeak.cog.spur-sunos32x86/lib/squeak/5.0-202003240214-solaris/Squeak3D.a
./squeak.cog.spur-sunos32x86/lib/squeak/5.0-202003240214-solaris/LocalePlugin.so
./squeak.cog.spur-sunos32x86/lib/squeak/5.0-202003240214-solaris/vm-display-null.so
./squeak.cog.spur-sunos32x86/lib/squeak/5.0-202003240214-solaris/UUIDPlugin.a
./squeak.cog.spur-sunos32x86/lib/squeak/5.0-202003240214-solaris/SqueakSSL.a
./squeak.cog.spur-sunos32x86/lib/squeak/5.0-202003240214-solaris/vm-display-X11.so
./squeak.cog.spur-sunos32x86/squeak


with those binaries I'm able to open a 5.2 or 5.3 Squeak image on Solaris.






--
Sent from: http://forum.world.st/Squeak-VM-f104410.html
Reply | Threaded
Open this post in threaded view
|

Re: squeak.cog.spur-sunos32x86

David T. Lewis
 
On Sat, Mar 28, 2020 at 09:40:49AM -0500, stes wrote:

>  
>
> The latest github sources of the "opensmalltalk" vm can also be compiled on
> Solaris 11.
>
> bash-4.4$ git remote -v
> origin http://github.com/OpenSmalltalk/opensmalltalk-vm (fetch)
>
> I've made some modifications in a branch "solaris" and those modifications
> although in the end not so difficult, they are less trivial than the
> modification that was required to get the "classic vm" compile.


Bravo, well done.

>
> In fact the internals of the "opensmalltalk" vm seem to rely on "assembly
> language", but this may also be the case with the "classic vm" (I haven't
> look into it, and I'm a beginner with squeak vm).


I am afraid that you may no longer qualify as a beginner :-)

Dave


>
> Anyway the result of the compile for the 32-bit "squeak cog spur" vm is now:
>
> bash-4.4$ find ./squeak.cog.spur-sunos32x86/
> ./squeak.cog.spur-sunos32x86/
> ./squeak.cog.spur-sunos32x86/bin
> ./squeak.cog.spur-sunos32x86/bin/squeak
> ./squeak.cog.spur-sunos32x86/lib
> ./squeak.cog.spur-sunos32x86/lib/squeak
> ./squeak.cog.spur-sunos32x86/lib/squeak/5.0-202003240214-solaris
> ./squeak.cog.spur-sunos32x86/lib/squeak/5.0-202003240214-solaris/vm-display-null.a
> ./squeak.cog.spur-sunos32x86/lib/squeak/5.0-202003240214-solaris/XDisplayControlPlugin.a
> ./squeak.cog.spur-sunos32x86/lib/squeak/5.0-202003240214-solaris/squeak
> ./squeak.cog.spur-sunos32x86/lib/squeak/5.0-202003240214-solaris/vm-sound-OSS.so
> ./squeak.cog.spur-sunos32x86/lib/squeak/5.0-202003240214-solaris/UUIDPlugin.so
> ./squeak.cog.spur-sunos32x86/lib/squeak/5.0-202003240214-solaris/vm-sound-pulse.so
> ./squeak.cog.spur-sunos32x86/lib/squeak/5.0-202003240214-solaris/SqueakFFIPrims.so
> ./squeak.cog.spur-sunos32x86/lib/squeak/5.0-202003240214-solaris/B3DAcceleratorPlugin.so
> ./squeak.cog.spur-sunos32x86/lib/squeak/5.0-202003240214-solaris/UnixOSProcessPlugin.so
> ./squeak.cog.spur-sunos32x86/lib/squeak/5.0-202003240214-solaris/vm-sound-OSS.a
> ./squeak.cog.spur-sunos32x86/lib/squeak/5.0-202003240214-solaris/XDisplayControlPlugin.so
> ./squeak.cog.spur-sunos32x86/lib/squeak/5.0-202003240214-solaris/ImmX11Plugin.a
> ./squeak.cog.spur-sunos32x86/lib/squeak/5.0-202003240214-solaris/UnicodePlugin.a
> ./squeak.cog.spur-sunos32x86/lib/squeak/5.0-202003240214-solaris/LocalePlugin.a
> ./squeak.cog.spur-sunos32x86/lib/squeak/5.0-202003240214-solaris/Squeak3D.so
> ./squeak.cog.spur-sunos32x86/lib/squeak/5.0-202003240214-solaris/UnixOSProcessPlugin.a
> ./squeak.cog.spur-sunos32x86/lib/squeak/5.0-202003240214-solaris/FileAttributesPlugin.a
> ./squeak.cog.spur-sunos32x86/lib/squeak/5.0-202003240214-solaris/vm-sound-null.a
> ./squeak.cog.spur-sunos32x86/lib/squeak/5.0-202003240214-solaris/FileAttributesPlugin.so
> ./squeak.cog.spur-sunos32x86/lib/squeak/5.0-202003240214-solaris/ImmX11Plugin.so
> ./squeak.cog.spur-sunos32x86/lib/squeak/5.0-202003240214-solaris/SqueakFFIPrims.a
> ./squeak.cog.spur-sunos32x86/lib/squeak/5.0-202003240214-solaris/UnicodePlugin.so
> ./squeak.cog.spur-sunos32x86/lib/squeak/5.0-202003240214-solaris/vm-sound-pulse.a
> ./squeak.cog.spur-sunos32x86/lib/squeak/5.0-202003240214-solaris/vm-display-X11.a
> ./squeak.cog.spur-sunos32x86/lib/squeak/5.0-202003240214-solaris/vm-sound-Sun.a
> ./squeak.cog.spur-sunos32x86/lib/squeak/5.0-202003240214-solaris/vm-sound-Sun.so
> ./squeak.cog.spur-sunos32x86/lib/squeak/5.0-202003240214-solaris/B3DAcceleratorPlugin.a
> ./squeak.cog.spur-sunos32x86/lib/squeak/5.0-202003240214-solaris/vm-sound-null.so
> ./squeak.cog.spur-sunos32x86/lib/squeak/5.0-202003240214-solaris/SqueakSSL.so
> ./squeak.cog.spur-sunos32x86/lib/squeak/5.0-202003240214-solaris/Squeak3D.a
> ./squeak.cog.spur-sunos32x86/lib/squeak/5.0-202003240214-solaris/LocalePlugin.so
> ./squeak.cog.spur-sunos32x86/lib/squeak/5.0-202003240214-solaris/vm-display-null.so
> ./squeak.cog.spur-sunos32x86/lib/squeak/5.0-202003240214-solaris/UUIDPlugin.a
> ./squeak.cog.spur-sunos32x86/lib/squeak/5.0-202003240214-solaris/SqueakSSL.a
> ./squeak.cog.spur-sunos32x86/lib/squeak/5.0-202003240214-solaris/vm-display-X11.so
> ./squeak.cog.spur-sunos32x86/squeak
>
>
> with those binaries I'm able to open a 5.2 or 5.3 Squeak image on Solaris.
>
>
>
>
>
>
> --
> Sent from: http://forum.world.st/Squeak-VM-f104410.html
Reply | Threaded
Open this post in threaded view
|

Re: squeak.cog.spur-sunos32x86

stes
 

With beginner, I mean that at least I'm outsider regarding such issues as
"classic vm" versus "opensmalltalk vm" etc.  

It's a little confusing that there are multiple squeak vm's.

Also although I have a working binary now, which seems to be capable of
running an image like:

bash-4.4$ bin/squeak Squeak6.0alpha-19547-32bit.image

the latest 6.0alpha image,  it seems buggy since I suffer from "update"
problems for screen drawing,
when opening a browser for example, I have screen update problems/issues, so
it is just a first attempt of a "port".

In some sense I think the Solaris platform (based on what I saw on the
"classic vm") was always supported in the past, so it is not a "new" port,
it is just making sure it keeps working.

Also I have a message:

bash-4.4$ bin/squeak Squeak5.2-18221-32bit.image      

*pthread_setschedparam failed: Not owner*
This VM uses a separate heartbeat thread to update its internal clock
and handle events.  For best operation, this thread should run at a
higher priority, however the VM was unable to change the priority.

which I have to look into




--
Sent from: http://forum.world.st/Squeak-VM-f104410.html
Reply | Threaded
Open this post in threaded view
|

Re: squeak.cog.spur-sunos32x86

Eliot Miranda-2
In reply to this post by stes
 
Hi Stes,


On Mar 28, 2020, at 10:07 AM, stes <[hidden email]> wrote:


Congrats on building a functional vm!! As discussed can you please create just a build directory, build.sunos32x86, populated with at least build directories for squeak.cog.spur squeak.cog.v3?  You can simply copy build.linux32x86 and change the mvm files.

The OpenSmalltalk-vm site is for source only.  We can get CI servers to build and host binaries.

With beginner, I mean that at least I'm outsider regarding such issues as
"classic vm" versus "opensmalltalk vm" etc.

It's a little confusing that there are multiple squeak vm's.

Mea culpa.

You can read a lot of the rational and history for the evolution to the current Spur 5.x VM/GC/Object Representation in this paper, [1] and on my blog site, mirandabanda.org, as well as by reading the 5.0 release notes in the Welcome workspace. Here is a brief summary.

The first Squeak vm series, as described in the Back To The Future paper [2], is a classic context interpreter, with a bytecode set very close to the blue book [3].  In particular it allocates a Context object in each non-primitive send, has non-reentrant blocks, see [4], and a single linear heap with a slow pointer-reversal GC.  This is the classical vm and in open-Smalltalk and Squeak trunk we use the name V3 to refer to this bytecode set and this object representation.

In 2008 I was taken on by Qwaq, a startup set up by some Squeak principals, notably Andreas Raab, applying Croquet to business communication.  My job was to speed up the Back To The Future VM.  This was accomplished in two stages.

Stage one was a StackInterpreter that used my version of the Deutsch, Schiffman [5] lazy context creation scheme to eliminate context overhead, and introduced a few new bytecodes to provide reentrant blocks (because this yields much better context-to-stack mapping [6]).  In opensmalltalk these are built in directories marked dialect.stack.objrep, eg squeak.stack.v3.

Stage two was a JIT version of the same bytecode set and object representation, see [7][8]. In opensmalltalk these are built in directories marked dialect.cog.objrep, eg squeak.cog.v3.

Squeak migrated to this slightly different object representation and bytecode set in about 2012/13 and was the 4.0 release.  The StackInterpreter VMs are useful when on iPhone where jitting is forbidden for non-Apple applications.

From 2011 until 2018 I worked at Cadence where Newspeak, built above Squeak Smalltalk, was used to implement tools for SoaC phone design.  In 2013 I started working on Spur [9][10][11] which is a new garbage collection and object representation scheme for Smalltalk, including a much more comprehensive support of 64-bits, a segmented heap that can grow and shrink, support for pinning and read-only objects, and much faster become.  I was joined in this by Clément Béra who has, apart from being a fabulous collaborator and friend, designed an incremental compactor for Spur [12] which we hope to put into production in the next (very) few years (it also needs an incremental mark-sweep collector).

In opensmalltalk these are built in directories marked dialect.vmarch.spur, eg squeak.cog.spur.  Spur provides about a -40% speedup on average (code takes 60% of the time it takes on a Cog V3 vm) but some codes are much faster.  Eg Spur supports immediate characters and do widestring access is much faster.  Squeak migrated to Spur in 2016 ish and is the 5.x series.

In parallel Clément and I collaborate(d) on an adaptive optimizer to further improve performance, I hope by at least -66.6%.  The architecture is called Sista, for Speculative Inlining Smalltalk Architecture, and the image-level optimiser is called Scorch.  See [13].  Clément produced an alpha 32-bit release for Pharo.  Sista is currently under development.  See [14]. This is the subject of Clément’s PhD [15].

In opensmalltalk these are built in directories marked dialect.sista.objrep, eg squeak.sista.spur

HTH

Also although I have a working binary now, which seems to be capable of
running an image like:

bash-4.4$ bin/squeak Squeak6.0alpha-19547-32bit.image

the latest 6.0alpha image,  it seems buggy since I suffer from "update"
problems for screen drawing,
when opening a browser for example, I have screen update problems/issues, so
it is just a first attempt of a "port".

In some sense I think the Solaris platform (based on what I saw on the
"classic vm") was always supported in the past, so it is not a "new" port,
it is just making sure it keeps working.

Also I have a message:

bash-4.4$ bin/squeak Squeak5.2-18221-32bit.image      

*pthread_setschedparam failed: Not owner*
This VM uses a separate heartbeat thread to update its internal clock
and handle events.  For best operation, this thread should run at a
higher priority, however the VM was unable to change the priority.

which I have to look into

The issue is that the heartbeat thread, whose job it is to periodically get the vm to exit JITted machine code to poll for input and timer events, must run at a higher priority than the main vm thread.  If it does not then it won’t interrupt the main thread at regular intervals.  If Solaris doesn’t allow user processes to create higher priority threads (which, IIRC, was also the case with pre 2.16 Linux kernels), then a barely acceptable alternative is to use an ITIMER heartbeat.  This is not nice to use as the ITIMER signal can interrupt FFI calls etc.


References

1. Eliot Miranda, Clément Béra, Elisa Gonzalez Boix, and Dan Ingalls. “Two Decades of Smalltalk VM Development: Live VM Development Through Simulation Tools.” In Proceedings of the 10th ACM SIGPLAN International Workshop on Virtual Machines and Intermediate Languages, 57–66. VMIL 2018. New York, NY, USA: ACM, 2018.http://doi.acm.org/10.1145/3281287.3281295.

2. Dan Ingalls, Ted Kaehler, John Maloney, Scott Wallace, and Alan Kay. “Back to The Future: The Story of Squeak, A Practical Smalltalk Written in Itself.” In Proceedings of the 12th ACM SIGPLAN Conference on Object-Oriented Programming (OOPSLA) 1997, 318–26, 1997.https://doi.org/10.1145/263698.263754.



5. Deutsch schiffmann







12. Lazy pointer update for low heap compaction pause times
  • October 2019
  • Conference: the 15th ACM SIGPLAN International Symposium

13. Clément Béra, Eliot Miranda, Tim Felgentreff, Marcus Denker, and Stéphane Ducasse. “Sista: Saving Optimized Code in Snapshots for Fast Start-Up.” In Proceedings of the 14th International Conference on Managed Languages and Runtimes, 1–11. ManLang 2017. New York, NY, USA: ACM, 2017.http://doi.acm.org/10.1145/3132190.3132201.

14. http://forum.world.st/how-can-I-build-a-sista-spur-64-vm-tt5113715.html#a5113828

15. Sista: a Metacircular Architdcture for Runtime Optimisation Persistence https://hal.inria.fr/tel-01634137/document





--
Sent from: http://forum.world.st/Squeak-VM-f104410.html
Reply | Threaded
Open this post in threaded view
|

Re: squeak.cog.spur-sunos32x86

stes
 

Thanks for the clarification.

This is of course a lot of information, at this moment I'm not sure I'm able
to digest all of this,
or to realise what it all means.

But I'm just stating that I'm feeling a little bit lost at the moment in all
of the various "variants",
but it'll make sense ...


At this moment I didn't look into the build64 of the 64 bit vm's  but that
is something that I can do now, to compare the vm's further.



--
Sent from: http://forum.world.st/Squeak-VM-f104410.html