Simpoints: Fix regression bug/Don't set process.simpoint, if simpoint doesn't exist
authorAli Saidi <saidi@eecs.umich.edu>
Sun, 16 Mar 2008 02:20:09 +0000 (22:20 -0400)
committerAli Saidi <saidi@eecs.umich.edu>
Sun, 16 Mar 2008 02:20:09 +0000 (22:20 -0400)
--HG--
extra : convert_revision : c156c49668815755c4c788f807e8eba32151aa24

configs/common/Simulation.py
configs/common/cpu2000.py

index 08e700d87f04c6c4ddc3ae72def50ceed997797e..e604dd0d9d93e62207ef88d01bb2b687147954de 100644 (file)
@@ -128,7 +128,7 @@ def run(options, root, testsys, cpu_class):
                 testsys.cpu[i].max_insts_any_thread = int(options.fast_forward)
             # Fast forward to a simpoint (warning: time consuming)
             elif options.simpoint:
-                if testsys.cpu[i].workload[0].simpoint == None:
+                if testsys.cpu[i].workload[0].simpoint == 0:
                     m5.panic('simpoint not found')
                 testsys.cpu[i].max_insts_any_thread = \
                     testsys.cpu[i].workload[0].simpoint
@@ -162,7 +162,7 @@ def run(options, root, testsys, cpu_class):
         # Set an instruction break point
         if options.simpoint:
             for i in xrange(np):
-                if testsys.cpu[i].workload[0].simpoint == None:
+                if testsys.cpu[i].workload[0].simpoint == 0:
                     m5.panic('no simpoint for testsys.cpu[%d].workload[0]' % i)
                 checkpoint_inst = int(testsys.cpu[i].workload[0].simpoint) + offset
                 testsys.cpu[i].max_insts_any_thread = checkpoint_inst
@@ -197,7 +197,7 @@ def run(options, root, testsys, cpu_class):
             print "Done."
         elif options.simpoint:
             # assume workload 0 has the simpoint
-            if testsys.cpu[0].workload[0].simpoint == None:
+            if testsys.cpu[0].workload[0].simpoint == 0:
                 m5.panic('Unable to find simpoint')
 
             options.checkpoint_restore += \
index 7fe15b5771a83073d91950996116339c130617e1..a2e64f822b7de3006bc4e4b6aa616c26a5f46646 100644 (file)
@@ -140,7 +140,8 @@ class Benchmark(object):
             process_args['input'] = self.stdin
         if self.stdout:
             process_args['output'] = self.stdout
-        process_args['simpoint'] = self.simpoint
+        if self.simpoint:
+            process_args['simpoint'] = self.simpoint
         # explicit keywords override defaults
         process_args.update(kwargs)