<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div dir="ltr"><meta http-equiv="content-type" content="text/html; charset=utf-8">Hi Stes,<br><div dir="ltr"><br></div><div dir="ltr"><br><blockquote type="cite">On Mar 28, 2020, at 10:07 AM, stes <stes@telenet.be> wrote:<br><br></blockquote><br></div><div dir="ltr">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.</div><div dir="ltr"><br></div><div dir="ltr">The OpenSmalltalk-vm site is for source only.  We can get CI servers to build and host binaries.</div><br><div dir="ltr">With beginner, I mean that at least I'm outsider regarding such issues as</div><blockquote type="cite"><div dir="ltr"><span>"classic vm" versus "opensmalltalk vm" etc.</span></div></blockquote><blockquote type="cite"><div dir="ltr"><br>It's a little confusing that there are multiple squeak vm's.</div></blockquote><div dir="ltr"><br></div>Mea culpa.<br><div><br></div>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.<div><br></div><div>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.</div><div><br></div><div>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.</div><div><br></div><div>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.</div><div><br></div><div>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.</div><div><br></div><div>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.</div><div><br></div><div>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).</div><div><br></div><div>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.</div><div><br></div><div>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].<br><div><br></div><div>In opensmalltalk these are built in directories marked dialect.sista.objrep, eg squeak.sista.spur</div><div><br></div><div>HTH</div><div><br><blockquote type="cite"><div dir="ltr"><span>Also although I have a working binary now, which seems to be capable of</span><br><span>running an image like:</span><br><span></span><br><span>bash-4.4$ bin/squeak Squeak6.0alpha-19547-32bit.image </span><br><span></span><br><span>the latest 6.0alpha image,  it seems buggy since I suffer from "update"</span><br><span>problems for screen drawing,</span><br><span>when opening a browser for example, I have screen update problems/issues, so</span><br><span>it is just a first attempt of a "port".</span><br><span></span><br><span>In some sense I think the Solaris platform (based on what I saw on the</span><br><span>"classic vm") was always supported in the past, so it is not a "new" port, </span><br><span>it is just making sure it keeps working.</span><br><span></span><br><span>Also I have a message:</span><br><span></span><br><span>bash-4.4$ bin/squeak Squeak5.2-18221-32bit.image      </span><br><span></span><br><span>*pthread_setschedparam failed: Not owner*</span><br><span>This VM uses a separate heartbeat thread to update its internal clock</span><br><span>and handle events.  For best operation, this thread should run at a</span><br><span>higher priority, however the VM was unable to change the priority. </span><br><span></span><br><span>which I have to look into</span><br></div></blockquote><div><br></div>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.<br><div><br></div><div><br></div><div>References</div><div><br></div>1. <span id="miranda_2018_tds" style="font-size: 16px; box-sizing: border-box; caret-color: rgb(51, 51, 51); color: rgb(51, 51, 51); font-family: Lato, Helvetica, Arial, sans-serif; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); -webkit-text-size-adjust: 100%;">Eliot Miranda, Clément Béra, Elisa Gonzalez Boix, and Dan Ingalls. <b style="box-sizing: border-box;">“Two Decades of Smalltalk VM Development: Live VM Development Through Simulation Tools.”</b> In <i style="box-sizing: border-box;">Proceedings of the 10th ACM SIGPLAN International Workshop on Virtual Machines and Intermediate Languages</i>, 57–66. VMIL 2018. New York, NY, USA: ACM, 2018.</span><span style="font-size: 16px; caret-color: rgb(51, 51, 51); color: rgb(51, 51, 51); font-family: Lato, Helvetica, Arial, sans-serif; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); -webkit-text-size-adjust: 100%; background-color: rgb(255, 255, 255);"></span><a href="http://doi.acm.org/10.1145/3281287.3281295" target="_blank" style="font-size: 16px; box-sizing: border-box; color: rgb(27, 60, 129); text-decoration: none; font-family: Lato, Helvetica, Arial, sans-serif; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); -webkit-text-size-adjust: 100%;">http://doi.acm.org/10.1145/3281287.3281295</a><span style="font-size: 16px; caret-color: rgb(51, 51, 51); color: rgb(51, 51, 51); font-family: Lato, Helvetica, Arial, sans-serif; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); -webkit-text-size-adjust: 100%; background-color: rgb(255, 255, 255);">.</span></div><div><span style="font-size: 16px; caret-color: rgb(51, 51, 51); color: rgb(51, 51, 51); font-family: Lato, Helvetica, Arial, sans-serif; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); -webkit-text-size-adjust: 100%; background-color: rgb(255, 255, 255);"><br></span></div><div><span style="font-size: 16px; caret-color: rgb(51, 51, 51); color: rgb(51, 51, 51); font-family: Lato, Helvetica, Arial, sans-serif; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); -webkit-text-size-adjust: 100%; background-color: rgb(255, 255, 255);">2. </span><span id="ingalls_back_1997" style="font-size: 16px; box-sizing: border-box; caret-color: rgb(51, 51, 51); color: rgb(51, 51, 51); font-family: Lato, Helvetica, Arial, sans-serif; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); -webkit-text-size-adjust: 100%;">Dan Ingalls, Ted Kaehler, John Maloney, Scott Wallace, and Alan Kay. <b style="box-sizing: border-box;">“Back to The Future: The Story of Squeak, A Practical Smalltalk Written in Itself.”</b> In <i style="box-sizing: border-box;">Proceedings of the 12th ACM SIGPLAN Conference on Object-Oriented Programming (OOPSLA) 1997</i>, 318–26, 1997.</span><span style="font-size: 16px; caret-color: rgb(51, 51, 51); color: rgb(51, 51, 51); font-family: Lato, Helvetica, Arial, sans-serif; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); -webkit-text-size-adjust: 100%; background-color: rgb(255, 255, 255);"></span><a href="https://doi.org/10.1145/263698.263754" target="_blank" style="font-size: 16px; box-sizing: border-box; color: rgb(27, 60, 129); text-decoration: none; font-family: Lato, Helvetica, Arial, sans-serif; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); -webkit-text-size-adjust: 100%;">https://doi.org/10.1145/263698.263754</a><span style="font-size: 16px; caret-color: rgb(51, 51, 51); color: rgb(51, 51, 51); font-family: Lato, Helvetica, Arial, sans-serif; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); -webkit-text-size-adjust: 100%; background-color: rgb(255, 255, 255);">.</span></div><div><span style="font-size: 16px; caret-color: rgb(51, 51, 51); color: rgb(51, 51, 51); font-family: Lato, Helvetica, Arial, sans-serif; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); -webkit-text-size-adjust: 100%; background-color: rgb(255, 255, 255);"><br></span></div><div><span style="font-size: 16px; caret-color: rgb(51, 51, 51); color: rgb(51, 51, 51); font-family: Lato, Helvetica, Arial, sans-serif; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); -webkit-text-size-adjust: 100%; background-color: rgb(255, 255, 255);">3. Part 4 of </span><a href="http://stephane.ducasse.free.fr/FreeBooks/BlueBook/Bluebook.pdf">http://stephane.ducasse.free.fr/FreeBooks/BlueBook/Bluebook.pdf</a></div><div><span style="font-size: 16px; caret-color: rgb(51, 51, 51); color: rgb(51, 51, 51); font-family: Lato, Helvetica, Arial, sans-serif; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); -webkit-text-size-adjust: 100%; background-color: rgb(255, 255, 255);"><br></span></div><div><span style="font-size: 16px; caret-color: rgb(51, 51, 51); color: rgb(51, 51, 51); font-family: Lato, Helvetica, Arial, sans-serif; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); -webkit-text-size-adjust: 100%; background-color: rgb(255, 255, 255);">4. </span><a href="http://www.mirandabanda.org/cogblog/2008/06/07/closures-part-i/">http://www.mirandabanda.org/cogblog/2008/06/07/closures-part-i/</a></div><div><br></div><div>5. Deutsch schiffmann</div><div><br></div><div>6. <a href="http://www.mirandabanda.org/cogblog/2009/01/14/under-cover-contexts-and-the-big-frame-up/">http://www.mirandabanda.org/cogblog/2009/01/14/under-cover-contexts-and-the-big-frame-up/</a></div><div><br></div><div>7. <a href="http://www.mirandabanda.org/cogblog/2011/03/01/build-me-a-jit-as-fast-as-you-can/">http://www.mirandabanda.org/cogblog/2011/03/01/build-me-a-jit-as-fast-as-you-can/</a></div><div><br></div><div>8. <a href="http://www.mirandabanda.org/cogblog/2011/03/04/an-arranged-marriage/">http://www.mirandabanda.org/cogblog/2011/03/04/an-arranged-marriage/</a></div><div><br></div><div>9. <a href="http://www.mirandabanda.org/cogblog/2013/09/05/a-spur-gear-for-cog/"> http://www.mirandabanda.org/cogblog/2013/09/05/a-spur-gear-for-cog/</a></div><div><br></div><div>10. <a href="http://www.mirandabanda.org/cogblog/2013/09/13/lazy-become-and-a-partial-read-barrier/">http://www.mirandabanda.org/cogblog/2013/09/13/lazy-become-and-a-partial-read-barrier/</a></div><div><br></div><div>11. <a href="http://www.mirandabanda.org/cogblog/2014/02/08/primitives-and-the-partial-read-barrier/">http://www.mirandabanda.org/cogblog/2014/02/08/primitives-and-the-partial-read-barrier/</a></div><div><br></div><div>12.<span style="caret-color: rgb(17, 17, 17); color: rgb(17, 17, 17); font-family: Roboto, Arial, sans-serif; font-size: 1.1874995rem; -webkit-text-size-adjust: 100%;"> Lazy pointer update for low heap compaction pause times</span></div><div class="content-page-header__meta" style="margin-bottom: 15px; caret-color: rgb(17, 17, 17); color: rgb(17, 17, 17); font-family: Roboto, Arial, sans-serif; font-size: 12px; -webkit-text-size-adjust: 100%;"><div class="research-detail-meta"><div class="nova-e-text nova-e-text--size-m nova-e-text--family-sans-serif nova-e-text--spacing-xxs nova-e-text--color-grey-600" style="border: 0px; text-transform: inherit; margin: 0px 0px 5px; padding: 0px; color: rgb(119, 119, 119); font-size: 0.875rem; line-height: 1.3;"><ul class="nova-e-list nova-e-list--size-m nova-e-list--type-inline nova-e-list--spacing-none" style="list-style: none; margin: 0px; padding: 0px; color: inherit; font-size: 0.875rem; line-height: 1;"><li class="nova-e-list__item" style="line-height: 1.3; display: inline;">October 2019</li></ul></div><div class="nova-e-text nova-e-text--size-m nova-e-text--family-sans-serif nova-e-text--spacing-xxs nova-e-text--color-grey-600" style="border: 0px; text-transform: inherit; margin: 0px 0px 5px; padding: 0px; color: rgb(119, 119, 119); font-size: 0.875rem; line-height: 1.3;"><ul class="nova-e-list nova-e-list--size-m nova-e-list--type-inline nova-e-list--spacing-none research-detail-meta__item-list" style="list-style: none; margin: 0px; padding: 0px; color: inherit; font-size: 0.875rem; line-height: 1;"><li class="nova-e-list__item" style="line-height: 1.3; margin-bottom: 0.5em; display: inline;">DOI: </li><li class="nova-e-list__item" style="line-height: 1.3; display: inline;"><a class="nova-e-link nova-e-link--color-inherit nova-e-link--theme-decorated" href="https://www.researchgate.net/deref/http%3A%2F%2Fdx.doi.org%2F10.1145%2F3359619.3359741?_sg%5B0%5D=Ssvp0dM_DvbtD2EshodiGBSAUPizq9rdZ3Cpb7DJdVEN_j40FMoHrX7balhAAQzesQH7Z6iuBooOTfPf1ppVUOcBzQ.MkWPRkAn5icQd8jmwxO__3_JczwzveACtkYnGrYWC5C6CUsHZyDkHaDbkzXZmpsr-qT0_BnF-bnkRPU-puDniA" style="color: inherit; cursor: pointer; outline: none; padding: 0px; margin: 0px; font-size: inherit; font-family: inherit; border: 0px; background-image: none; text-align: inherit; display: inline;">10.1145/3359619.3359741</a></li></ul></div><div class="nova-e-text nova-e-text--size-m nova-e-text--family-sans-serif nova-e-text--spacing-xxs nova-e-text--color-grey-700" style="border: 0px; text-transform: inherit; margin: 0px 0px 5px; padding: 0px; color: rgb(85, 85, 85); font-size: 0.875rem; line-height: 1.3;"><ul class="nova-e-list nova-e-list--size-m nova-e-list--type-inline nova-e-list--spacing-none" style="list-style: none; margin: 0px; padding: 0px; color: inherit; font-size: 0.875rem; line-height: 1;"><li class="nova-e-list__item" style="line-height: 1.3; display: inline;">Conference: the 15th ACM SIGPLAN International Symposium</li></ul></div></div></div><div><br><span id="Bera:2017:SSO:3132190.3132201" style="font-size: 16px; box-sizing: border-box; caret-color: rgb(51, 51, 51); color: rgb(51, 51, 51); font-family: Lato, Helvetica, Arial, sans-serif; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); -webkit-text-size-adjust: 100%;">13. Clément Béra, Eliot Miranda, Tim Felgentreff, Marcus Denker, and Stéphane Ducasse. <b style="box-sizing: border-box;">“Sista: Saving Optimized Code in Snapshots for Fast Start-Up.”</b> In <i style="box-sizing: border-box;">Proceedings of the 14th International Conference on Managed Languages and Runtimes</i>, 1–11. ManLang 2017. New York, NY, USA: ACM, 2017.</span><span style="font-size: 16px; caret-color: rgb(51, 51, 51); color: rgb(51, 51, 51); font-family: Lato, Helvetica, Arial, sans-serif; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); -webkit-text-size-adjust: 100%; background-color: rgb(255, 255, 255);"></span><a href="http://doi.acm.org/10.1145/3132190.3132201" target="_blank" style="font-size: 16px; box-sizing: border-box; color: rgb(27, 60, 129); text-decoration: none; font-family: Lato, Helvetica, Arial, sans-serif; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); -webkit-text-size-adjust: 100%;">http://doi.acm.org/10.1145/3132190.3132201</a><span style="font-size: 16px; caret-color: rgb(51, 51, 51); color: rgb(51, 51, 51); font-family: Lato, Helvetica, Arial, sans-serif; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); -webkit-text-size-adjust: 100%; background-color: rgb(255, 255, 255);">.</span><br><br>14. <a href="http://forum.world.st/how-can-I-build-a-sista-spur-64-vm-tt5113715.html#a5113828">http://forum.world.st/how-can-I-build-a-sista-spur-64-vm-tt5113715.html#a5113828</a></div><div><br></div><div>15. Sista: a Metacircular Architdcture for Runtime Optimisation Persistence <a href="https://hal.inria.fr/tel-01634137/document">https://hal.inria.fr/tel-01634137/document</a></div><div><br><blockquote type="cite"><div dir="ltr"><span></span><br><span></span><br><span></span><br><span></span><br><span>--</span><br><span>Sent from: http://forum.world.st/Squeak-VM-f104410.html</span><br></div></blockquote></div></div></div></body></html>