scons: Switch from the print statement to the print function.
Starting with version 3, scons imposes using the print function instead of the print statement in code it processes. To get things building again, this change moves all python code within gem5 to use the function version. Another change by another author separately made this same change to the site_tools and site_init.py files. Change-Id: I2de7dc3b1be756baad6f60574c47c8b7e80ea3b0 Reviewed-on: https://gem5-review.googlesource.com/8761 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Gabe Black <gabeblack@google.com>
This commit is contained in:
@@ -40,6 +40,8 @@
|
||||
# Authors: Nathan Binkert
|
||||
# Steve Reinhardt
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
import atexit
|
||||
import os
|
||||
import sys
|
||||
@@ -223,7 +225,7 @@ def checkpoint(dir):
|
||||
|
||||
drain()
|
||||
memWriteback(root)
|
||||
print "Writing checkpoint"
|
||||
print("Writing checkpoint")
|
||||
_m5.core.serializeAll(dir)
|
||||
|
||||
def _changeMemoryMode(system, mode):
|
||||
@@ -233,7 +235,7 @@ def _changeMemoryMode(system, mode):
|
||||
if system.getMemoryMode() != mode:
|
||||
system.setMemoryMode(mode)
|
||||
else:
|
||||
print "System already in target mode. Memory mode unchanged."
|
||||
print("System already in target mode. Memory mode unchanged.")
|
||||
|
||||
def switchCpus(system, cpuList, verbose=True):
|
||||
"""Switch CPUs in a system.
|
||||
@@ -248,7 +250,7 @@ def switchCpus(system, cpuList, verbose=True):
|
||||
"""
|
||||
|
||||
if verbose:
|
||||
print "switching cpus"
|
||||
print("switching cpus")
|
||||
|
||||
if not isinstance(cpuList, list):
|
||||
raise RuntimeError, "Must pass a list to this function"
|
||||
|
||||
Reference in New Issue
Block a user