Merge "misc: Merge branch 'release-staging-v21-1' into develop" into develop

This commit is contained in:
Jason Lowe-Power
2021-07-30 04:44:09 +00:00
15 changed files with 377 additions and 50 deletions

View File

@@ -31,7 +31,7 @@ PROJECT_NAME = gem5
# This could be handy for archiving the generated documentation or
# if some version control system is used.
PROJECT_NUMBER = DEVELOP-FOR-v21.1
PROJECT_NUMBER = v21.1.0.0
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
# base path where the generated documentation will be put.

View File

@@ -36314,7 +36314,7 @@ namespace Gcn3ISA
gpuDynInst->computeUnit()->globalMemoryPipe.
issueRequest(gpuDynInst);
} else {
fatal("Non global flat instructions not implemented yet.\n");
fatal("Unsupported scope for flat instruction.\n");
}
}
@@ -36363,7 +36363,7 @@ namespace Gcn3ISA
gpuDynInst->computeUnit()->globalMemoryPipe.
issueRequest(gpuDynInst);
} else {
fatal("Non global flat instructions not implemented yet.\n");
fatal("Unsupported scope for flat instruction.\n");
}
}
void
@@ -39384,8 +39384,11 @@ namespace Gcn3ISA
if (gpuDynInst->executedAs() == enums::SC_GLOBAL) {
gpuDynInst->computeUnit()->globalMemoryPipe
.issueRequest(gpuDynInst);
} else if (gpuDynInst->executedAs() == enums::SC_GROUP) {
gpuDynInst->computeUnit()->localMemoryPipe
.issueRequest(gpuDynInst);
} else {
fatal("Non global flat instructions not implemented yet.\n");
fatal("Unsupported scope for flat instruction.\n");
}
} // execute
@@ -39448,8 +39451,11 @@ namespace Gcn3ISA
if (gpuDynInst->executedAs() == enums::SC_GLOBAL) {
gpuDynInst->computeUnit()->globalMemoryPipe
.issueRequest(gpuDynInst);
} else if (gpuDynInst->executedAs() == enums::SC_GROUP) {
gpuDynInst->computeUnit()->localMemoryPipe
.issueRequest(gpuDynInst);
} else {
fatal("Non global flat instructions not implemented yet.\n");
fatal("Unsupported scope for flat instruction.\n");
}
}
@@ -39511,8 +39517,11 @@ namespace Gcn3ISA
if (gpuDynInst->executedAs() == enums::SC_GLOBAL) {
gpuDynInst->computeUnit()->globalMemoryPipe
.issueRequest(gpuDynInst);
} else if (gpuDynInst->executedAs() == enums::SC_GROUP) {
gpuDynInst->computeUnit()->localMemoryPipe
.issueRequest(gpuDynInst);
} else {
fatal("Non global flat instructions not implemented yet.\n");
fatal("Unsupported scope for flat instruction.\n");
}
}
@@ -39603,8 +39612,11 @@ namespace Gcn3ISA
if (gpuDynInst->executedAs() == enums::SC_GLOBAL) {
gpuDynInst->computeUnit()->globalMemoryPipe
.issueRequest(gpuDynInst);
} else if (gpuDynInst->executedAs() == enums::SC_GROUP) {
gpuDynInst->computeUnit()->localMemoryPipe
.issueRequest(gpuDynInst);
} else {
fatal("Non global flat instructions not implemented yet.\n");
fatal("Unsupported scope for flat instruction.\n");
}
}
@@ -39667,8 +39679,11 @@ namespace Gcn3ISA
if (gpuDynInst->executedAs() == enums::SC_GLOBAL) {
gpuDynInst->computeUnit()->globalMemoryPipe
.issueRequest(gpuDynInst);
} else if (gpuDynInst->executedAs() == enums::SC_GROUP) {
gpuDynInst->computeUnit()->localMemoryPipe
.issueRequest(gpuDynInst);
} else {
fatal("Non global flat instructions not implemented yet.\n");
fatal("Unsupported scope for flat instruction.\n");
}
}
@@ -39731,8 +39746,11 @@ namespace Gcn3ISA
if (gpuDynInst->executedAs() == enums::SC_GLOBAL) {
gpuDynInst->computeUnit()->globalMemoryPipe
.issueRequest(gpuDynInst);
} else if (gpuDynInst->executedAs() == enums::SC_GROUP) {
gpuDynInst->computeUnit()->localMemoryPipe
.issueRequest(gpuDynInst);
} else {
fatal("Non global flat instructions not implemented yet.\n");
fatal("Unsupported scope for flat instruction.\n");
}
}
@@ -39804,8 +39822,11 @@ namespace Gcn3ISA
if (gpuDynInst->executedAs() == enums::SC_GLOBAL) {
gpuDynInst->computeUnit()->globalMemoryPipe
.issueRequest(gpuDynInst);
} else if (gpuDynInst->executedAs() == enums::SC_GROUP) {
gpuDynInst->computeUnit()->localMemoryPipe
.issueRequest(gpuDynInst);
} else {
fatal("Non global flat instructions not implemented yet.\n");
fatal("Unsupported scope for flat instruction.\n");
}
}
@@ -39889,8 +39910,11 @@ namespace Gcn3ISA
if (gpuDynInst->executedAs() == enums::SC_GLOBAL) {
gpuDynInst->computeUnit()->globalMemoryPipe
.issueRequest(gpuDynInst);
} else if (gpuDynInst->executedAs() == enums::SC_GROUP) {
gpuDynInst->computeUnit()->localMemoryPipe
.issueRequest(gpuDynInst);
} else {
fatal("Non global flat instructions not implemented yet.\n");
fatal("Unsupported scope for flat instruction.\n");
}
} // execute
@@ -39952,8 +39976,11 @@ namespace Gcn3ISA
if (gpuDynInst->executedAs() == enums::SC_GLOBAL) {
gpuDynInst->computeUnit()->globalMemoryPipe
.issueRequest(gpuDynInst);
} else if (gpuDynInst->executedAs() == enums::SC_GROUP) {
gpuDynInst->computeUnit()->localMemoryPipe
.issueRequest(gpuDynInst);
} else {
fatal("Non global flat instructions not implemented yet.\n");
fatal("Unsupported scope for flat instruction.\n");
}
}
@@ -40015,8 +40042,11 @@ namespace Gcn3ISA
if (gpuDynInst->executedAs() == enums::SC_GLOBAL) {
gpuDynInst->computeUnit()->globalMemoryPipe
.issueRequest(gpuDynInst);
} else if (gpuDynInst->executedAs() == enums::SC_GROUP) {
gpuDynInst->computeUnit()->localMemoryPipe
.issueRequest(gpuDynInst);
} else {
fatal("Non global flat instructions not implemented yet.\n");
fatal("Unsupported scope for flat instruction.\n");
}
}
@@ -40079,8 +40109,11 @@ namespace Gcn3ISA
if (gpuDynInst->executedAs() == enums::SC_GLOBAL) {
gpuDynInst->computeUnit()->globalMemoryPipe
.issueRequest(gpuDynInst);
} else if (gpuDynInst->executedAs() == enums::SC_GROUP) {
gpuDynInst->computeUnit()->localMemoryPipe
.issueRequest(gpuDynInst);
} else {
fatal("Non global flat instructions not implemented yet.\n");
fatal("Unsupported scope for flat instruction.\n");
}
}
@@ -40151,8 +40184,11 @@ namespace Gcn3ISA
if (gpuDynInst->executedAs() == enums::SC_GLOBAL) {
gpuDynInst->computeUnit()->globalMemoryPipe
.issueRequest(gpuDynInst);
} else if (gpuDynInst->executedAs() == enums::SC_GROUP) {
gpuDynInst->computeUnit()->localMemoryPipe
.issueRequest(gpuDynInst);
} else {
fatal("Non global flat instructions not implemented yet.\n");
fatal("Unsupported scope for flat instruction.\n");
}
}
@@ -40227,8 +40263,11 @@ namespace Gcn3ISA
if (gpuDynInst->executedAs() == enums::SC_GLOBAL) {
gpuDynInst->computeUnit()->globalMemoryPipe
.issueRequest(gpuDynInst);
} else if (gpuDynInst->executedAs() == enums::SC_GROUP) {
gpuDynInst->computeUnit()->localMemoryPipe
.issueRequest(gpuDynInst);
} else {
fatal("Non global flat instructions not implemented yet.\n");
fatal("Unsupported scope for flat instruction.\n");
}
}
@@ -40294,8 +40333,11 @@ namespace Gcn3ISA
"Flats to private aperture not tested yet\n");
gpuDynInst->computeUnit()->globalMemoryPipe.
issueRequest(gpuDynInst);
} else if (gpuDynInst->executedAs() == enums::SC_GROUP) {
gpuDynInst->computeUnit()->localMemoryPipe
.issueRequest(gpuDynInst);
} else {
fatal("Non global flat instructions not implemented yet.\n");
fatal("Unsupported scope for flat instruction.\n");
}
ConstVecOperandU32 data(gpuDynInst, extData.DATA);
@@ -40408,8 +40450,11 @@ namespace Gcn3ISA
"Flats to private aperture not tested yet\n");
gpuDynInst->computeUnit()->globalMemoryPipe.
issueRequest(gpuDynInst);
} else if (gpuDynInst->executedAs() == enums::SC_GROUP) {
gpuDynInst->computeUnit()->localMemoryPipe
.issueRequest(gpuDynInst);
} else {
fatal("Non global flat instructions not implemented yet.\n");
fatal("Unsupported scope for flat instruction.\n");
}
}
@@ -40492,8 +40537,11 @@ namespace Gcn3ISA
if (gpuDynInst->executedAs() == enums::SC_GLOBAL) {
gpuDynInst->computeUnit()->globalMemoryPipe.
issueRequest(gpuDynInst);
} else if (gpuDynInst->executedAs() == enums::SC_GROUP) {
gpuDynInst->computeUnit()->localMemoryPipe
.issueRequest(gpuDynInst);
} else {
fatal("Non global flat instructions not implemented yet.\n");
fatal("Unsupported scope for flat instruction.\n");
}
}
@@ -40576,8 +40624,11 @@ namespace Gcn3ISA
if (gpuDynInst->executedAs() == enums::SC_GLOBAL) {
gpuDynInst->computeUnit()->globalMemoryPipe.
issueRequest(gpuDynInst);
} else if (gpuDynInst->executedAs() == enums::SC_GROUP) {
gpuDynInst->computeUnit()->localMemoryPipe
.issueRequest(gpuDynInst);
} else {
fatal("Non global flat instructions not implemented yet.\n");
fatal("Unsupported scope for flat instruction.\n");
}
}
void
@@ -40834,8 +40885,11 @@ namespace Gcn3ISA
if (gpuDynInst->executedAs() == enums::SC_GLOBAL) {
gpuDynInst->computeUnit()->globalMemoryPipe.
issueRequest(gpuDynInst);
} else if (gpuDynInst->executedAs() == enums::SC_GROUP) {
gpuDynInst->computeUnit()->localMemoryPipe
.issueRequest(gpuDynInst);
} else {
fatal("Non global flat instructions not implemented yet.\n");
fatal("Unsupported scope for flat instruction.\n");
}
}
@@ -40918,8 +40972,11 @@ namespace Gcn3ISA
if (gpuDynInst->executedAs() == enums::SC_GLOBAL) {
gpuDynInst->computeUnit()->globalMemoryPipe.
issueRequest(gpuDynInst);
} else if (gpuDynInst->executedAs() == enums::SC_GROUP) {
gpuDynInst->computeUnit()->localMemoryPipe
.issueRequest(gpuDynInst);
} else {
fatal("Non global flat instructions not implemented yet.\n");
fatal("Unsupported scope for flat instruction.\n");
}
}
@@ -41044,8 +41101,11 @@ namespace Gcn3ISA
"Flats to private aperture not tested yet\n");
gpuDynInst->computeUnit()->globalMemoryPipe.
issueRequest(gpuDynInst);
} else if (gpuDynInst->executedAs() == enums::SC_GROUP) {
gpuDynInst->computeUnit()->localMemoryPipe
.issueRequest(gpuDynInst);
} else {
fatal("Non global flat instructions not implemented yet.\n");
fatal("Unsupported scope for flat instruction.\n");
}
}
@@ -41129,8 +41189,11 @@ namespace Gcn3ISA
if (gpuDynInst->executedAs() == enums::SC_GLOBAL) {
gpuDynInst->computeUnit()->globalMemoryPipe.
issueRequest(gpuDynInst);
} else if (gpuDynInst->executedAs() == enums::SC_GROUP) {
gpuDynInst->computeUnit()->localMemoryPipe
.issueRequest(gpuDynInst);
} else {
fatal("Non global flat instructions not implemented yet.\n");
fatal("Unsupported scope for flat instruction.\n");
}
}
@@ -41215,8 +41278,11 @@ namespace Gcn3ISA
if (gpuDynInst->executedAs() == enums::SC_GLOBAL) {
gpuDynInst->computeUnit()->globalMemoryPipe.
issueRequest(gpuDynInst);
} else if (gpuDynInst->executedAs() == enums::SC_GROUP) {
gpuDynInst->computeUnit()->localMemoryPipe
.issueRequest(gpuDynInst);
} else {
fatal("Non global flat instructions not implemented yet.\n");
fatal("Unsupported scope for flat instruction.\n");
}
}
@@ -41483,8 +41549,11 @@ namespace Gcn3ISA
if (gpuDynInst->executedAs() == enums::SC_GLOBAL) {
gpuDynInst->computeUnit()->globalMemoryPipe.
issueRequest(gpuDynInst);
} else if (gpuDynInst->executedAs() == enums::SC_GROUP) {
gpuDynInst->computeUnit()->localMemoryPipe
.issueRequest(gpuDynInst);
} else {
fatal("Non global flat instructions not implemented yet.\n");
fatal("Unsupported scope for flat instruction.\n");
}
}
@@ -41570,8 +41639,11 @@ namespace Gcn3ISA
if (gpuDynInst->executedAs() == enums::SC_GLOBAL) {
gpuDynInst->computeUnit()->globalMemoryPipe.
issueRequest(gpuDynInst);
} else if (gpuDynInst->executedAs() == enums::SC_GROUP) {
gpuDynInst->computeUnit()->localMemoryPipe
.issueRequest(gpuDynInst);
} else {
fatal("Non global flat instructions not implemented yet.\n");
fatal("Unsupported scope for flat instruction.\n");
}
}

