reorder.sh revision 91
0N/A# Copyright 2000-2004 Sun Microsystems, Inc. All Rights Reserved. 0N/A# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A# This code is free software; you can redistribute it and/or modify it 0N/A# under the terms of the GNU General Public License version 2 only, as 0N/A# published by the Free Software Foundation. 0N/A# This code is distributed in the hope that it will be useful, but WITHOUT 0N/A# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A# version 2 for more details (a copy is included in the LICENSE file that 0N/A# accompanied this code). 0N/A# You should have received a copy of the GNU General Public License version 0N/A# 2 along with this work; if not, write to the Free Software Foundation, 0N/A# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 0N/A# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 0N/A# CA 95054 USA or visit www.sun.com if you need additional information or 0N/A# have any questions. 0N/A# Generate the reorder data for hotspot. 0N/A# <test_sdk_workspace> is a *built* SDK workspace which contains the 0N/A# from this workspace. 0N/A# <test_sdk> is a working SDK which you can use to run the profiled 0N/A# JVMs in to collect data. You must be able to write to this SDK. 0N/A# <jbb_dir> is a directory containing JBB test jar files and properties 0N/A# which will be used to run the JBB test to provide reordering data 0N/A# Profiled builds of the VM are needed (before running this script), 0N/A# build with PROFILE_PRODUCT=1: 0N/A# gnumake profiled1 profiled PROFILE_PRODUCT=1 0N/A#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 0N/A # $1 = "client" or "server" 0N/A # $2 = name of reorder file to be generated. 0N/A echo "TEST_SETUP $1 $2" 0N/A if [ "${arch3}" = "i386" ] ; then 0N/A # On Solaris/x86 we need to remove the symbol _mcount from the command 0N/A tests="Null Exit Hello Sleep IntToString \ 0N/A LoadToolkit LoadFrame LoadJFrame JHello" 0N/A if [ "X$1" = "client" ] ; then 0N/A echo "Dumping shared file." 0N/A echo "Shared file dump completed." 0N/A echo "NO_SHARING defined, not using sharing." 0N/A echo "Server: no sharing" 0N/A#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 0N/A # Run each of a set of tests, extract the methods called, 0N/A # append the new functions to the reorder list. 0N/A # $1 = "client" or "server" 0N/A # $2 = name of reorder file to be generated. 0N/A echo "TEST_CLIENT $1 $2." 0N/A echo "TEST_CLIENT $1 $2." 0N/A # Run SwingSet, extract the methods called, 0N/A # append the new functions to the reorder list. 0N/A echo "When SwingSet has finished drawing, " \ 0N/A "you may terminate it (with your mouse)." 0N/A echo "Otherwise, it should be automatically terminated in 3 minutes." 0N/A echo "Using LD_PRELOAD=$mcount, JDK_ALTERNATE=jvm_profiled." 0N/A#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 0N/A # Run the JBB script, collecting data on the way. 0N/A # $1 = "client" or "server" 0N/A # $2 = name of reorder file to be generated. 0N/A echo "TEST_SERVER $1 $2." 0N/A echo "TEST_SERVER $1 $2." 0N/A#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 0N/A# Rename the old VMs, copy the new in, run the test, and put the 0N/A # $1 = "client" or "server" 0N/A # $2 = name of reorder file to be generated. 0N/A # $3 = profiled jvm to copy in 0N/A echo "COPY_AND_TEST ($1, $2, $3)." 0N/A # $2 = name of reorder file to be generated. 0N/A # $3 = profiled jvm to copy in 0N/A#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 0N/Aif [ $# !=
3 ] ;
then 0N/A echo "test workspace "$sdk_ws" does not contain the reordering tools." 0N/A# Set up architecture names as needed by various components. 0N/A# Why couldn't we just use x86 for everything? 0N/A# Arch name as used in JRE runtime (eg. i386): 0N/A# Arch name as used in Hotspot build: (eg. i486) 0N/A# Arch name as used in SDK build (eg. i586): 0N/A# Tweak for 64-bit sparc builds. At least they all agree. 0N/A# Tweak for 64-bit i386 == amd64 builds. At least they all agree. 0N/A# Tweak for x86 builds. All different. 0N/A echo "test SDK "$sdk" is not a suitable SDK." 0N/A# Were profiled VMs built? 0N/A echo "Profiled builds of compiler2 are needed first." 0N/A echo ' -- build with "make profiled PROFILE_PRODUCT=1" -- ' 0N/A echo "Profiled builds of compiler1 and compiler2 are needed first." 0N/A echo ' -- build with "make profiled{,1} PROFILE_PRODUCT=1" -- ' 0N/A# Compiler1 - not supported in 64-bit (b69 java launcher rejects it).