gem5-users@gem5.org

The gem5 Users mailing list

View all threads

Multiple debug files

AS
Arth Shah
Tue, Oct 17, 2023 10:23 PM

Hi everyone,

I am aware that there is a way to specify multiple debug flags in comma
separated formatting.
e.g.  --debug-flags=O3PipeView,Cache,HWPrefetch
Also, there is an option to print these debug messages into a file.
e.g. --debug-file=debug_log
Is there any option available to direct these debug flag output into
corresponding individual files?

I'm currently using grep to extract what I need from the single
'debug-file' which takes significant time when the file is huge for a
longer simulation.

Thanks in advance,
Arth

Hi everyone, I am aware that there is a way to specify multiple debug flags in comma separated formatting. e.g. --debug-flags=O3PipeView,Cache,HWPrefetch Also, there is an option to print these debug messages into a file. e.g. --debug-file=debug_log Is there any option available to direct these debug flag output into corresponding individual files? I'm currently using grep to extract what I need from the single 'debug-file' which takes significant time when the file is huge for a longer simulation. Thanks in advance, Arth
GB
gabriel.busnot@arteris.com
Wed, Oct 18, 2023 1:34 PM

Hi Arth,

You can only have a single debug log destination. However, You can take advantage of the FmtFlag special debug flag that will prepend the corresponding debug flag to every logged line. You can then use grep to filter down the lines of interest. If using bash, you can pipe the standard output of gem5 to

gem5.opt | tee >(grep FALG_A > FLAG_A.txt) >(grep FALG_B > FLAG_B.txt) >(grep FALG_B) … > complete_trace.txt

(…) is called process substitution in case you want to know more about that nifty feature.

Regards,

Gabriel

Hi Arth, You can only have a single debug log destination. However, You can take advantage of the FmtFlag special debug flag that will prepend the corresponding debug flag to every logged line. You can then use grep to filter down the lines of interest. If using bash, you can pipe the standard output of gem5 to > gem5.opt | tee >(grep FALG_A > FLAG_A.txt) >(grep FALG_B > FLAG_B.txt) >(grep FALG_B) … > complete_trace.txt >(…) is called process substitution in case you want to know more about that nifty feature. Regards, Gabriel