【问题标题】:Gem5 cache dumpGem5 缓存转储
【发布时间】:2019-01-16 18:27:26
【问题描述】:

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

    util/O3-pipeview.py m5out/pipeview.txt --color -w150
    less -r o3-pipeview.out

【问题讨论】:

    标签: operating-system system cpu-architecture gem5


    【解决方案1】:

    可以使用 gem5 中的调试标志“Cache”来了解 icachedcache 的输出。 我尝试了以下步骤:

    1. 连接到 gem5 基目录。
    2. 在终端输入以下命令 -
    ./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_pipem5out文件夹中生成。
    它看起来像 -

    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 可执行文件,您可以使用自己的一组可执行文件。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-12-25
      • 1970-01-01
      • 2021-07-04
      • 1970-01-01
      • 2010-12-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多