Benchmarks.py revision 8088
1# Copyright (c) 2006-2007 The Regents of The University of Michigan 2# All rights reserved. 3# 4# Redistribution and use in source and binary forms, with or without 5# modification, are permitted provided that the following conditions are 6# met: redistributions of source code must retain the above copyright 7# notice, this list of conditions and the following disclaimer; 8# redistributions in binary form must reproduce the above copyright 9# notice, this list of conditions and the following disclaimer in the 10# documentation and/or other materials provided with the distribution; 11# neither the name of the copyright holders nor the names of its 12# contributors may be used to endorse or promote products derived from 13# this software without specific prior written permission. 14# 15# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 16# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 17# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 19# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 21# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 22# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26# 27# Authors: Ali Saidi 28 29from SysPaths import script, disk, binary 30from os import environ as env 31from m5.defines import buildEnv 32 33class SysConfig: 34 def __init__(self, script=None, mem=None, disk=None): 35 self.scriptname = script 36 self.diskname = disk 37 self.memsize = mem 38 39 def script(self): 40 if self.scriptname: 41 return script(self.scriptname) 42 else: 43 return '' 44 45 def mem(self): 46 if self.memsize: 47 return self.memsize 48 else: 49 return '128MB' 50 51 def disk(self): 52 if self.diskname: 53 return disk(self.diskname) 54 elif buildEnv['TARGET_ISA'] == 'alpha': 55 return env.get('LINUX_IMAGE', disk('linux-latest.img')) 56 elif buildEnv['TARGET_ISA'] == 'x86': 57 return env.get('LINUX_IMAGE', disk('x86root.img')) 58 else: 59 print "Don't know what default disk image to use for ISA %s" % \ 60 buildEnv['TARGET_ISA'] 61 sys.exit(1) 62 63# Benchmarks are defined as a key in a dict which is a list of SysConfigs 64# The first defined machine is the test system, the others are driving systems 65 66Benchmarks = { 67 'PovrayBench': [SysConfig('povray-bench.rcS', '512MB', 'povray.img')], 68 'PovrayAutumn': [SysConfig('povray-autumn.rcS', '512MB', 'povray.img')], 69 70 'NetperfStream': [SysConfig('netperf-stream-client.rcS'), 71 SysConfig('netperf-server.rcS')], 72 'NetperfStreamUdp': [SysConfig('netperf-stream-udp-client.rcS'), 73 SysConfig('netperf-server.rcS')], 74 'NetperfUdpLocal': [SysConfig('netperf-stream-udp-local.rcS')], 75 'NetperfStreamNT': [SysConfig('netperf-stream-nt-client.rcS'), 76 SysConfig('netperf-server.rcS')], 77 'NetperfMaerts': [SysConfig('netperf-maerts-client.rcS'), 78 SysConfig('netperf-server.rcS')], 79 'SurgeStandard': [SysConfig('surge-server.rcS', '512MB'), 80 SysConfig('surge-client.rcS', '256MB')], 81 'SurgeSpecweb': [SysConfig('spec-surge-server.rcS', '512MB'), 82 SysConfig('spec-surge-client.rcS', '256MB')], 83 'Nhfsstone': [SysConfig('nfs-server-nhfsstone.rcS', '512MB'), 84 SysConfig('nfs-client-nhfsstone.rcS')], 85 'Nfs': [SysConfig('nfs-server.rcS', '900MB'), 86 SysConfig('nfs-client-dbench.rcS')], 87 'NfsTcp': [SysConfig('nfs-server.rcS', '900MB'), 88 SysConfig('nfs-client-tcp.rcS')], 89 'IScsiInitiator': [SysConfig('iscsi-client.rcS', '512MB'), 90 SysConfig('iscsi-server.rcS', '512MB')], 91 'IScsiTarget': [SysConfig('iscsi-server.rcS', '512MB'), 92 SysConfig('iscsi-client.rcS', '512MB')], 93 'Validation': [SysConfig('iscsi-server.rcS', '512MB'), 94 SysConfig('iscsi-client.rcS', '512MB')], 95 'Ping': [SysConfig('ping-server.rcS',), 96 SysConfig('ping-client.rcS')], 97 98 'ValAccDelay': [SysConfig('devtime.rcS', '512MB')], 99 'ValAccDelay2': [SysConfig('devtimewmr.rcS', '512MB')], 100 'ValMemLat': [SysConfig('micro_memlat.rcS', '512MB')], 101 'ValMemLat2MB': [SysConfig('micro_memlat2mb.rcS', '512MB')], 102 'ValMemLat8MB': [SysConfig('micro_memlat8mb.rcS', '512MB')], 103 'ValMemLat': [SysConfig('micro_memlat8.rcS', '512MB')], 104 'ValTlbLat': [SysConfig('micro_tlblat.rcS', '512MB')], 105 'ValSysLat': [SysConfig('micro_syscall.rcS', '512MB')], 106 'ValCtxLat': [SysConfig('micro_ctx.rcS', '512MB')], 107 'ValStream': [SysConfig('micro_stream.rcS', '512MB')], 108 'ValStreamScale': [SysConfig('micro_streamscale.rcS', '512MB')], 109 'ValStreamCopy': [SysConfig('micro_streamcopy.rcS', '512MB')], 110 111 'MutexTest': [SysConfig('mutex-test.rcS', '128MB')], 112 113 'bnAn': [SysConfig('/z/saidi/work/m5.newmem.head/configs/boot/bn-app.rcS', 114 '128MB', '/z/saidi/work/bottleneck/bnimg.img')] 115} 116 117benchs = Benchmarks.keys() 118benchs.sort() 119DefinedBenchmarks = ", ".join(benchs) 120