View File

@@ -1277,12 +1277,12 @@ namespace Gcn3ISA
reg = extData.SRSRC;
srcOps.emplace_back(reg, getOperandSize(opNum), true,
true, false, false);
isScalarReg(reg), false, false);
opNum++;
reg = extData.SOFFSET;
srcOps.emplace_back(reg, getOperandSize(opNum), true,
true, false, false);
isScalarReg(reg), false, false);
opNum++;
}
@@ -1368,12 +1368,12 @@ namespace Gcn3ISA
reg = extData.SRSRC;
srcOps.emplace_back(reg, getOperandSize(opNum), true,
true, false, false);
isScalarReg(reg), false, false);
opNum++;
reg = extData.SOFFSET;
srcOps.emplace_back(reg, getOperandSize(opNum), true,
true, false, false);
isScalarReg(reg), false, false);
opNum++;
// extData.VDATA moves in the reg list depending on the instruction
@@ -1441,13 +1441,13 @@ namespace Gcn3ISA
reg = extData.SRSRC;
srcOps.emplace_back(reg, getOperandSize(opNum), true,
true, false, false);
isScalarReg(reg), false, false);
opNum++;
if (getNumOperands() == 4) {
reg = extData.SSAMP;
srcOps.emplace_back(reg, getOperandSize(opNum), true,
true, false, false);
isScalarReg(reg), false, false);
opNum++;
}

