<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Aug 20, 2015 at 11:37 AM, Tobias Pape <span dir="ltr">&lt;<a href="mailto:Das.Linux@gmx.de" target="_blank">Das.Linux@gmx.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> <br>Hi all,<br>
<br>
On 19.08.2015, at 23:09, Eliot Miranda &lt;<a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a>&gt; wrote:<br>
<br>
&gt; Hi All, but especially Tobias,<br>
<br>
just for reference, I only had time to skim this mail.<br>
I&#39;ll work through it more in-depth in September (vacation upcoming, sorry).<br>
<br>
Also, I like Fuel as a way forward. I&#39;d also like to deprecate DataStreams in<br>
favor of Fuel[1], I also had a prototype of Fuel-based Monticello packages<br>
which loaded much faster for large packages…<br>
<br></blockquote><div><br></div><div>Is this similar to Tanker in the way that classes and methods are binary serialized with Fuel? (no compiling)</div><div>Or you just used Fuel instead of the current usage of MCDataStream? If this is the case, then you would still be compiling at load time etc. We already did this experiment long ago and we didn&#39;t find a significant speedup. </div><div><br></div><div>What were your findings?</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Best regards<br>
        -Tobias<br>
<br>
<br>
[1]: PS: Hi Pharo folks, MCDataStream will break with Spur,<br>
     Have a look at System-topa.741 unil System-topa.473 in the<br>
     Squeak trunk or the attached change set, YMMV tho.<br>
