[Vm-dev] Simulating trunk6.image in Spur64VMMaker

Eliot Miranda eliot.miranda at gmail.com
Mon Feb 10 15:29:48 UTC 2020


Hi Subbu,

On Mon, Feb 10, 2020 at 4:58 AM K K Subbu <kksubbu.ml at gmail.com> wrote:

>
> All,
>
> I tried simulating latest trunk6.image in Squeak#19335 on
> sqcogspur64linuxht built on linux (Ubuntu 16.04):
>
> | sis |
> sis := StackInterpreterSimulator newWithOptions: #(ObjectMemory
> Spur32BitMemoryManager).
> sis desiredNumStackPages: 8.
> sis assertValidExecutionPointersAtEachStep: false.
> sis openOn: 'trunk6.image'.
> sis openAsMorph; run
>
> The image opens successfully, but I get a small blinking rectangle to
> the left of the Squeak icon on the docking bar.


The rectangle blinks whenever the simulator calls
ioRelinquishProcessorForMicroseconds:, which is the heart of
primitiveRelinquishProcessor.  SO the blinking rectangle shows you that the
system is running but has nothing to do.

Response is terribly
> slow (about 20s to bring up the World menu) even when cpu is at 30-40%.
>
> What am I doing wrong?
>

Nothing.  The simulator is slow.  It allows very high-level development of
the VM.  But it does not perform anything like as fast as the production
VM.  Even though it is thousands of times slower than the real VM it
permits development of the VM at rates that are, in my experience, ten to a
hundred times faster.

If you want to develop specific primitives, optimizations, etc, that are
invoked from specific Smalltalk expressions you'll find simulating the
"reader" image, which contains a Real-Eval-Print Loop (a REPL), much easier
than trying to interact with the desktop through the world menu.  It is
also perfectly repeatable.  Another approach is to save the image using a
doit and have that doit include, after the snapshot, the code you want to
run.  Another technique that saves time is to save the image containing the
simulator with an open simulator having reached some point, such as the
start of a garbage collection.  You can then rerun the code you're
interested in my reloading the image and continuing the simulator.



> What are the options if I want to open V3 images in this simulator?
>

Just change  ObjectMemory Spur32BitMemoryManager to ObjectMemory
NewObjectMemory

TIA .. Subbu
>

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


More information about the Vm-dev mailing list