View File

@@ -799,35 +799,107 @@ namespace Gcn3ISA
void
initMemRead(GPUDynInstPtr gpuDynInst)
{
initMemReqHelper<T, 1>(gpuDynInst, MemCmd::ReadReq);
if (gpuDynInst->executedAs() == enums::SC_GLOBAL) {
initMemReqHelper<T, 1>(gpuDynInst, MemCmd::ReadReq);
} else if (gpuDynInst->executedAs() == enums::SC_GROUP) {
Wavefront *wf = gpuDynInst->wavefront();
for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
if (gpuDynInst->exec_mask[lane]) {
Addr vaddr = gpuDynInst->addr[lane];
(reinterpret_cast<T*>(gpuDynInst->d_data))[lane]
= wf->ldsChunk->read<T>(vaddr);
}
}
}
}
template<int N>
void
initMemRead(GPUDynInstPtr gpuDynInst)
{
initMemReqHelper<VecElemU32, N>(gpuDynInst, MemCmd::ReadReq);
if (gpuDynInst->executedAs() == enums::SC_GLOBAL) {
initMemReqHelper<VecElemU32, N>(gpuDynInst, MemCmd::ReadReq);
} else if (gpuDynInst->executedAs() == enums::SC_GROUP) {
Wavefront *wf = gpuDynInst->wavefront();
for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
if (gpuDynInst->exec_mask[lane]) {
Addr vaddr = gpuDynInst->addr[lane];
for (int i = 0; i < N; ++i) {
(reinterpret_cast<VecElemU32*>(
gpuDynInst->d_data))[lane * N + i]
= wf->ldsChunk->read<VecElemU32>(
vaddr + i*sizeof(VecElemU32));
}
}
}
}
}
template<typename T>
void
initMemWrite(GPUDynInstPtr gpuDynInst)
{
initMemReqHelper<T, 1>(gpuDynInst, MemCmd::WriteReq);
if (gpuDynInst->executedAs() == enums::SC_GLOBAL) {
initMemReqHelper<T, 1>(gpuDynInst, MemCmd::WriteReq);
} else if (gpuDynInst->executedAs() == enums::SC_GROUP) {
Wavefront *wf = gpuDynInst->wavefront();
for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
if (gpuDynInst->exec_mask[lane]) {
Addr vaddr = gpuDynInst->addr[lane];
wf->ldsChunk->write<T>(vaddr,
(reinterpret_cast<T*>(gpuDynInst->d_data))[lane]);
}
}
}
}
template<int N>
void
initMemWrite(GPUDynInstPtr gpuDynInst)
{
initMemReqHelper<VecElemU32, N>(gpuDynInst, MemCmd::WriteReq);
if (gpuDynInst->executedAs() == enums::SC_GLOBAL) {
initMemReqHelper<VecElemU32, N>(gpuDynInst, MemCmd::WriteReq);
} else if (gpuDynInst->executedAs() == enums::SC_GROUP) {
Wavefront *wf = gpuDynInst->wavefront();
for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
if (gpuDynInst->exec_mask[lane]) {
Addr vaddr = gpuDynInst->addr[lane];
for (int i = 0; i < N; ++i) {
wf->ldsChunk->write<VecElemU32>(
vaddr + i*sizeof(VecElemU32),
(reinterpret_cast<VecElemU32*>(
gpuDynInst->d_data))[lane * N + i]);
}
}
}
}
}
template<typename T>
void
initAtomicAccess(GPUDynInstPtr gpuDynInst)
{
initMemReqHelper<T, 1>(gpuDynInst, MemCmd::SwapReq, true);
if (gpuDynInst->executedAs() == enums::SC_GLOBAL) {
initMemReqHelper<T, 1>(gpuDynInst, MemCmd::SwapReq, true);
} else if (gpuDynInst->executedAs() == enums::SC_GROUP) {
Wavefront *wf = gpuDynInst->wavefront();
for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
if (gpuDynInst->exec_mask[lane]) {
Addr vaddr = gpuDynInst->addr[lane];
AtomicOpFunctor* amo_op =
gpuDynInst->makeAtomicOpFunctor<T>(
&(reinterpret_cast<T*>(
gpuDynInst->a_data))[lane],
&(reinterpret_cast<T*>(
gpuDynInst->x_data))[lane]).get();
T tmp = wf->ldsChunk->read<T>(vaddr);
(*amo_op)(reinterpret_cast<uint8_t *>(&tmp));
wf->ldsChunk->write<T>(vaddr, tmp);
(reinterpret_cast<T*>(gpuDynInst->d_data))[lane] = tmp;
}
}
}
}
void

