changeset 824055fe6b30 in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=824055fe6b30
description:
syscall_emul: [patch 5/22] remove LiveProcess class and use Process
instead
The EIOProcess class was removed recently and it was the only other
class
which derived from Process. Since every Process invocation is also a
LiveProcess invocation, it makes sense to simplify the organization by
combining the fields from LiveProcess into Process.
diffstat:
configs/common/cpu2000.py | 18 +-
configs/example/apu_se.py | 6 +-
configs/example/se.py | 4 +-
configs/learning_gem5/part1/simple.py | 2 +-
configs/learning_gem5/part1/two_level.py | 2 +-
configs/splash2/cluster.py | 24 +-
configs/splash2/run.py | 24 +-
src/arch/alpha/linux/process.cc | 10 +-
src/arch/alpha/linux/process.hh | 4 +-
src/arch/alpha/process.cc | 24 +-
src/arch/alpha/process.hh | 8 +-
src/arch/arm/freebsd/process.cc | 16 +-
src/arch/arm/freebsd/process.hh | 14 +-
src/arch/arm/linux/process.cc | 20 +-
src/arch/arm/linux/process.hh | 10 +-
src/arch/arm/process.cc | 45 ++---
src/arch/arm/process.hh | 20 +-
src/arch/mips/linux/process.cc | 16 +-
src/arch/mips/linux/process.hh | 4 +-
src/arch/mips/process.cc | 18 +-
src/arch/mips/process.hh | 8 +-
src/arch/power/linux/process.cc | 10 +-
src/arch/power/linux/process.hh | 6 +-
src/arch/power/process.cc | 16 +-
src/arch/power/process.hh | 8 +-
src/arch/riscv/linux/process.cc | 6 +-
src/arch/riscv/linux/process.hh | 4 +-
src/arch/riscv/process.cc | 16 +-
src/arch/riscv/process.hh | 7 +-
src/arch/sparc/faults.cc | 20 +-
src/arch/sparc/linux/process.cc | 12 +-
src/arch/sparc/linux/process.hh | 10 +-
src/arch/sparc/linux/syscalls.cc | 8 +-
src/arch/sparc/process.cc | 44 ++--
src/arch/sparc/process.hh | 23 +-
src/arch/sparc/solaris/process.cc | 8 +-
src/arch/sparc/solaris/process.hh | 4 +-
src/arch/x86/linux/process.cc | 31 ++--
src/arch/x86/linux/process.hh | 8 +-
src/arch/x86/process.cc | 58 +++----
src/arch/x86/process.hh | 20 +-
src/gpu-compute/cl_driver.cc | 4 +-
src/gpu-compute/cl_driver.hh | 6 +-
src/kern/freebsd/freebsd.hh | 2 +-
src/kern/linux/linux.cc | 4 +-
src/kern/linux/linux.hh | 5 +-
src/kern/operatingsystem.cc | 2 +-
src/kern/operatingsystem.hh | 5 +-
src/sim/Process.py | 23 +-
src/sim/emul_driver.hh | 8 +-
src/sim/process.cc | 156 +++++++++-----------
src/sim/process.hh | 44 +----
src/sim/syscall_desc.cc | 2 +-
src/sim/syscall_desc.hh | 6 +-
src/sim/syscall_emul.cc | 116 +++++++-------
src/sim/syscall_emul.hh | 177 +++++++++++------------
tests/long/se/10.mcf/test.py | 2 +-
tests/long/se/20.parser/test.py | 2 +-
tests/long/se/30.eon/test.py | 2 +-
tests/long/se/40.perlbmk/test.py | 2 +-
tests/long/se/50.vortex/test.py | 2 +-
tests/long/se/60.bzip2/test.py | 2 +-
tests/long/se/70.twolf/test.py | 2 +-
tests/quick/se/00.hello.mp/test.py | 6 +-
tests/quick/se/00.hello/test.py | 4 +-
tests/quick/se/01.hello-2T-smt/test.py | 4 +-
tests/quick/se/02.insttest/test.py | 4 +-
tests/quick/se/04.gpu/test.py | 6 +-
tests/quick/se/10.mcf/test.py | 2 +-
tests/quick/se/30.eon/test.py | 2 +-
tests/quick/se/40.m5threads-test-atomic/test.py | 4 +-
tests/quick/se/50.vortex/test.py | 2 +-
tests/quick/se/70.twolf/test.py | 2 +-
73 files changed, 582 insertions(+), 644 deletions(-)
diffs (truncated from 3946 to 300 lines):
diff -r 36119fa7874d -r 824055fe6b30 configs/common/cpu2000.py
--- a/configs/common/cpu2000.py Fri Feb 17 12:01:51 2017 -0500
+++ b/configs/common/cpu2000.py Wed Nov 09 14:27:40 2016 -0600
@@ -131,8 +131,8 @@
func(self, isa, os)
- def makeLiveProcessArgs(self, **kwargs):
- # set up default args for LiveProcess object
+ def makeProcessArgs(self, **kwargs):
+ # set up default args for Process object
process_args = {}
process_args['cmd'] = [ self.name ] + self.args
process_args['executable'] = self.executable
@@ -147,11 +147,11 @@
return process_args
- def makeLiveProcess(self, **kwargs):
- process_args = self.makeLiveProcessArgs(**kwargs)
+ def makeProcess(self, **kwargs):
+ process_args = self.makeProcessArgs(**kwargs)
# figure out working directory: use m5's outdir unless
- # overridden by LiveProcess's cwd param
+ # overridden by Process's cwd param
cwd = process_args.get('cwd')
if not cwd:
@@ -163,9 +163,9 @@
# copy input files to working directory
for d in self.inputs_dir:
copyfiles(d, cwd)
- # generate LiveProcess object
- from m5.objects import LiveProcess
- return LiveProcess(**process_args)
+ # generate Process object
+ from m5.objects import Process
+ return Process(**process_args)
def __str__(self):
return self.name
@@ -750,5 +750,5 @@
print 'class: %s' % bench.__name__
x = bench('alpha', 'tru64', input_set)
print '%s: %s' % (x, input_set)
- pprint(x.makeLiveProcessArgs())
+ pprint(x.makeProcessArgs())
print
diff -r 36119fa7874d -r 824055fe6b30 configs/example/apu_se.py
--- a/configs/example/apu_se.py Fri Feb 17 12:01:51 2017 -0500
+++ b/configs/example/apu_se.py Wed Nov 09 14:27:40 2016 -0600
@@ -392,9 +392,9 @@
# OpenCL driver
driver = ClDriver(filename="hsa", codefile=kernel_files)
for cpu in cpu_list:
- cpu.workload = LiveProcess(executable = executable,
- cmd = [options.cmd] + options.options.split(),
- drivers = [driver])
+ cpu.workload = Process(executable = executable,
+ cmd = [options.cmd] + options.options.split(),
+ drivers = [driver])
for cp in cp_list:
cp.workload = host_cpu.workload
diff -r 36119fa7874d -r 824055fe6b30 configs/example/se.py
--- a/configs/example/se.py Fri Feb 17 12:01:51 2017 -0500
+++ b/configs/example/se.py Wed Nov 09 14:27:40 2016 -0600
@@ -91,7 +91,7 @@
idx = 0
for wrkld in workloads:
- process = LiveProcess()
+ process = Process()
process.executable = wrkld
process.cwd = os.getcwd()
@@ -154,7 +154,7 @@
else:
exec("workload = %s(buildEnv['TARGET_ISA', 'linux', '%s')" % (
app, options.spec_input))
- multiprocesses.append(workload.makeLiveProcess())
+ multiprocesses.append(workload.makeProcess())
except:
print >>sys.stderr, "Unable to find workload for %s: %s" % (
buildEnv['TARGET_ISA'], app)
diff -r 36119fa7874d -r 824055fe6b30 configs/learning_gem5/part1/simple.py
--- a/configs/learning_gem5/part1/simple.py Fri Feb 17 12:01:51 2017 -0500
+++ b/configs/learning_gem5/part1/simple.py Wed Nov 09 14:27:40 2016 -0600
@@ -89,7 +89,7 @@
binary = 'tests/test-progs/hello/bin/' + isa + '/linux/hello'
# Create a process for a simple "Hello World" application
-process = LiveProcess()
+process = Process()
# Set the command
# cmd is a list which begins with the executable (like argv)
process.cmd = [binary]
diff -r 36119fa7874d -r 824055fe6b30 configs/learning_gem5/part1/two_level.py
--- a/configs/learning_gem5/part1/two_level.py Fri Feb 17 12:01:51 2017 -0500
+++ b/configs/learning_gem5/part1/two_level.py Wed Nov 09 14:27:40 2016 -0600
@@ -133,7 +133,7 @@
system.mem_ctrl.port = system.membus.master
# Create a process for a simple "Hello World" application
-process = LiveProcess()
+process = Process()
# Set the command
# cmd is a list which begins with the executable (like argv)
process.cmd = [binary]
diff -r 36119fa7874d -r 824055fe6b30 configs/splash2/cluster.py
--- a/configs/splash2/cluster.py Fri Feb 17 12:01:51 2017 -0500
+++ b/configs/splash2/cluster.py Wed Nov 09 14:27:40 2016 -0600
@@ -76,56 +76,56 @@
# --------------------
# Define Splash2 Benchmarks
# ====================
-class Cholesky(LiveProcess):
+class Cholesky(Process):
executable = options.rootdir + '/kernels/cholesky/CHOLESKY'
cmd = 'CHOLESKY -p' + str(options.numcpus) + ' '\
+ options.rootdir + '/kernels/cholesky/inputs/tk23.O'
-class FFT(LiveProcess):
+class FFT(Process):
executable = options.rootdir + 'kernels/fft/FFT'
cmd = 'FFT -p' + str(options.numcpus) + ' -m18'
-class LU_contig(LiveProcess):
+class LU_contig(Process):
executable = options.rootdir + 'kernels/lu/contiguous_blocks/LU'
cmd = 'LU -p' + str(options.numcpus)
-class LU_noncontig(LiveProcess):
+class LU_noncontig(Process):
executable = options.rootdir + 'kernels/lu/non_contiguous_blocks/LU'
cmd = 'LU -p' + str(options.numcpus)
-class Radix(LiveProcess):
+class Radix(Process):
executable = options.rootdir + 'kernels/radix/RADIX'
cmd = 'RADIX -n524288 -p' + str(options.numcpus)
-class Barnes(LiveProcess):
+class Barnes(Process):
executable = options.rootdir + 'apps/barnes/BARNES'
cmd = 'BARNES'
input = options.rootdir + 'apps/barnes/input.p' + str(options.numcpus)
-class FMM(LiveProcess):
+class FMM(Process):
executable = options.rootdir + 'apps/fmm/FMM'
cmd = 'FMM'
input = options.rootdir + 'apps/fmm/inputs/input.2048.p' +
str(options.numcpus)
-class Ocean_contig(LiveProcess):
+class Ocean_contig(Process):
executable = options.rootdir + 'apps/ocean/contiguous_partitions/OCEAN'
cmd = 'OCEAN -p' + str(options.numcpus)
-class Ocean_noncontig(LiveProcess):
+class Ocean_noncontig(Process):
executable = options.rootdir +
'apps/ocean/non_contiguous_partitions/OCEAN'
cmd = 'OCEAN -p' + str(options.numcpus)
-class Raytrace(LiveProcess):
+class Raytrace(Process):
executable = options.rootdir + 'apps/raytrace/RAYTRACE'
cmd = 'RAYTRACE -p' + str(options.numcpus) + ' ' \
+ options.rootdir + 'apps/raytrace/inputs/teapot.env'
-class Water_nsquared(LiveProcess):
+class Water_nsquared(Process):
executable = options.rootdir + 'apps/water-nsquared/WATER-NSQUARED'
cmd = 'WATER-NSQUARED'
input = options.rootdir + 'apps/water-nsquared/input.p' +
str(options.numcpus)
-class Water_spatial(LiveProcess):
+class Water_spatial(Process):
executable = options.rootdir + 'apps/water-spatial/WATER-SPATIAL'
cmd = 'WATER-SPATIAL'
input = options.rootdir + 'apps/water-spatial/input.p' +
str(options.numcpus)
diff -r 36119fa7874d -r 824055fe6b30 configs/splash2/run.py
--- a/configs/splash2/run.py Fri Feb 17 12:01:51 2017 -0500
+++ b/configs/splash2/run.py Wed Nov 09 14:27:40 2016 -0600
@@ -77,39 +77,39 @@
# --------------------
# Define Splash2 Benchmarks
# ====================
-class Cholesky(LiveProcess):
+class Cholesky(Process):
cwd = options.rootdir + '/kernels/cholesky'
executable = options.rootdir + '/kernels/cholesky/CHOLESKY'
cmd = ['CHOLESKY', '-p' + str(options.numcpus),
options.rootdir + '/kernels/cholesky/inputs/tk23.O']
-class FFT(LiveProcess):
+class FFT(Process):
cwd = options.rootdir + '/kernels/fft'
executable = options.rootdir + '/kernels/fft/FFT'
cmd = ['FFT', '-p', str(options.numcpus), '-m18']
-class LU_contig(LiveProcess):
+class LU_contig(Process):
executable = options.rootdir + '/kernels/lu/contiguous_blocks/LU'
cmd = ['LU', '-p', str(options.numcpus)]
cwd = options.rootdir + '/kernels/lu/contiguous_blocks'
-class LU_noncontig(LiveProcess):
+class LU_noncontig(Process):
executable = options.rootdir + '/kernels/lu/non_contiguous_blocks/LU'
cmd = ['LU', '-p', str(options.numcpus)]
cwd = options.rootdir + '/kernels/lu/non_contiguous_blocks'
-class Radix(LiveProcess):
+class Radix(Process):
executable = options.rootdir + '/kernels/radix/RADIX'
cmd = ['RADIX', '-n524288', '-p', str(options.numcpus)]
cwd = options.rootdir + '/kernels/radix'
-class Barnes(LiveProcess):
+class Barnes(Process):
executable = options.rootdir + '/apps/barnes/BARNES'
cmd = ['BARNES']
input = options.rootdir + '/apps/barnes/input.p' + str(options.numcpus)
cwd = options.rootdir + '/apps/barnes'
-class FMM(LiveProcess):
+class FMM(Process):
executable = options.rootdir + '/apps/fmm/FMM'
cmd = ['FMM']
if str(options.numcpus) == '1':
@@ -118,23 +118,23 @@
input = options.rootdir + '/apps/fmm/inputs/input.2048.p' +
str(options.numcpus)
cwd = options.rootdir + '/apps/fmm'
-class Ocean_contig(LiveProcess):
+class Ocean_contig(Process):
executable = options.rootdir + '/apps/ocean/contiguous_partitions/OCEAN'
cmd = ['OCEAN', '-p', str(options.numcpus)]
cwd = options.rootdir + '/apps/ocean/contiguous_partitions'
-class Ocean_noncontig(LiveProcess):
+class Ocean_noncontig(Process):
executable = options.rootdir +
'/apps/ocean/non_contiguous_partitions/OCEAN'
cmd = ['OCEAN', '-p', str(options.numcpus)]
cwd = options.rootdir + '/apps/ocean/non_contiguous_partitions'
-class Raytrace(LiveProcess):
+class Raytrace(Process):
executable = options.rootdir + '/apps/raytrace/RAYTRACE'
cmd = ['RAYTRACE', '-p' + str(options.numcpus),
options.rootdir + '/apps/raytrace/inputs/teapot.env']
cwd = options.rootdir + '/apps/raytrace'
-class Water_nsquared(LiveProcess):
+class Water_nsquared(Process):
executable = options.rootdir + '/apps/water-nsquared/WATER-NSQUARED'
cmd = ['WATER-NSQUARED']
if options.numcpus==1:
@@ -143,7 +143,7 @@
input = options.rootdir + '/apps/water-nsquared/input.p' +
str(options.numcpus)
cwd = options.rootdir + '/apps/water-nsquared'
-class Water_spatial(LiveProcess):
+class Water_spatial(Process):
executable = options.rootdir + '/apps/water-spatial/WATER-SPATIAL'
cmd = ['WATER-SPATIAL']
if options.numcpus==1:
diff -r 36119fa7874d -r 824055fe6b30 src/arch/alpha/linux/process.cc
--- a/src/arch/alpha/linux/process.cc Fri Feb 17 12:01:51 2017 -0500
+++ b/src/arch/alpha/linux/process.cc Wed Nov 09 14:27:40 2016 -0600
@@ -46,7 +46,7 @@
/// Target uname() handler.
static SyscallReturn
-unameFunc(SyscallDesc *desc, int callnum, LiveProcess *process,
+unameFunc(SyscallDesc *desc, int callnum, Process *process,
ThreadContext *tc)
{
int index = 0;
@@ -66,7 +66,7 @@
/// borrowed from Tru64, the subcases that get used appear to be
/// different in practice from those used by Tru64 processes.
static SyscallReturn
-osf_getsysinfoFunc(SyscallDesc *desc, int callnum, LiveProcess *process,
+osf_getsysinfoFunc(SyscallDesc *desc, int callnum, Process *process,
ThreadContext *tc)
{
int index = 0;
@@ -95,7 +95,7 @@
/// Target osf_setsysinfo() handler.
static SyscallReturn
-osf_setsysinfoFunc(SyscallDesc *desc, int callnum, LiveProcess *process,
+osf_setsysinfoFunc(SyscallDesc *desc, int callnum, Process *process,
ThreadContext *tc)
{
int index = 0;
@@ -572,9 +572,9 @@
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev