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

Eliot Miranda eliot.miranda at gmail.com
Thu Apr 12 21:02:50 UTC 2018


Hi Tim,

On Thu, Apr 12, 2018 at 11:50 AM, tim Rowledge <tim at rowledge.org> wrote:

>
>
>
> > 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.
>

That's right.  All this is trivial form the command line.  Prompt the user
with "the image is X bits.  The VM is Y bits.  Do you want to convert?"
form the launch script and do the dirty if asked.  From the app its a bit
more difficult because we have to at least prompt the user in the GUI
domain.  Ideally the converter would be one and the same image.  When run
from the command line the converter would be launched headless and
interrogate the user through stdio.  When run from the app it would use its
own GUI and then relaunch.  If at all possible this should all be written
in Smalltalk apart from the VM launching the converter image.  Some
fragment of ckformat.c could be compiled into the VM to see if the image
conversion was appropriate and to launch the converter image in the right
mode.

Volunteers?  I'm happy to have a go at this when my decks are cleared, but
that could be weeks away.

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:\*.*
>

_,,,^..^,,,_
best, Eliot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20180412/6754cf25/attachment-0001.html>


More information about the Vm-dev mailing list