View File

@@ -32,6 +32,6 @@ namespace gem5
/**
* @ingroup api_base_utils
*/
const char *gem5Version = "[DEVELOP-FOR-V21.01]";
const char *gem5Version = "21.1.0.0";
} // namespace gem5

View File

@@ -834,7 +834,10 @@ GPUDynInst::resolveFlatSegment(const VectorMask &mask)
if (mask[lane]) {
// flat address calculation goes here.
// addr[lane] = segmented address
panic("Flat group memory operation is unimplemented!\n");
addr[lane] = addr[lane] -
wavefront()->computeUnit->shader->ldsApe().base;
assert(addr[lane] <
wavefront()->computeUnit->getLds().getAddrRange().size());
}
}
wavefront()->execUnitId = wavefront()->flatLmUnitId;

View File

@@ -76,6 +76,11 @@ LocalMemPipeline::exec()
lmReturnedRequests.pop();
w = m->wavefront();
if (m->isFlat() && !m->isMemSync() && !m->isEndOfKernel()
&& m->allLanesZero()) {
computeUnit.getTokenManager()->recvTokens(1);
}
DPRINTF(GPUMem, "CU%d: WF[%d][%d]: Completing local mem instr %s\n",
m->cu_id, m->simdId, m->wfSlotId, m->disassemble());
m->completeAcc(m);

