Re: [m5-dev] Review Request: Trace: Allow printing ASIDs and selectively tracing based on user/kernel code.

2011-05-09 Thread Gabe Black
On 05/04/11 22:17, Ali Saidi wrote:

 On 2011-05-04 21:08:25, Gabe Black wrote:
 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.


 On 2011-05-04 21:08:25, Gabe Black wrote:
 src/cpu/SConscript, line 188
 http://reviews.m5sim.org/r/678/diff/1/?file=12418#file12418line188

 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.
 You're right, I didn't even realize. I always do Exec,-ExecTicks. Leave it, 
 delete it, add it?

Let's delete it in a separate change.


 - Ali


 ---
 This is an automatically generated e-mail. To reply, visit:
 http://reviews.m5sim.org/r/678/#review1208
 ---


 On 2011-05-04 18:42:30, Ali Saidi wrote:
 ---
 This is an automatically generated e-mail. To reply, visit:
 http://reviews.m5sim.org/r/678/
 ---

 (Updated 2011-05-04 18:42:30)


 Review request for Default, Ali Saidi, Gabe Black, Steve Reinhardt, and 
 Nathan Binkert.


 Summary
 ---

 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.


 Diffs
 -

   src/arch/alpha/utility.hh 5a9a639ce16f 
   src/arch/alpha/utility.cc 5a9a639ce16f 
   src/arch/arm/utility.hh 5a9a639ce16f 
   src/arch/mips/utility.hh 5a9a639ce16f 
   src/arch/power/utility.hh 5a9a639ce16f 
   src/arch/sparc/utility.hh 5a9a639ce16f 
   src/arch/x86/utility.hh 5a9a639ce16f 
   src/cpu/SConscript 5a9a639ce16f 
   src/cpu/exetrace.cc 5a9a639ce16f 

 Diff: http://reviews.m5sim.org/r/678/diff


 Testing
 ---


 Thanks,

 Ali


 ___
 m5-dev mailing list
 m5-dev@m5sim.org
 http://m5sim.org/mailman/listinfo/m5-dev

___
m5-dev mailing list
m5-dev@m5sim.org
http://m5sim.org/mailman/listinfo/m5-dev


Re: [m5-dev] Review Request: Trace: Allow printing ASIDs and selectively tracing based on user/kernel code.

2011-05-04 Thread Nathan Binkert

---
This is an automatically generated e-mail. To reply, visit:
http://reviews.m5sim.org/r/678/#review1206
---

Ship it!


looks reasonable to me.  I assume that it works.

- Nathan


On 2011-05-04 18:42:30, Ali Saidi wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 http://reviews.m5sim.org/r/678/
 ---
 
 (Updated 2011-05-04 18:42:30)
 
 
 Review request for Default, Ali Saidi, Gabe Black, Steve Reinhardt, and 
 Nathan Binkert.
 
 
 Summary
 ---
 
 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.
 
 
 Diffs
 -
 
   src/arch/alpha/utility.hh 5a9a639ce16f 
   src/arch/alpha/utility.cc 5a9a639ce16f 
   src/arch/arm/utility.hh 5a9a639ce16f 
   src/arch/mips/utility.hh 5a9a639ce16f 
   src/arch/power/utility.hh 5a9a639ce16f 
   src/arch/sparc/utility.hh 5a9a639ce16f 
   src/arch/x86/utility.hh 5a9a639ce16f 
   src/cpu/SConscript 5a9a639ce16f 
   src/cpu/exetrace.cc 5a9a639ce16f 
 
 Diff: http://reviews.m5sim.org/r/678/diff
 
 
 Testing
 ---
 
 
 Thanks,
 
 Ali
 


___
m5-dev mailing list
m5-dev@m5sim.org
http://m5sim.org/mailman/listinfo/m5-dev


Re: [m5-dev] Review Request: Trace: Allow printing ASIDs and selectively tracing based on user/kernel code.

2011-05-04 Thread Gabe Black

---
This is an automatically generated e-mail. To reply, visit:
http://reviews.m5sim.org/r/678/#review1207
---



src/cpu/exetrace.cc
http://reviews.m5sim.org/r/678/#comment1657

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.


- Gabe


