Hello,
I am running a SPEC2006 multiprogrammed workload in Full System mode on
X86. My overall goal is to figure out how many instructions each individual
process has executed. For example, if I am running 4 applications on a
single core, I want to know how much "work" each application did compared
to the others.
Previous similar posts have led me to look at src/arch/x86/stacktrace.cc
where there seem to be functions which return the process name and process
ID. To do a simple test, I was thinking to put a snippet of code such as
this inside the access function in src/mem/cache/cache_impl.hh:
ThreadContext *tc = system->getThreadContext(pkt->req->threadId());
Addr stackPtr = tc->readIntReg(30);
X86ISA::ProcessInfo* procInfo = new X86ISA::ProcessInfo(tc);
int pid = procInfo->pid(stackPtr);
printf("\npid: %d\n", pid);
printf("name: %s\n", procInfo->name(stackPtr).c_str());
delete procInfo;
However, I am unsure what number to pass to readIntReg, i.e. the x86 stack
pointer register. I would probably also need to figure out when context
switches occur in order to figure out how many instructions each process
has executed.
Any help would be greatly appreciated!
Thank you,
Ivan
_______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users