View File

@@ -174,6 +174,9 @@ Process::clone(ThreadContext *otc, ThreadContext *ntc,
#endif
#ifndef CLONE_THREAD
#define CLONE_THREAD 0
#endif
#ifndef CLONE_VFORK
#define CLONE_VFORK 0
#endif
if (CLONE_VM & flags) {
/**
@@ -249,6 +252,10 @@ Process::clone(ThreadContext *otc, ThreadContext *ntc,
np->exitGroup = exitGroup;
}
if (CLONE_VFORK & flags) {
np->vforkContexts.push_back(otc->contextId());
}
np->argv.insert(np->argv.end(), argv.begin(), argv.end());
np->envp.insert(np->envp.end(), envp.begin(), envp.end());
}

View File

@@ -284,6 +284,9 @@ class Process : public SimObject
// Process was forked with SIGCHLD set.
bool *sigchld;
// Contexts to wake up when this thread exits or calls execve
std::vector<ContextID> vforkContexts;
// Track how many system calls are executed
statistics::Scalar numSyscalls;
};

View File

@@ -194,6 +194,16 @@ exitImpl(SyscallDesc *desc, ThreadContext *tc, bool group, int status)
}
}
/**
* If we were a thread created by a clone with vfork set, wake up
* the thread that created us
*/
if (!p->vforkContexts.empty()) {
ThreadContext *vtc = sys->threads[p->vforkContexts.front()];
assert(vtc->status() == ThreadContext::Suspended);
vtc->activate();
}
tc->halt();
/**

View File

@@ -1453,6 +1453,7 @@ cloneFunc(SyscallDesc *desc, ThreadContext *tc, RegVal flags, RegVal newStack,
pp->euid = p->euid();
pp->gid = p->gid();
pp->egid = p->egid();
pp->release = p->release;
/* Find the first free PID that's less than the maximum */
std::set<int> const& pids = p->system->PIDs;
@@ -1521,6 +1522,10 @@ cloneFunc(SyscallDesc *desc, ThreadContext *tc, RegVal flags, RegVal newStack,
ctc->pcState(cpc);
ctc->activate();
if (flags & OS::TGT_CLONE_VFORK) {
tc->suspend();
}
return cp->pid();
}
@@ -1997,6 +2002,16 @@ execveFunc(SyscallDesc *desc, ThreadContext *tc,
}
};
/**
* If we were a thread created by a clone with vfork set, wake up
* the thread that created us
*/
if (!p->vforkContexts.empty()) {
ThreadContext *vtc = p->system->threads[p->vforkContexts.front()];
assert(vtc->status() == ThreadContext::Suspended);
vtc->activate();
}
/**
* Note that ProcessParams is generated by swig and there are no other
* examples of how to create anything but this default constructor. The
@@ -2018,6 +2033,7 @@ execveFunc(SyscallDesc *desc, ThreadContext *tc,
pp->errout.assign("cerr");
pp->cwd.assign(p->tgtCwd);
pp->system = p->system;
pp->release = p->release;
/**
* Prevent process object creation with identical PIDs (which will trip
* a fatal check in Process constructor). The execve call is supposed to
@@ -2028,7 +2044,9 @@ execveFunc(SyscallDesc *desc, ThreadContext *tc,
*/
p->system->PIDs.erase(p->pid());
Process *new_p = pp->create();
delete pp;
// TODO: there is no way to know when the Process SimObject is done with
// the params pointer. Both the params pointer (pp) and the process
// pointer (p) are normally managed in python and are never cleaned up.
/**
* Work through the file descriptor array and close any files marked
@@ -2043,10 +2061,10 @@ execveFunc(SyscallDesc *desc, ThreadContext *tc,
*new_p->sigchld = true;
delete p;
tc->clearArchRegs();
tc->setProcessPtr(new_p);
new_p->assignThreadContext(tc->contextId());
new_p->init();
new_p->initState();
tc->activate();
TheISA::PCState pcState = tc->pcState();