[Vm-dev] [squeak-dev] Apple starting to alert users that it will end 32-bit app support on the Mac

tim Rowledge tim at rowledge.org
Thu Apr 12 18:50:38 UTC 2018



> On 12-04-2018, at 9:45 AM, Eliot Miranda <eliot.miranda at gmail.com> wrote:
> 
> So the process in going from 32 to 64 bits is
> - load the 32-bit image into a 32-bit simulator
> - clone all the objects that are preserved in a 64-bit simulator, creating a map
> - pass through the 32-bit objects, updating the corresponding slot in the 64-bit simulator with the object at the map
> - save the 64-bit image
> 
> And the process in going in the reverse direction would be to
> - load the 64-bit image into a 64-bit simulator
> - clone all the objects in a 32-bit simulator, creating a map
> - pass through the 64-bit objects, updating the corresponding slot in the 32-bit simulator with the object at the map, or otherwise allocating a boxed object for the 64-bit immediate that has no equivalent immediate in 32-bits
> - save the 32-bit image
> 
> I just timed converting a 34 Mb 32-bit Squeak 5.1 image to 64-bits on my 2.3Ghz Core i7 Mac Mini in a 63-bit Spur image.  It took 20.6 seconds to convert.  One would probably have to add another 0.5 seconds for start up costs.  And Pi is around 5x slower than Mac.  So conversion times would be anywhere from 15 seconds to 1 1/2 minutes for standard images, scaling more or less linearly with larger images.
> 
> I certainly don't see any way of doing this in orders of magnitude faster.  But that's my limitation ;-)
> 
> But this computation is ideal for Scorch/Sista right?  It's a series of loops.  It only ever does the same thing because input images are extremely similar.  The image could be trained on a suitably general input set before being deployed.  It would be very interesting to see how much faster Scorch/Sista manages to make image mapping.

So I guess we would have a 'native' utility image included with the normal system, that is set up to do this conversion from 'other' to 'native' as fast as possible, then quit and start the now-native image? The VM would be unchanged for normal usage except just possibly returning an error code if a wrong format image is specified and then the startup shell script(s) could do the run-converter-image pass. Faintly possible this would be a tad quicker than a specific test-first pass. Ah, I imagine we might be clever enough to detect the wrong format in the VM and then just load the converter image anyway, since we'd want to know where it lives and no other VM setup would have been done. The only extra trick would be storing the name of the converted image to run after the processing.

Sure, on *nix it is simple enough to run a format-checker, run the converter if needed (remembering an UI to ask the user if they actually want to do that) and then run the real VM/image. Doing it under our own control seems more fun.

tim
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
From C:\*.* to shining C:\*.*




More information about the Vm-dev mailing list