<br></blockquote><div><br></div><div>Thanks, </div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br><br>
<br>
<br>
&gt;<br>
&gt;     as we know, ImageSegments are broken in Spur. They work occasionally, but when stressed the VM ends up crashing.  The fundamental issue is that the ImageSegment code makes assumptions about object ordering that Spur violates.  For example, here&#39;s ImageSegment&#39;s install:<br>
&gt;<br>
&gt; install<br>
&gt;       &quot;This operation retrieves the segment if necessary from file storage, installs it in memory, and replaces (using become:) all the root stubs with the reconstructed roots of the segment.&quot;<br>
&gt;<br>
&gt;       | newRoots |<br>
&gt;       state = #onFile ifTrue: [self readFromFile].<br>
&gt;       state = #onFileWithSymbols ifTrue: [self readFromFileWithSymbols.<br>
&gt;               endMarker := segment nextObject.        &quot;for enumeration of objects&quot;<br>
&gt;               endMarker == 0 ifTrue: [endMarker := &#39;End&#39; clone]].<br>
&gt;       (state = #active) | (state = #imported) ifFalse: [self errorWrongState].<br>
&gt;       newRoots := self loadSegmentFrom: segment outPointers: outPointers.<br>
&gt;       state = #imported<br>
&gt;               ifTrue: [&quot;just came in from exported file&quot;<br>
&gt;                       arrayOfRoots := newRoots]<br>
&gt;               ifFalse: [<br>
&gt;                       arrayOfRoots elementsForwardIdentityTo: newRoots].<br>
&gt;       state := #inactive.<br>
&gt;       Beeper beepPrimitive<br>
&gt;<br>
&gt; So before the image segment bytes (the segment inst var) is loaded, the object after it is assigned to endMarker, and if there isn&#39;t an object after segment, a new object (&#39;End&#39; clone) is assigned to endMarker.<br>
&gt;<br>
&gt; This makes the assumption that objects are allocated in a strict order, and therefore endMarker will always be the object after segment.<br>
&gt;<br>
&gt; Loading the segment via &quot;newRoots := self loadSegmentFrom: segment outPointers: outPointers&quot; then turns segment into a zero-length WordArray and its contents into the objects loaded by the segment.  Therefore, in the V3 system, the objects loaded from segment can be enumerated starting at segment nextObject and repeating until endMarker is found:<br>
&gt;<br>
&gt; allObjectsDo: aBlock<br>
&gt;       &quot;Enumerate all objects that came from this segment.  NOTE this assumes that the segment was created (and extracted).  After the segment has been installed (install), this method allows you to enumerate its objects.&quot;<br>
&gt;       | obj |<br>
&gt;<br>
&gt;       endMarker == nil ifTrue: [<br>
&gt;               ^ self error: &#39;Just extract and install, don&#39;&#39;t writeToFile:&#39;].<br>
&gt;       segment size ~= 1 ifTrue: [<br>
&gt;               ^ self error: &#39;Vestigial segment size must be 1 (version word)&#39;].<br>
&gt;<br>
&gt;       obj := segment nextObject.  &quot;Start with the next object after the vestigial header&quot;<br>
&gt;       [obj == endMarker] whileFalse:  &quot;Stop at the next object after the full segment&quot;<br>
&gt;               [aBlock value: obj.<br>
&gt;               obj := obj nextObject].  &quot;Step through the objects installed from the segment.&quot;<br>
&gt;<br>
&gt; Now, as written, this just won&#39;t work in Spur.<br>
&gt;<br>
&gt; a) the only place where there is any kind of stable order to objects is in oldSpace, so segment /has/ to be forced to old space to have any chance of its objects being in order when it gets converted from bytes to objects.<br>
&gt;<br>
&gt; b) &#39;End&#39; clone will be in newSpace and so endMarker isn&#39;t reliable unless it was obtained by segment nextObject when segment was already in oldSpace.<br>
&gt;<br>
&gt; So it is perhaps possible to fix ImageSegments in Spur by forcing segment to oldSpace and being more careful with endMarker.  But I think there is a better way.<br>
&gt;<br>
&gt; If the set of objects the segment contains can be obtained some how then this set can be simply enumerated, not depending on nextObject.  The primitive has to answer the array of roots, so its result can&#39;t be changed to be the entire array.  But segment could be becomed into an Array of all the objects in segment prior to it being loaded, in which case the above would become<br>
&gt;<br>
&gt;<br>
&gt; install<br>
&gt;       &quot;This operation retrieves the segment if necessary from file storage, installs it in memory, and replaces (using become:) all the root stubs with the reconstructed roots of the segment.&quot;<br>
&gt;<br>
&gt;       | newRoots |<br>
&gt;       state = #onFile ifTrue: [self readFromFile].<br>
&gt;       state = #onFileWithSymbols ifTrue:<br>
&gt;               [self readFromFileWithSymbols].<br>
&gt;       (state = #active) | (state = #imported) ifFalse: [self errorWrongState].<br>
&gt;       newRoots := self loadSegmentFrom: segment outPointers: outPointers.<br>
&gt;       state = #imported<br>
&gt;               ifTrue: &quot;just came in from exported file&quot;<br>
&gt;                       [arrayOfRoots := newRoots]<br>
&gt;               ifFalse:<br>
&gt;                       [arrayOfRoots elementsForwardIdentityTo: newRoots].<br>
&gt;       state := #inactive.<br>
&gt;       Beeper beepPrimitive<br>
&gt;<br>
&gt; allObjectsDo: aBlock<br>
&gt;       &quot;Enumerate all objects that came from this segment.  NOTE this assumes that the segment was created (and extracted).  After the segment has been installed (install), this method allows you to enumerate its objects.&quot;<br>
&gt;       | obj |<br>
&gt;<br>
&gt;       segment isArray ifFalse:<br>
&gt;               [^ self error: &#39;Segment hasn&#39;&#39;t been loaded?&#39;].<br>
&gt;<br>
&gt;       segment do: aBlock<br>
&gt;<br>
&gt; and the endMarker instVar would be deleted.<br>
&gt;<br>
&gt; I am willing and ready to modify the primitive to convert the segment correctly.  Who will volunteer to rewrite the image-level ImageSegment code to use the new primitive?<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; On Wed, Aug 12, 2015 at 10:40 PM, Eliot Miranda &lt;<a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a>&gt; wrote:<br>
&gt; Hi Tobias,<br>
&gt;<br>
&gt; On Wed, Aug 12, 2015 at 10:18 PM, Tobias Pape &lt;<a href="mailto:Das.Linux@gmx.de">Das.Linux@gmx.de</a>&gt; wrote:<br>
&gt; Hi all<br>
&gt; On 13.08.2015, at 02:15, Eliot Miranda &lt;<a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt; &gt; Hi Tobias,<br>
&gt; &gt;<br>
&gt; &gt;    forget that. I found it.  THis right?<br>
&gt; &gt;<br>
&gt; &gt; Trunk test suite for Spur<br>
&gt; &gt; Using existing cogspur r.3410<br>
&gt; &gt; cp -r /var/lib/jenkins/workspace/Trunk/default/target/cogspur.r3410 /tmp/d20150812-28620-etbikj<br>
&gt; &gt;   image test suite<br>
&gt; &gt; VM: /tmp/d20150812-28620-etbikj/cogspur.r3410/cogspurlinuxht/bin/squeak<br>
&gt; &gt; /tmp/d20150812-28620-etbikj/cogspur.r3410/cogspurlinuxht/bin/squeak -version<br>
&gt; &gt; /var/lib/jenkins/workspace/Trunk/default/<a href="http://tests.st" rel="noreferrer" target="_blank">tests.st</a><br>
&gt; &gt; spawning command 0 with timeout 1800 seconds: &quot;/tmp/d20150812-28620-etbikj/cogspur.r3410/cogspurlinuxht/bin/squeak&quot; &quot;-vm-sound-null&quot; &quot;-vm-display-null&quot; &quot;/var/lib/jenkins/workspace/Trunk/default/target/SpurPostTestTrunkImage.image&quot; &quot;../<a href="http://tests.st" rel="noreferrer" target="_blank">tests.st</a>&quot;<br>
&gt; &gt; (Command started with PID 28643)<br>
&gt; &gt; 2015-08-12T23:31:48.17+01:00: Loading Hudson build tools... from /var/lib/jenkins/workspace/Trunk/default/target/HudsonBuildTools.st<br>
&gt; &gt; 2015-08-12T23:31:48.388+01:00: Running tests...<br>
&gt; &gt; setsockopt: Protocol not available<br>
&gt; &gt; setsockopt: Protocol not available<br>
&gt; &gt; 28646:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:s23_clnt.c:612:<br>
&gt; &gt;<br>
&gt; &gt; Recursive not understood error encountered<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; I bet this is ImageSegment related.<br>
&gt;<br>
&gt; It sure is.<br>
&gt;<br>
&gt;         BitmapStreamTests&gt;testMatrixTransform2x3WithImageSegment<br>
&gt; sends<br>
&gt;         BitmapStreamTests&gt;validateImageSegment<br>
&gt;<br>
&gt;  Basically the ImageSegment code has been working in Spur on a hope and a prayer.  The code assumes objects are allocated in chronological order and that this order is preserved, not so with Spur.  So post image segment loading someObject/nextObject is used to enumerate the objects loaded.  This can&#39;t work reliably in Spur.  I *think* (ok I hope) that I&#39;ve implemented the segment load primitive in Spur to answer an Array of the objects loaded, so that these can be explicitly enumerated.<br>
&gt;<br>
&gt; So the job is a) to check that I have indeed implemented the primitive to do this and b) to rewrite the image segment loading code in the light of this.<br>
&gt;<br>
&gt; David, this is an example of something that isn&#39;t back portable and should not be back-ported.<br>
&gt;<br>
&gt; The most strange thing is that I cannot reproduce this on my Mac…<br>
&gt; There the test does not crash the image…<br>
&gt;<br>
&gt; Well then it may be a signed/unsigned bug in image loading instead.  On linux the image typically gets loaded quite high in the address space and so a good portion of the heap ends up above 0x7FFFFFFF, or negative territory if misinterpreted as signed integers.  On Mac and Windows the image tends to get loaded quite low and so has to be pretty big to fall foul of signedness issues.<br>
&gt;<br>
&gt;<br>
&gt; Busy right now but will check tomorrow.<br>
&gt;<br>
&gt;<br>
&gt; Best regards<br>
&gt;         -Tobias<br>
&gt;<br>
&gt;<br>
&gt; &gt;<br>
&gt; &gt; On Wed, Aug 12, 2015 at 5:11 PM, Eliot Miranda &lt;<a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a>&gt; wrote:<br>
&gt; &gt; Hi Tobias,<br>
&gt; &gt;<br>
&gt; &gt; On Wed, Aug 12, 2015 at 12:49 PM, Tobias Pape &lt;<a href="mailto:Das.Linux@gmx.de">Das.Linux@gmx.de</a>&gt; wrote:<br>
&gt; &gt;<br>
&gt; &gt; On 12.08.2015, at 20:55, Eliot Miranda &lt;<a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a>&gt; wrote:<br>
&gt; &gt;<br>
&gt; &gt; &gt; Hi All,<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;     Fabio&#39;s kindly done most of the changes.  But some questions remain for more general discussion.  See below.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Fabio,  thanks so much for doing this, and so quickly!<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; On Tue, Aug 11, 2015 at 8:51 PM, Eliot Miranda &lt;<a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a>&gt; wrote:<br>
&gt; &gt; &gt; Hi All,<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;     who will update <a href="http://squeak.org/downloads/" rel="noreferrer" target="_blank">http://squeak.org/downloads/</a> to include the 5.0 release?<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; a) I suggest that the 5.0 all-in-one have a line in the left-hand table that includes the 4.6 release and that it precede the 4.6 release in the list.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Done.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; b) the Trunk link points to TrunkImage.zip which contains a non-Spur image.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; So this is the biggie.  What should we do?<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; - add a Trunk 5.0 build with a different link?  (Noooooo)<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; - change  <a href="http://build.squeak.org/job/SqueakTrunk" rel="noreferrer" target="_blank">http://build.squeak.org/job/SqueakTrunk</a> to build what it says (Yessss please, who can do this?)<br>
&gt; &gt;<br>
&gt; &gt; Done: <a href="http://build.squeak.org/job/Trunk/" rel="noreferrer" target="_blank">build.squeak.org/job/Trunk/</a><br>
&gt; &gt; But as I said several times, Spur/trunk test just crash for month…<br>
&gt; &gt;<br>
&gt; &gt; can you point me to the crash?  I&#39;m looking at <a href="http://build.squeak.org/job/Trunk/default/lastBuild/#showFailuresLink" rel="noreferrer" target="_blank">http://build.squeak.org/job/Trunk/default/lastBuild/#showFailuresLink</a> and see 8 test failures but no crash.<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; - add a Squeak 4.6 build job?  Is that even worth it any more considering 4.6 is released and stable?  If it is then what should it build?  David?<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; c) Spur VMs need to be linked to by an added line in the Virtual Machines list.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Not applicable.  the VM links point to the root of my site so they effectively point to both old and Spur VMs.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; d) Spur imagers need to be included in the Image and Changes list under Custom Installation<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Done.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; e) The SqueakV50.sources file also needs to be included in the Current Sources list.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Done.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; f) we could start a History list for the 5.0 line<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; This is probably quite a big reorg on the page and not urgent.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; So there are a few things to fix before 5.0 is freely downloadable.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; On Tue, Aug 11, 2015 at 8:23 PM, Chris Muller &lt;<a href="mailto:ma.chris.m@gmail.com">ma.chris.m@gmail.com</a>&gt; wrote:<br>
&gt; &gt; &gt; In the 17 months since Squeak 4.5 was released, a huge development<br>
&gt; &gt; &gt; effort took place to create the next generation virtual-machine for<br>
&gt; &gt; &gt; the Squeak / Pharo / Newspeak family of programming systems.  Squeak<br>
&gt; &gt; &gt; is the modern incarnation of the Smalltalk-80 programming environment<br>
&gt; &gt; &gt; originally developed at the Xerox PARC.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; &quot;Squeak 5&quot; introduces this new VM and associated new memory model,<br>
&gt; &gt; &gt; collectively referred to as &quot;Spur&quot;.  Presented [1] by Eliot Miranda<br>
&gt; &gt; &gt; and Clément Béra at the 2015 International Symposium on Memory<br>
&gt; &gt; &gt; Management, this new VM affords Squeak applications a significant<br>
&gt; &gt; &gt; boost in performance and memory management.  Among other<br>
&gt; &gt; &gt; optimizations, the #become operation no longer requires a memory scan.<br>
&gt; &gt; &gt; Object pinning and ephemerons are also now supported.  The release<br>
&gt; &gt; &gt; notes [2] provide more details.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; The new memory model requires a new image file format.  Although this<br>
&gt; &gt; &gt; new format results in about a 15% increased memory requirement for the<br>
&gt; &gt; &gt; same number of 4.x objects, a new segmented heap allows memory to be<br>
&gt; &gt; &gt; given back to the OS when its no longer needed, a great benefit for<br>
&gt; &gt; &gt; application servers.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; As forward compatibility is as important to the Squeak community as<br>
&gt; &gt; &gt; backward compatibility, Squeak 5 is delivers an image with identical<br>
&gt; &gt; &gt; content as the recent 4.6 release.  Although this new Squeak 5 VM<br>
&gt; &gt; &gt; cannot open images saved under the prior 4.x Cog format, objects and<br>
&gt; &gt; &gt; code can be easily exported from the 4.x image and then imported into<br>
&gt; &gt; &gt; Squeak 5.  Applications whose code runs strictly above the Smalltalk<br>
&gt; &gt; &gt; meta layer will prove remarkably compatible with the new format, most<br>
&gt; &gt; &gt; applications will require no changes whatsotever.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Squeak 5 is the result of monumental effort by a tiny group of very<br>
&gt; &gt; &gt; talented people, but its also just the beginning of yet a new effort;<br>
&gt; &gt; &gt; Spur is just a stepping stone to a more ambitious goals planned over<br>
&gt; &gt; &gt; the next five years.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; [1] -- A Partial Read Barrier for Efficient Support of Live<br>
&gt; &gt; &gt; Object-oriented Programming<br>
&gt; &gt; &gt; <a href="http://conf.researchr.org/event/ismm-2015/ismm-2015-papers-a-partial-read-barrier-for-efficient-support-of-live-object-oriented-programming" rel="noreferrer" target="_blank">http://conf.researchr.org/event/ismm-2015/ismm-2015-papers-a-partial-read-barrier-for-efficient-support-of-live-object-oriented-programming</a><br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; [2] -- Squeak 5 Release Notes<br>
&gt; &gt; &gt; <a href="http://wiki.squeak.org/squeak/6207" rel="noreferrer" target="_blank">http://wiki.squeak.org/squeak/6207</a><br>
<br>
<br>
<br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Mariano<br><a href="http://marianopeck.wordpress.com" target="_blank">http://marianopeck.wordpress.com</a><br></div>
</div></div>