I am learning gem5 recently. I read the official documentation of gem5, but sometimes I always feel that the description is too formal and I cannot understand it in detail. I want to use gem5 to do research on branch prediction or prefetching. When I used it, I encountered some things that I didn't understand. There may be a lot of questions, I hope someone can help me, thank you very much!
- When I was looking at the source code of some papers, I found that they often start with checkpoints.But according to the introduction of checkpoint document, Checkpoints are just simulated snapshots, so is the meaning of checkpoints used when simulating long-term code? In order to prevent problems in the middle, Or reduce the running time in the future? According to this answer, gem5's classic memory system does not save any cache state. Does this mean that checkpoint is not appropriate in the prefetch experiment?
Moreover, According to the official documentation, the --checkpoint-at-end option can be used to create a checkpoint at the end of the simulation. But the source code of a top conference paper I saw did not use this option when creating a checkpoint. When I don't use --checkpoint-at-end
, I see that the corresponding directories and files are generated. Does this mean that this option can be omitted? When I generated the checkpoint, a warn: Checkpoints for file descriptors currently do not work appeared
. What is going on?
If I do prefetching or branch prediction experiments, I should warm up the cache before the formal experiment. I looked at the
--warmup-insts
option. In the introduction of this option, it is mentioned that--standard-switch
is required. And I see that many people use:--fast-forward=1000000 --standard-switch=$WARMUP_INSTS --warmup-insts=$WARMUP_INSTS Their explanations are:
(1). --fast-forward: Number of instructions to fast forward before switching
(2) --warmup-insts: Warmup period in total instructions (requires --standard-switch)
(3)--standard-switch: switch from timing to Detailed CPU after warmup period of
Looking at each item individually, I seem to understand it, but specifically, I don't seem to understand it at all.
- I want to do a prefetch experiment, but how do I get the trace of the command? So that I can analyze, is there any tool for this?
These questions may seem stupid, but they have troubled me for a long time. Thank you very much for someone who can answer them!