|
|
{{{
|
|
|
#!bash
|
|
|
|
|
|
## This is an annotated trace of what is required to get jitviewer running on
|
|
|
## a 64-bit linux machine using a pre-built nightly pypy-c build
|
|
|
|
|
|
# Checkout the jitviewer project itself
|
|
|
hg clone https://bitbucket.org/pypy/jitviewer jitviewer
|
|
|
|
|
|
# Checkout the pypy source into "pypy" (this will be referenced at run-time)
|
|
|
hg clone http://bitbucket.org/pypy/pypy pypy
|
|
|
|
|
|
# Get a copy of virtualenv which works with pypy
|
|
|
wget http://pypi.python.org/packages/source/v/virtualenv/virtualenv-1.5.1.tar.gz
|
|
|
tar -zxvf virtualenv-1.5.1.tar.gz
|
|
|
|
|
|
# Acquire and unpack a nightly build from:
|
|
|
# http://buildbot.pypy.org/nightly/trunk/
|
|
|
# look for one which has a reasonably high passed test rate and fits your needs
|
|
|
# (normally a c-jit version either 32 or 64 bit depending on your platform)
|
|
|
# the version chosen here is just the current one as of the date of writing...
|
|
|
tar -jxvf pypy-c-jit-42452-6898544251a0-linux64.tar.bz2
|
|
|
|
|
|
# Use virtualenv to create a pypy-compatible virtualenv
|
|
|
# (you should not need to install virtualenv to do this).
|
|
|
# We tell it to use our pre-built pypy interpreter via the -p flag.
|
|
|
virtualenv-1.5.1/virtualenv.py -p pypy-c-jit-42452-6898544251a0-linux64/bin/pypy jitviewer-env
|
|
|
source jitviewer-env/bin/activate
|
|
|
|
|
|
# install jitviewer and its dependencies
|
|
|
cd jitviewer
|
|
|
python setup.py develop
|
|
|
easy_install flask pygments simplejson
|
|
|
|
|
|
# setup jitviewer environment's path so that it will find all of our modules
|
|
|
cd ../jitviewer-env/lib_pypy/
|
|
|
# link the pypy binary distribution's lib-python into the path
|
|
|
ln -s ../../pypy-c-jit-42452-6898544251a0-linux64/lib-python/
|
|
|
# Link the pypy hg checkout's pypy package into the path
|
|
|
ln -s ../../pypy/pypy
|
|
|
|
|
|
# Now, install the software you want to test into the pypy environment
|
|
|
# (e.g. by running its setup.py from within the environment).
|
|
|
|
|
|
# Pause while you setup and get things ready to go...
|
|
|
|
|
|
# Generate your log-file to view...
|
|
|
PYPYLOG=jit-log-opt,jit-backend-counts:log pypy-c yourscript.py
|
|
|
# now view the log...
|
|
|
jitviewer.py log
|
|
|
# which will start a web-server on port 5000 to let you view the trace
|
|
|
|
|
|
}}} |
|
|
\ No newline at end of file |