Dear gem5 Community,
I am currently using the gem5 simulator for my research work and I find it
a powerful and insightful tool for studying and understanding the inner
workings of computer architectures.
I am particularly interested in exploring and understanding the behavior of
floating-point instructions within certain benchmarking suites. For my
study, I need to extract detailed information about each floating-point
instruction that is executed, such as the Program Counter (PC), source
register, and destination register.
Despite my efforts, I am having difficulty obtaining this data. I have been
trying to use the trace functionality, but it seems I may be missing some
key steps or perhaps there is a better approach.
Could anyone guide me on how to accomplish this task? Specifically, I would
appreciate it if you could share any scripts, changes in the source code,
configuration options, or any other method that would allow me to collect
the information I need.
Your assistance in this matter would be greatly appreciated. I look forward
to the possibility of learning from your collective experience and
expertise.
Thank you for your time and consideration.
Best regards,
David Alexandra
On 6/16/2023 3:07 AM, Alexandra-Nicoleta DAVID via gem5-users wrote:
Dear gem5 Community,
I am currently using the gem5 simulator for my research work and I find it a powerful and insightful
tool for studying and understanding the inner workings of computer architectures.
I am particularly interested in exploring and understanding the behavior of floating-point
instructions within certain benchmarking suites. For my study, I need to extract detailed
information about each floating-point instruction that is executed, such as the Program Counter
(PC), source register, and destination register.
Despite my efforts, I am having difficulty obtaining this data. I have been trying to use the trace
functionality, but it seems I may be missing some key steps or perhaps there is a better approach.
Could anyone guide me on how to accomplish this task? Specifically, I would appreciate it if you
could share any scripts, changes in the source code, configuration options, or any other method that
would allow me to collect the information I need.
What leads you to believe that the trace functionality does not provide what you want?
In my experience it will, if you select the right trace options (i.e., debug flags).
These flags are summarized at the end of SConscript files (for the python code to help
generate .hh and .cc files from them). Looking at gem5/src/cpu/SConscript, you will
see numerous Exec flags. You may want something like this set of them:
ExecEnable,ExecOpClass,ExecMacro,ExecUser
You may need to experiment with adding or substituting other flags to get what you
want. There is no filter to get only f.p. ops, though you could dig into the code
to see where these flags are used, and then set up and add a new flag (add it to SConscript,
#include the right file into the .hh/.cc file(s) where you will use it, etc.).
Note: debug flags are active only in opt and debug builds, not fast builds.
Finally, you pass them on the command line using --debug-flags flg1,flg2,flg3 etc.
You will get a LOT of output; you may want to pipe it through a grep (etc.) filter
and then compress it with gzip or something.
HTH - EM