Review Board 2.0.15


Trace: Allow printing ASIDs and selectively tracing based on user/kernel code.

Review Request #678 - Created May 4, 2011 and submitted

Information
Ali Saidi
gem5
Reviewers
Default
ali, gblack, nate, stever
Trace: Allow printing ASIDs and selectively tracing based on user/kernel code.

Debug flags are ExecUser, ExecKernel, and ExecAsid. ExecUser and
ExecKernel are set by default when Exec is specified.  Use minus
sign with ExecUser or ExecKernel to remove user or kernel tracing
respectively.

   
Ship it!
Posted (May 4, 2011, 1:20 p.m.)
looks reasonable to me.  I assume that it works.
Posted (May 4, 2011, 2 p.m.)



  
src/cpu/exetrace.cc (Diff revision 1)
 
 
Maybe put these ifs together with an or? It's not hugely better since the body is so short, but it's something to consider.
  1. It ends up being an extra line and no less clear, but it can be done. 
Posted (May 4, 2011, 2:08 p.m.)



  
  1. CR3 might work. Does the kernel change it on every context switch (user program)? The main reason for having it is when tracing user code the kernel can context switch on you. If you want to see all the code that was executed in a process and compare it to what it should have executed you need some kind of identifier to disambiguate processess. The ASID is an easy way to do this, while rooting around in the Linux process structure is annoying.
src/cpu/SConscript (Diff revision 1)
 
 
This isn't from your change, but should this be missing ExecSymbol? We don't really need this flag in any case since you can just use Exec and turn off ExecTicks.
  1. You're right, I didn't even realize. I always do Exec,-ExecTicks. Leave it, delete it, add it?