在gem5中,如何将不同级别缓存中的所有数据都转储到一个文件中?或者我们可以通过它来分析缓存中的数据,就像我们可以借助。
util/O3-pipeview.py m5out/pipeview.txt --color -w150
less -r o3-pipeview.out发布于 2021-05-09 14:41:29
可以在gem5中使用调试标志“缓存”来了解icache和dcache输出。我尝试了以下几个步骤:
在终端上使用以下命令directory.
./build/ARM/gem5.opt --debug-flags=DRAM,Exec,Cache --debug-file=cache_pipe ./configs/example/se.py -c ./tests/test-progs/hello/bin/arm/linux/hellocache_pipe输出文件在m5out文件夹中生成。
它看起来就像-
2000: system.cpu.icache: sendMSHRQueuePacket: MSHR ReadReq [44c:44f] IF
2000: system.cpu.icache: createMissPacket: created ReadCleanReq [440:47f] IF from ReadReq [44c:44f] IF
2000: system.mem_ctrls.dram: Timing access to addr 1088, rank/bank/row 0 0 0
2000: system.mem_ctrls.dram: Activate at tick 2000
2000: system.mem_ctrls.dram: Activate bank 0, rank 0 at tick 2000, now got 1 active
2000: system.mem_ctrls.dram: Schedule RD/WR burst at tick 27500
46250: system.mem_ctrls.dram: number of read entries for rank 0 is 0
77000: system.cpu.icache: recvTimingResp: Handling response ReadResp [440:47f] IF
77000: system.cpu.icache: Block for addr 0x440 being updated in Cache
77000: system.cpu.icache: Block addr 0x440 (ns) moving from to state: 6 (E) writable: 1 readable: 1 dirty: 0 | tag: 0 secure: 0 valid: 1 | set: 0x11 way: 0
79000: system.cpu: T0 : 0x1044c @_start : mov fp, #0 : IntAlu : D=0x0000000000000000
79000: system.cpu.icache: access for ReadReq [450:453] IF hit state: 6 (E) writable: 1 readable: 1 dirty: 0 | tag: 0 secure: 0 valid: 1 | set: 0x11 way: 0
85000: system.cpu: T0 : 0x10450 @_start+4 : mov lr, #0 : IntAlu : D=0x0000000000000000
85000: system.cpu.icache: access for ReadReq [454:457] IF hit state: 6 (E) writable: 1 readable: 1 dirty: 0 | tag: 0 secure: 0 valid: 1 | set: 0x11 way: 0
87000: system.cpu.dcache: access for ReadReq [8de50:8de53] miss
89000: system.cpu.dcache: sendMSHRQueuePacket: MSHR ReadReq [8de50:8de53]
89000: system.cpu.dcache: createMissPacket: created ReadSharedReq [8de40:8de7f] from ReadReq [8de50:8de53]在这里,我使用了DRAM、Exec和Cache标志,可以只使用Cache来获取有关icache和dcache的信息。并且我已经使用了预编译的hello可执行文件,你可以使用你自己的一套可执行文件。
https://stackoverflow.com/questions/51764478
复制相似问题