#! /bin/bash

#
# (C) Copyright IBM Corp. 2002
#
# $Id: GenerateSPECjvmProfile,v 1.8 2004/03/25 16:44:24 dgrove-oss Exp $

# This script will run the system on the SPECjvm98 benchmarks, 
# and collect profile data, dumped to a file.
#
# usage: GenerateSPECjvmProfile <profile Data file> <build directory>
#
# @author Stephen Fink
# @modified Peter F. Sweeney 8/13/2003 additional argument where to find image

FILE=$1
BUILDDIR=$2

if [[ $RVM_ROOT = "" ]]; then
   echo "\n***$0: please set your RVM_ROOT environment variable (eg. $HOME/jvmShadow)***\n"
   exit 1
fi

$RVM_ROOT/rvm/bin/RunSanityTests -measureCompilation -configuration FastBaseAdaptiveGenMS -images $BUILDDIR -test SPECjvm98 -nobuild -rc-args "-X:aos:final_report_level=2 -X:aos:enable_recompilation=false -X:aos:initial_compiler=base -X:base:edge_counter_file=$FILE"
