Performance profiling results...
Marcus Denker
marcus at ira.uka.de
Tue Sep 25 20:42:38 UTC 2001
On Sat, Sep 22, 2001 at 05:38:12PM -0400, Scott A Crosby wrote:
> How do I compile a new VM?
You are using Unix?
(Warning: this is for hacking. So everything uses the latest and not well
tested stuff. (e.g. unix-vm 3.1pre1 instead of 3.0). Do not build
a production VM with this versions if you don´t know what you are
doing...)
Stage I: Recompiling the Unix-Source-Distribution
-------
1. go to http://www-sor.inria.fr/~piumarta/squeak/ and download
Squeak-3.1a-4164pre1-src.tar.gz
2. unpack it with
tar xvzf Squeak-3.1a-4164pre1-src.tar.gz
3. cd Squeak-3.1a-4164
4. read BUILD.UnixSqueak
5. to compile the vm do
mkdir build
cd build
../src/unix/configure
make
and you will have a brand new vm in your build-dir.
6. get http://sumeru.stanford.edu/tim/pooters/SqueakVMBuilderCertificate.pdf
and look at it. (only *look*. You can try to find
someone to sign it after you completed at least StageII ;-) )
Stage II: regeneration the code from the Image
---------
1. get the latest image (or the one that´s suppost to go
with you version of the unix-source-tree).
2. start squeak:
3. go to the class "Interpreter", look at the class-methods.
4. in the Method translate:doInlinig there is a comment, select
Interpreter translate: 'interp.c' doInlining: true.
and doIt! (this will take some time...)
5. do "InterpreterSupportCode writeSupportFiles" (to be save)
6. copy all the generated .c and .h files to the the "src/generated" directory.
(don´t copy platform.exports... or delete the "#ifdef UNIX" stuff. This
should be fixed...)
7. go to your build dir and say "make".
8. Print
http://sumeru.stanford.edu/tim/pooters/SqueakVMBuilderCertificate.pdf
(Or: Look at VMmaker. I should really have written this tutorial using
VMmaker...)
Stage III: testing a VM inside the image.
----------
Yes, there is really a reason to write a VM in Squeak (or SLANG).
(Besides not wanting to write C, of course. But writing SLANG is
like writing C with Smalltalk syntax, so this point is somewhat
questionable anyway...)
The real reason: You can develop and *DEBUG* the VM inside Squeak!
For more, see the class comment of "InterpreterSimulator".
Stage IV: Hack. ;-)
---------
That´s it....
Marcus
More information about the Squeak-dev
mailing list
|