Re: SableJIT integration in SableVM

David Bélanger <[email protected]> Sat, 22 Jan 2005 17:40:45 -0500
Newsgroups gmane.comp.java.vm.sablevm.devel
Message-ID <[email protected]>
On Sat, Jan 22, 2005 at 03:39:34PM -0500, Grzegorz B. Prokopski wrote:
> Hi David,
> 
> I looked into your sandbox, as I'd like to compile and try to run
> SableJIT myself.  Can you give a short instruction (or a URL/RTFM)
> on how to do it?
> 

Hi Grzegorz,


First, the svn directory is:
belanger/sandbox/sablejit-classpath
(Name: sablejit-classpath for historical reasons, need to use
  sablevm-classpath from staging branch).

There is sablejit/README, not sure if everything up-to-date.

Short intro to build with debugging/verbose mode. 

1) Build SableVM-Classpath/staging as usual.

2) SableVM/SableJIT

Option 1: Using the scripts in bin/config

These scripts are more for my convenience but could give some idea:

cd bin/config
./setupconfig
to set up a few symlinks.

cd ../..

cd sablevm

look in ../bin/config/build
for environment variables that should be set:
SABLEJIT_WITH_JIT_LOCATION - destination (--prefix value)
JUNIT_PATH - junit classpath

Then, you can build the most verbose debugging testing version with:
../bin/config/build-debug direct-jit-verbose
(or switch-jit-verbose)


Option 2: Manual build

Something like:

cd sablevm
./configure [sablevm_options] --with-sablejit \
--enable-sablejit-testing \
--with-sablejit-verbose-level=verbose \
--enable-debugging-features \
--disable-signals-for-exceptions

switch or direct threading recommended for debugging mode.

make
make install

Then:

cd sablejit
make
make install

To test installation:

make version
...
/home/david/local/sablevm-jit/bin/sablevm-inlined-jit-test -Y sablejit.SableJITClassLoader config
Configuration info in SableJITClassLoader
  SABLEJIT_PATH_URL = "jar:file:///home/david/local/sablevm-jit/lib/sablevm-inlined-jit-test/sablejit.jar!/"
  JUNIT_PATH_URL = "jar:file:///home/david/jars/junit-3.8.1.jar!/"
Configuration in Configuration.java:
  GO_SLOW = false
  PPC_CPU = 0
  X86_CPU = 1
  SPARC_CPU = 2
  CPU = 0
...


Confirms classloader and classes installed in correct location.

make test

A lot of output.  You should see > 1700 methods compiled.


make test TESTNAMES=test_aconst_null

will run a simpler test.


Have fun!

David

---

David Bélanger
Web page:   http://www.cs.mcgill.ca/~dbelan2/
Public key: http://www.cs.mcgill.ca/~dbelan2/public_key.txt