On 2011-05-04 18:42:30, Ali Saidi wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 http://reviews.m5sim.org/r/678/
 ---
 
 (Updated 2011-05-04 18:42:30)
 
 
 Review request for Default, Ali Saidi, Gabe Black, Steve Reinhardt, and 
 Nathan Binkert.
 
 
 Summary
 ---
 
 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.
 
 
 Diffs
 -
 
   src/arch/alpha/utility.hh 5a9a639ce16f 
   src/arch/alpha/utility.cc 5a9a639ce16f 
   src/arch/arm/utility.hh 5a9a639ce16f 
   src/arch/mips/utility.hh 5a9a639ce16f 
   src/arch/power/utility.hh 5a9a639ce16f 
   src/arch/sparc/utility.hh 5a9a639ce16f 
   src/arch/x86/utility.hh 5a9a639ce16f 
   src/cpu/SConscript 5a9a639ce16f 
   src/cpu/exetrace.cc 5a9a639ce16f 
 
 Diff: http://reviews.m5sim.org/r/678/diff
 
 
 Testing
 ---
 
 
 Thanks,
 
 Ali
 


___
m5-dev mailing list
m5-dev@m5sim.org
http://m5sim.org/mailman/listinfo/m5-dev


Re: [m5-dev] Review Request: Trace: Allow printing ASIDs and selectively tracing based on user/kernel code.

2011-05-04 Thread Gabriel Michael Black
X86 doesn't have an ASID hardware feature to the best of my knowledge,  
except related to the virtualization extensions when working with  
guest memory spaces. Would it make sense to use root page table  
pointers for this? I don't know specifically how page tables are  
managed in Linux, so I don't know if that would actually work. The  
root page table pointer is in the CR3 register.


Gabe

Quoting Gabe Black gbl...@eecs.umich.edu:



---
This is an automatically generated e-mail. To reply, visit:
http://reviews.m5sim.org/r/678/#review1207
---



src/cpu/exetrace.cc
http://reviews.m5sim.org/r/678/#comment1657

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.



- Gabe


On 2011-05-04 18:42:30, Ali Saidi wrote:


---
This is an automatically generated e-mail. To reply, visit:
http://reviews.m5sim.org/r/678/
---

(Updated 2011-05-04 18:42:30)


Review request for Default, Ali Saidi, Gabe Black, Steve Reinhardt,  
and Nathan Binkert.



Summary
---

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.


Diffs
-

  src/arch/alpha/utility.hh 5a9a639ce16f
  src/arch/alpha/utility.cc 5a9a639ce16f
  src/arch/arm/utility.hh 5a9a639ce16f
  src/arch/mips/utility.hh 5a9a639ce16f
  src/arch/power/utility.hh 5a9a639ce16f
  src/arch/sparc/utility.hh 5a9a639ce16f
  src/arch/x86/utility.hh 5a9a639ce16f
  src/cpu/SConscript 5a9a639ce16f
  src/cpu/exetrace.cc 5a9a639ce16f

Diff: http://reviews.m5sim.org/r/678/diff


Testing
---


Thanks,

Ali








___
m5-dev mailing list
m5-dev@m5sim.org
http://m5sim.org/mailman/listinfo/m5-dev


Re: [m5-dev] Review Request: Trace: Allow printing ASIDs and selectively tracing based on user/kernel code.

2011-05-04 Thread Gabe Black

---
This is an automatically generated e-mail. To reply, visit:
http://reviews.m5sim.org/r/678/#review1208
---



src/cpu/SConscript
http://reviews.m5sim.org/r/678/#comment1658

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.


- Gabe


On 2011-05-04 18:42:30, Ali Saidi wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 http://reviews.m5sim.org/r/678/
 ---
 
 (Updated 2011-05-04 18:42:30)
 
 
 Review request for Default, Ali Saidi, Gabe Black, Steve Reinhardt, and 
 Nathan Binkert.
 
 
 Summary
 ---
 
 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.
 
 
 Diffs
 -
 
   src/arch/alpha/utility.hh 5a9a639ce16f 
   src/arch/alpha/utility.cc 5a9a639ce16f 
   src/arch/arm/utility.hh 5a9a639ce16f 
   src/arch/mips/utility.hh 5a9a639ce16f 
   src/arch/power/utility.hh 5a9a639ce16f 
   src/arch/sparc/utility.hh 5a9a639ce16f 
   src/arch/x86/utility.hh 5a9a639ce16f 
   src/cpu/SConscript 5a9a639ce16f 
   src/cpu/exetrace.cc 5a9a639ce16f 
 
 Diff: http://reviews.m5sim.org/r/678/diff
 
 
 Testing
 ---
 
 
 Thanks,
 
 Ali
 


