首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Gem5缓存转储

Gem5缓存转储
EN

Stack Overflow用户
提问于 2018-08-09 18:21:07
回答 1查看 70关注 0票数 1

在gem5中,如何将不同级别缓存中的所有数据都转储到一个文件中?或者我们可以通过它来分析缓存中的数据,就像我们可以借助。

代码语言:javascript
复制
    util/O3-pipeview.py m5out/pipeview.txt --color -w150
    less -r o3-pipeview.out
EN

回答 1

Stack Overflow用户

发布于 2021-05-09 14:41:29

可以在gem5中使用调试标志“缓存”来了解icache和dcache输出。我尝试了以下几个步骤:

在终端上使用以下命令directory.

  • type
  1. 连接到gem5基本服务器-

代码语言:javascript
复制
./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/hello

cache_pipe输出文件在m5out文件夹中生成。

它看起来就像-

代码语言:javascript
复制
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可执行文件,你可以使用你自己的一套可执行文件。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/51764478

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档