Yesterday I managed to compile the intepreter VM on a StarFive VisionFive 2 board (after replacing the config.guess with a current one having gone through several dead ends before figuring that out). The images in the download page have no indication about being V3 or Spur, so I first tried a 5.0 image and when that didn't work I got a 4.0 one that did.
I was a bit surprised at how snappy the interpreted Squeak felt on a 1.5GHz reasonably simple RISC-V. Most other applications on that machine (web browser, Open Office, a digital simulator in Java) run much slower than on my work computer (Intel Core i5-8259U CPU @ 2.30GHz) so I didn't expect that.
Running "0 tinyBenchmarks" got me a result of about -660 thousand bytecodes per second and 47 thousand sends per second. I will try to find out how this negative result came about and it is very likely that the other result is completely wrong as well.
Here are the results on my work machine (with a Cog VM): 0 tinyBenchmarks '1150561797 bytecodes/sec; 32470183 sends/sec'
Having the email client able to evaluate Smalltalk expressions can be very convenient at times ;-)
-- Jecel
Hi Jacel,
Can you please confirm what version of the interpreter VM you are building? For me, using up to date sources from squeakvm.org, my VM is labeled as version '4.20.5.3825':
Virtual Machine --------------- /usr/local/lib/squeak/4.20.5-3825/squeakvm Squeak4.6 of 21 July 2021 [latest update: #15118] Unix built on Sep 27 2023 21:10:42 Compiler: 11.4.0 platform sources revision 3825 VMMaker versionString 4.20.5
Regarding image versions (V3, Spur, etc) you may want to load package 'ImageFormat' from the VMMaker repository (https://source.squeak.org/VMMaker). Class ImageFormat is the executable documentation for image formats. It also provides the C source for the compiled ckformat program that you will find in your VM folder when you compile an interpreter VM.
In my own experience, the interpreter VM feels very "snappy" as you say, but opensmalltalk-vm is much faster for anything involving computation or significant workload. For example, Anything involving Monticello qualifies as significant workload so opensmalltalk-vm makes a huge difference there. But I find any of these VMs quite impressive when running on modern hardware.
Dave
On 2023-09-30 20:12, Jecel Assumpcao Jr wrote:
Yesterday I managed to compile the intepreter VM on a StarFive VisionFive 2 board (after replacing the config.guess with a current one having gone through several dead ends before figuring that out). The images in the download page have no indication about being V3 or Spur, so I first tried a 5.0 image and when that didn't work I got a 4.0 one that did.
I was a bit surprised at how snappy the interpreted Squeak felt on a 1.5GHz reasonably simple RISC-V. Most other applications on that machine (web browser, Open Office, a digital simulator in Java) run much slower than on my work computer (Intel Core i5-8259U CPU @ 2.30GHz) so I didn't expect that.
Running "0 tinyBenchmarks" got me a result of about -660 thousand bytecodes per second and 47 thousand sends per second. I will try to find out how this negative result came about and it is very likely that the other result is completely wrong as well.
Here are the results on my work machine (with a Cog VM): 0 tinyBenchmarks '1150561797 bytecodes/sec; 32470183 sends/sec'
Having the email client able to evaluate Smalltalk expressions can be very convenient at times ;-)
-- Jecel
David,
Can you please confirm what version of the interpreter VM you are building? For me, using up to date sources from squeakvm.org, my VM is labeled as version '4.20.5.3825':
Mine is 4.20.3-3825 which is what I got from the following commands on Thursday late at night:
svn co http://squeakvm.org/svn/squeak/trunk/platforms svn co http://squeakvm.org/svn/squeak/trunk/src
Regarding image versions (V3, Spur, etc) you may want to load package 'ImageFormat' from the VMMaker repository (https://source.squeak.org/VMMaker). Class ImageFormat is the executable documentation for image formats. It also provides the C source for the compiled ckformat program that you will find in your VM folder when you compile an interpreter VM.
The ckformat program does help verify what the images I downloaded are, but it does mean I have to download them first. Sadly, all v3 images I have found so far are 32 bits. I have traced the problem to the VM getting basic integer math wrong when numbers get large. My first guess was that there was some problem with the timer since the system was running. I am always amazed at how Smalltalk can keep running (for years, sometimes!) while having some very serious bugs. Other systems fall down like a house of cards if everything isn't just perfect.
I imagine that the squeakvm64 won't have this bug, But I need an image with version up to 68003 to test that.
This is a RV64G machine, so I probably have to make some change to fix squeakvm for 32 bit images. I don't think I want a RV32G binary. Each processor that can do 32 or 64 bits has a different way of doing it. The RISC-V way has advantages in some cases, but complicates things in others.
-- Jecel
Jacel,
I put a 64-bit V3 image (image format 68002) here:
https://drive.google.com/file/d/1q-3CtzrRM6ECdeopshZX2OEo1EOpZXiT/view?usp=s...
Images in this format were never really published, although there were a couple of them available on squeakvm.org at one time.
Dave
On 2023-10-01 17:18, Jecel Assumpcao Jr wrote:
David,
Can you please confirm what version of the interpreter VM you are building? For me, using up to date sources from squeakvm.org, my VM is labeled as version '4.20.5.3825':
Mine is 4.20.3-3825 which is what I got from the following commands on Thursday late at night:
svn co http://squeakvm.org/svn/squeak/trunk/platforms svn co http://squeakvm.org/svn/squeak/trunk/src
Regarding image versions (V3, Spur, etc) you may want to load package 'ImageFormat' from the VMMaker repository (https://source.squeak.org/VMMaker). Class ImageFormat is the executable documentation for image formats. It also provides the C source for the compiled ckformat program that you will find in your VM folder when you compile an interpreter VM.
The ckformat program does help verify what the images I downloaded are, but it does mean I have to download them first. Sadly, all v3 images I have found so far are 32 bits. I have traced the problem to the VM getting basic integer math wrong when numbers get large. My first guess was that there was some problem with the timer since the system was running. I am always amazed at how Smalltalk can keep running (for years, sometimes!) while having some very serious bugs. Other systems fall down like a house of cards if everything isn't just perfect.
I imagine that the squeakvm64 won't have this bug, But I need an image with version up to 68003 to test that.
This is a RV64G machine, so I probably have to make some change to fix squeakvm for 32 bit images. I don't think I want a RV32G binary. Each processor that can do 32 or 64 bits has a different way of doing it. The RISC-V way has advantages in some cases, but complicates things in others.
-- Jecel
David,
I put a 64-bit V3 image (image format 68002) here:
https://drive.google.com/file/d/1q-3CtzrRM6ECdeopshZX2OEo1EOpZXiT/view?usp=s...
Images in this format were never really published, although there were a couple of them available on squeakvm.org at one time.
Thanks! This worked perfectly for me. As I expected, the 64 bit VM didn't have any problems. I got 99 million bytecodes per second and 4 million sends per second. It is interesting that this is slightly faster than the numbers got for the StackVM (though I can't be sure there are no differences at all between our boards).
My next option would have been to search for the script that was used once upon a time to convert 32 bit images to 64 bits.
-- Jecel
On 2023-10-03, at 10:36 AM, Jecel Assumpcao Jr jecel@merlintec.com wrote:
My next option would have been to search for the script that was used once upon a time to convert 32 bit images to 64 bits.
That's in the VMMaker system, using the Spur64to32BitImageConverter class
tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Strange OpCodes: BA: Branch Approximate
On 2023-10-03 13:22, Tim Rowledge wrote:
On 2023-10-03, at 10:36 AM, Jecel Assumpcao Jr jecel@merlintec.com wrote:
My next option would have been to search for the script that was used once upon a time to convert 32 bit images to 64 bits.
That's in the VMMaker system, using the Spur64to32BitImageConverter class
And for converting a V3 image to 64 bit format, use the system tracer from the http://www.squeaksource.com/SystemTracing repository. I think that the last one I used was SystemTracing-dtl.27.mcz. For an older image, I unzip the mcz file to get the Smalltalk source, then load that directly into the image I want to trace (this to avoid needing to load extra Monticello stuff into the old image).
Dave
Hi Jecel --
Try disabling "Time useHighResClockForTiming".
Best, Marcel Am 30.09.2023 22:12:32 schrieb Jecel Assumpcao Jr jecel@merlintec.com: Yesterday I managed to compile the intepreter VM on a StarFive VisionFive 2 board (after replacing the config.guess with a current one having gone through several dead ends before figuring that out). The images in the download page have no indication about being V3 or Spur, so I first tried a 5.0 image and when that didn't work I got a 4.0 one that did.
I was a bit surprised at how snappy the interpreted Squeak felt on a 1.5GHz reasonably simple RISC-V. Most other applications on that machine (web browser, Open Office, a digital simulator in Java) run much slower than on my work computer (Intel Core i5-8259U CPU @ 2.30GHz) so I didn't expect that.
Running "0 tinyBenchmarks" got me a result of about -660 thousand bytecodes per second and 47 thousand sends per second. I will try to find out how this negative result came about and it is very likely that the other result is completely wrong as well.
Here are the results on my work machine (with a Cog VM): 0 tinyBenchmarks '1150561797 bytecodes/sec; 32470183 sends/sec'
Having the email client able to evaluate Smalltalk expressions can be very convenient at times ;-)
-- Jecel
Jecel
hav you tried building a StackVM (ie, like CogVM without Jit) for 64bit? This should be able to run 5.0+ images, IIRc.
Best regards -Tobias
On 30. Sep 2023, at 22:12, Jecel Assumpcao Jr jecel@merlintec.com wrote:
Yesterday I managed to compile the intepreter VM on a StarFive VisionFive 2 board (after replacing the config.guess with a current one having gone through several dead ends before figuring that out). The images in the download page have no indication about being V3 or Spur, so I first tried a 5.0 image and when that didn't work I got a 4.0 one that did.
I was a bit surprised at how snappy the interpreted Squeak felt on a 1.5GHz reasonably simple RISC-V. Most other applications on that machine (web browser, Open Office, a digital simulator in Java) run much slower than on my work computer (Intel Core i5-8259U CPU @ 2.30GHz) so I didn't expect that.
Running "0 tinyBenchmarks" got me a result of about -660 thousand bytecodes per second and 47 thousand sends per second. I will try to find out how this negative result came about and it is very likely that the other result is completely wrong as well.
Here are the results on my work machine (with a Cog VM): 0 tinyBenchmarks '1150561797 bytecodes/sec; 32470183 sends/sec'
Having the email client able to evaluate Smalltalk expressions can be very convenient at times ;-)
-- Jecel
Tobias Pape wrote on Wed, 4 Oct 2023 14:49:29 +0200
hav you tried building a StackVM (ie, like CogVM without Jit) for 64bit? This should be able to run 5.0+ images, IIRc.
Ken Dickey had already done that and posted his tinyBenchmarks result to this thread. So I focused on trying what he hadn't.
He sent me a link with his porting experience:
https://github.com/KenDickey/opensmalltalk-vm-rv64/blob/Cog/docs/PortingNote...
I didn't make any changes to the interpreter VM but haven't really tested my results, so it might be completely broken when doing FFI or some other things.
-- Jecel
On 5. Oct 2023, at 15:56, Jecel Assumpcao Jr jecel@merlintec.com wrote:
Tobias Pape wrote on Wed, 4 Oct 2023 14:49:29 +0200
hav you tried building a StackVM (ie, like CogVM without Jit) for 64bit? This should be able to run 5.0+ images, IIRc.
Ken Dickey had already done that and posted his tinyBenchmarks result to this thread. So I focused on trying what he hadn't.
ah sorry, missed that.
Best regards -Tobias
He sent me a link with his porting experience:
https://github.com/KenDickey/opensmalltalk-vm-rv64/blob/Cog/docs/PortingNote...
I didn't make any changes to the interpreter VM but haven't really tested my results, so it might be completely broken when doing FFI or some other things.
-- Jecel
squeak-dev@lists.squeakfoundation.org