avadhpatel / marss

PTLsim and QEMU based Computer Architecture Research Simulator
http://www.marss86.org
128 stars 63 forks source link

How to use the debug statements? #63

Closed b-saideepak closed 3 years ago

b-saideepak commented 3 years ago

Hi,

I have compiled marss with the debug option. I could see some statements like " memdebug( ... ) " which I think will help in debugging. How can I use those? Is there any option that I should provide while running. I couldn't get much help from the site. Can anyone help? Any comments are welcome, thanks for your time.

- Saideepak

fitzfitsahero commented 3 years ago

The memdebug macro is a wrapper for the loglevel option. In your simconfig, either the file, command options or typing them in the qemu instance, you'll pick the appropriate loglevel and the ptlsim.out

The loglevel number is inclusive, level 0 is nothing, level 99 is everything, level 10 includes 1-10.

The presentation slides from MICRO or ISCA have some examples of these on the marss86.org website.

b-saideepak commented 3 years ago

Hi,

Thanks for the reply. I tried using the log file, I can see the debug statements in it, but I think it has a lot of information(even when I give 10 as log level). Can I restrict it to a particular debug statement? Say, only memory debug statements?

Thanks, Saideepak.

fitzfitsahero commented 3 years ago

It's distinctly possible although I'm not sure how much work would be involved.

The memdebug define is located in memoryHierarchy.h and you could alter the logic to only let that print out.

b-saideepak commented 3 years ago

Thanks.