___
m5-dev mailing list
m5-dev@m5sim.org
http://m5sim.org/mailman/listinfo/m5-dev


Re: [m5-dev] Review Request: Trace: Allow printing ASIDs and selectively tracing based on user/kernel code.

2011-05-04 Thread Ali Saidi


 On 2011-05-04 21:08:25, Gabe Black wrote:
 

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.


 On 2011-05-04 21:08:25, Gabe Black wrote:
  src/cpu/SConscript, line 188
  http://reviews.m5sim.org/r/678/diff/1/?file=12418#file12418line188
 
  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.

You're right, I didn't even realize. I always do Exec,-ExecTicks. Leave it, 
delete it, add it?


- Ali


---
This is an automatically generated e-mail. To reply, visit:
http://reviews.m5sim.org/r/678/#review1208
---


On 2011-05-04 18:42:30, Ali Saidi wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 http://reviews.m5sim.org/r/678/
 ---
 
 (Updated 2011-05-04 18:42:30)
 
 
 Review request for Default, Ali Saidi, Gabe Black, Steve Reinhardt, and 
 Nathan Binkert.
 
 
 Summary
 ---
 
 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.
 
 
 Diffs
 -
 
   src/arch/alpha/utility.hh 5a9a639ce16f 
   src/arch/alpha/utility.cc 5a9a639ce16f 
   src/arch/arm/utility.hh 5a9a639ce16f 
   src/arch/mips/utility.hh 5a9a639ce16f 
   src/arch/power/utility.hh 5a9a639ce16f 
   src/arch/sparc/utility.hh 5a9a639ce16f 
   src/arch/x86/utility.hh 5a9a639ce16f 
   src/cpu/SConscript 5a9a639ce16f 
   src/cpu/exetrace.cc 5a9a639ce16f 
 
 Diff: http://reviews.m5sim.org/r/678/diff
 
 
 Testing
 ---
 
 
 Thanks,
 
 Ali
 


___
m5-dev mailing list
m5-dev@m5sim.org
http://m5sim.org/mailman/listinfo/m5-dev


Re: [m5-dev] Review Request: Trace: Allow printing ASIDs and selectively tracing based on user/kernel code.

2011-05-04 Thread Ali Saidi


 On 2011-05-04 21:00:53, Gabe Black wrote:
  src/cpu/exetrace.cc, line 65
  http://reviews.m5sim.org/r/678/diff/1/?file=12419#file12419line65
 
  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.

It ends up being an extra line and no less clear, but it can be done. 


- Ali


---
This is an automatically generated e-mail. To reply, visit:
http://reviews.m5sim.org/r/678/#review1207
---


On 2011-05-04 18:42:30, Ali Saidi wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 http://reviews.m5sim.org/r/678/
 ---
 
 (Updated 2011-05-04 18:42:30)
 
 
 Review request for Default, Ali Saidi, Gabe Black, Steve Reinhardt, and 
 Nathan Binkert.
 
 
 Summary
 ---
 
 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.
 
 
 Diffs
 -
 
   src/arch/alpha/utility.hh 5a9a639ce16f 
   src/arch/alpha/utility.cc 5a9a639ce16f 
   src/arch/arm/utility.hh 5a9a639ce16f 
   src/arch/mips/utility.hh 5a9a639ce16f 
   src/arch/power/utility.hh 5a9a639ce16f 
   src/arch/sparc/utility.hh 5a9a639ce16f 
   src/arch/x86/utility.hh 5a9a639ce16f 
   src/cpu/SConscript 5a9a639ce16f 
   src/cpu/exetrace.cc 5a9a639ce16f 
 
 Diff: http://reviews.m5sim.org/r/678/diff
 
 
 Testing
 ---
 
 
 Thanks,
 
 Ali
 


___
m5-dev mailing list
m5-dev@m5sim.org
http://m5sim.org/mailman/listinfo/m5-dev