Benchmarks.py (10697:71c40e5c8bd4) Benchmarks.py (10747:3fe41011333d)
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:
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, rootdev=None):
34 def __init__(self, script=None, mem=None, disk=None, rootdev=None,
35 os_type='linux'):
35 self.scriptname = script
36 self.diskname = disk
37 self.memsize = mem
38 self.root = rootdev
36 self.scriptname = script
37 self.diskname = disk
38 self.memsize = mem
39 self.root = rootdev
40 self.ostype = os_type
39
40 def script(self):
41 if self.scriptname:
42 return script(self.scriptname)
43 else:
44 return ''
45
46 def mem(self):
47 if self.memsize:
48 return self.memsize
49 else:
50 return '128MB'
51
52 def disk(self):
53 if self.diskname:
54 return disk(self.diskname)
55 elif buildEnv['TARGET_ISA'] == 'alpha':
56 return env.get('LINUX_IMAGE', disk('linux-latest.img'))
57 elif buildEnv['TARGET_ISA'] == 'x86':
58 return env.get('LINUX_IMAGE', disk('x86root.img'))
59 elif buildEnv['TARGET_ISA'] == 'arm':
60 return env.get('LINUX_IMAGE', disk('linux-aarch32-ael.img'))
61 else:
62 print "Don't know what default disk image to use for %s ISA" % \
63 buildEnv['TARGET_ISA']
64 exit(1)
65
66 def rootdev(self):
67 if self.root:
68 return self.root
69 else:
70 return '/dev/sda1'
71
41
42 def script(self):
43 if self.scriptname:
44 return script(self.scriptname)
45 else:
46 return ''
47
48 def mem(self):
49 if self.memsize:
50 return self.memsize
51 else:
52 return '128MB'
53
54 def disk(self):
55 if self.diskname:
56 return disk(self.diskname)
57 elif buildEnv['TARGET_ISA'] == 'alpha':
58 return env.get('LINUX_IMAGE', disk('linux-latest.img'))
59 elif buildEnv['TARGET_ISA'] == 'x86':
60 return env.get('LINUX_IMAGE', disk('x86root.img'))
61 elif buildEnv['TARGET_ISA'] == 'arm':
62 return env.get('LINUX_IMAGE', disk('linux-aarch32-ael.img'))
63 else:
64 print "Don't know what default disk image to use for %s ISA" % \
65 buildEnv['TARGET_ISA']
66 exit(1)
67
68 def rootdev(self):
69 if self.root:
70 return self.root
71 else:
72 return '/dev/sda1'
73
74 def os_type(self):
75 return self.ostype
76
72# Benchmarks are defined as a key in a dict which is a list of SysConfigs
73# The first defined machine is the test system, the others are driving systems
74
75Benchmarks = {
76 'PovrayBench': [SysConfig('povray-bench.rcS', '512MB', 'povray.img')],
77 'PovrayAutumn': [SysConfig('povray-autumn.rcS', '512MB', 'povray.img')],
78
79 'NetperfStream': [SysConfig('netperf-stream-client.rcS'),
80 SysConfig('netperf-server.rcS')],
81 'NetperfStreamUdp': [SysConfig('netperf-stream-udp-client.rcS'),
82 SysConfig('netperf-server.rcS')],
83 'NetperfUdpLocal': [SysConfig('netperf-stream-udp-local.rcS')],
84 'NetperfStreamNT': [SysConfig('netperf-stream-nt-client.rcS'),
85 SysConfig('netperf-server.rcS')],
86 'NetperfMaerts': [SysConfig('netperf-maerts-client.rcS'),
87 SysConfig('netperf-server.rcS')],
88 'SurgeStandard': [SysConfig('surge-server.rcS', '512MB'),
89 SysConfig('surge-client.rcS', '256MB')],
90 'SurgeSpecweb': [SysConfig('spec-surge-server.rcS', '512MB'),
91 SysConfig('spec-surge-client.rcS', '256MB')],
92 'Nhfsstone': [SysConfig('nfs-server-nhfsstone.rcS', '512MB'),
93 SysConfig('nfs-client-nhfsstone.rcS')],
94 'Nfs': [SysConfig('nfs-server.rcS', '900MB'),
95 SysConfig('nfs-client-dbench.rcS')],
96 'NfsTcp': [SysConfig('nfs-server.rcS', '900MB'),
97 SysConfig('nfs-client-tcp.rcS')],
98 'IScsiInitiator': [SysConfig('iscsi-client.rcS', '512MB'),
99 SysConfig('iscsi-server.rcS', '512MB')],
100 'IScsiTarget': [SysConfig('iscsi-server.rcS', '512MB'),
101 SysConfig('iscsi-client.rcS', '512MB')],
102 'Validation': [SysConfig('iscsi-server.rcS', '512MB'),
103 SysConfig('iscsi-client.rcS', '512MB')],
104 'Ping': [SysConfig('ping-server.rcS',),
105 SysConfig('ping-client.rcS')],
106
107 'ValAccDelay': [SysConfig('devtime.rcS', '512MB')],
108 'ValAccDelay2': [SysConfig('devtimewmr.rcS', '512MB')],
109 'ValMemLat': [SysConfig('micro_memlat.rcS', '512MB')],
110 'ValMemLat2MB': [SysConfig('micro_memlat2mb.rcS', '512MB')],
111 'ValMemLat8MB': [SysConfig('micro_memlat8mb.rcS', '512MB')],
112 'ValMemLat': [SysConfig('micro_memlat8.rcS', '512MB')],
113 'ValTlbLat': [SysConfig('micro_tlblat.rcS', '512MB')],
114 'ValSysLat': [SysConfig('micro_syscall.rcS', '512MB')],
115 'ValCtxLat': [SysConfig('micro_ctx.rcS', '512MB')],
116 'ValStream': [SysConfig('micro_stream.rcS', '512MB')],
117 'ValStreamScale': [SysConfig('micro_streamscale.rcS', '512MB')],
118 'ValStreamCopy': [SysConfig('micro_streamcopy.rcS', '512MB')],
119
120 'MutexTest': [SysConfig('mutex-test.rcS', '128MB')],
121 'ArmAndroid-GB': [SysConfig('null.rcS', '256MB',
77# Benchmarks are defined as a key in a dict which is a list of SysConfigs
78# The first defined machine is the test system, the others are driving systems
79
80Benchmarks = {
81 'PovrayBench': [SysConfig('povray-bench.rcS', '512MB', 'povray.img')],
82 'PovrayAutumn': [SysConfig('povray-autumn.rcS', '512MB', 'povray.img')],
83
84 'NetperfStream': [SysConfig('netperf-stream-client.rcS'),
85 SysConfig('netperf-server.rcS')],
86 'NetperfStreamUdp': [SysConfig('netperf-stream-udp-client.rcS'),
87 SysConfig('netperf-server.rcS')],
88 'NetperfUdpLocal': [SysConfig('netperf-stream-udp-local.rcS')],
89 'NetperfStreamNT': [SysConfig('netperf-stream-nt-client.rcS'),
90 SysConfig('netperf-server.rcS')],
91 'NetperfMaerts': [SysConfig('netperf-maerts-client.rcS'),
92 SysConfig('netperf-server.rcS')],
93 'SurgeStandard': [SysConfig('surge-server.rcS', '512MB'),
94 SysConfig('surge-client.rcS', '256MB')],
95 'SurgeSpecweb': [SysConfig('spec-surge-server.rcS', '512MB'),
96 SysConfig('spec-surge-client.rcS', '256MB')],
97 'Nhfsstone': [SysConfig('nfs-server-nhfsstone.rcS', '512MB'),
98 SysConfig('nfs-client-nhfsstone.rcS')],
99 'Nfs': [SysConfig('nfs-server.rcS', '900MB'),
100 SysConfig('nfs-client-dbench.rcS')],
101 'NfsTcp': [SysConfig('nfs-server.rcS', '900MB'),
102 SysConfig('nfs-client-tcp.rcS')],
103 'IScsiInitiator': [SysConfig('iscsi-client.rcS', '512MB'),
104 SysConfig('iscsi-server.rcS', '512MB')],
105 'IScsiTarget': [SysConfig('iscsi-server.rcS', '512MB'),
106 SysConfig('iscsi-client.rcS', '512MB')],
107 'Validation': [SysConfig('iscsi-server.rcS', '512MB'),
108 SysConfig('iscsi-client.rcS', '512MB')],
109 'Ping': [SysConfig('ping-server.rcS',),
110 SysConfig('ping-client.rcS')],
111
112 'ValAccDelay': [SysConfig('devtime.rcS', '512MB')],
113 'ValAccDelay2': [SysConfig('devtimewmr.rcS', '512MB')],
114 'ValMemLat': [SysConfig('micro_memlat.rcS', '512MB')],
115 'ValMemLat2MB': [SysConfig('micro_memlat2mb.rcS', '512MB')],
116 'ValMemLat8MB': [SysConfig('micro_memlat8mb.rcS', '512MB')],
117 'ValMemLat': [SysConfig('micro_memlat8.rcS', '512MB')],
118 'ValTlbLat': [SysConfig('micro_tlblat.rcS', '512MB')],
119 'ValSysLat': [SysConfig('micro_syscall.rcS', '512MB')],
120 'ValCtxLat': [SysConfig('micro_ctx.rcS', '512MB')],
121 'ValStream': [SysConfig('micro_stream.rcS', '512MB')],
122 'ValStreamScale': [SysConfig('micro_streamscale.rcS', '512MB')],
123 'ValStreamCopy': [SysConfig('micro_streamcopy.rcS', '512MB')],
124
125 'MutexTest': [SysConfig('mutex-test.rcS', '128MB')],
126 'ArmAndroid-GB': [SysConfig('null.rcS', '256MB',
122 'ARMv7a-Gingerbread-Android.SMP.mouse.nolock.clean.img')],
127 'ARMv7a-Gingerbread-Android.SMP.mouse.nolock.clean.img',
128 None, 'android-gingerbread')],
123 'bbench-gb': [SysConfig('bbench-gb.rcS', '256MB',
129 'bbench-gb': [SysConfig('bbench-gb.rcS', '256MB',
124 'ARMv7a-Gingerbread-Android.SMP.mouse.nolock.img')],
130 'ARMv7a-Gingerbread-Android.SMP.mouse.nolock.img',
131 None, 'android-gingerbread')],
125 'ArmAndroid-ICS': [SysConfig('null.rcS', '256MB',
132 'ArmAndroid-ICS': [SysConfig('null.rcS', '256MB',
126 'ARMv7a-ICS-Android.SMP.nolock.clean.img')],
133 'ARMv7a-ICS-Android.SMP.nolock.clean.img',
134 None, 'android-ics')],
127 'bbench-ics': [SysConfig('bbench-ics.rcS', '256MB',
135 'bbench-ics': [SysConfig('bbench-ics.rcS', '256MB',
128 'ARMv7a-ICS-Android.SMP.nolock.img')]
136 'ARMv7a-ICS-Android.SMP.nolock.img',
137 None, 'android-ics')]
129}
130
131benchs = Benchmarks.keys()
132benchs.sort()
133DefinedBenchmarks = ", ".join(benchs)
138}
139
140benchs = Benchmarks.keys()
141benchs.sort()
142DefinedBenchmarks = ", ".join(benchs)