> On Oct. 17, 2016, 2:15 p.m., Jason Lowe-Power wrote: > > With this patch, if you run multiple processes in SE mode they all have the > > same PID (100) by default. Will this cause issues? I haven't tested a > > pthreads application, but that seems like it might cause problems. > > > > Would you just suggest that we make sure to assign different PIDs in the > > Python config file (where we create the Process object) to get around this > > issue? If so, we should have a fatal if there are multiple Processes with > > the same PID. > > Brandon Potter wrote: > I have another patch that I haven't posted yet that used to rely on the > incrementing PID that I deleted here. I haven't figured out how I want to > address the issue yet. The two obvious ways are to make the changes in Python > or make the changes in C++ and use the counter to increment the value when > new Process classes are created. I think that I might have to use the > incrementing version with clone and I might add that functionality back in > with C++, but I'll increment the _pid field that you see here in this patch > rather than having nextPID, M5_pid, and _pid. We don't need several versions > of the same thing to make it work.
One option from the Python side is to use a static class variable in Process.py to automatically assign it. I think there's an example of this in configs/topologies/Cluster.py (and other places, too). - Jason ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://reviews.gem5.org/r/3670/#review8858 ----------------------------------------------------------- On Oct. 17, 2016, 1:06 p.m., Brandon Potter wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > http://reviews.gem5.org/r/3670/ > ----------------------------------------------------------- > > (Updated Oct. 17, 2016, 1:06 p.m.) > > > Review request for Default. > > > Repository: gem5 > > > Description > ------- > > Changeset 11692:b3d8b57ab6a7 > --------------------------- > syscall_emul: remove redundant M5_pid field from process class > > > Diffs > ----- > > src/arch/alpha/process.cc 4a86763c0b30cccba0f56c7f48637a46a4663b06 > src/arch/sparc/faults.cc 4a86763c0b30cccba0f56c7f48637a46a4663b06 > src/sim/Process.py 4a86763c0b30cccba0f56c7f48637a46a4663b06 > src/sim/process.hh 4a86763c0b30cccba0f56c7f48637a46a4663b06 > src/sim/process.cc 4a86763c0b30cccba0f56c7f48637a46a4663b06 > src/sim/system.hh 4a86763c0b30cccba0f56c7f48637a46a4663b06 > src/sim/system.cc 4a86763c0b30cccba0f56c7f48637a46a4663b06 > > Diff: http://reviews.gem5.org/r/3670/diff/ > > > Testing > ------- > > > Thanks, > > Brandon Potter > > _______________________________________________ gem5-dev mailing list gem5-dev@gem5.org http://m5sim.org/mailman/listinfo/gem5-dev