【问题标题】:gem5 cache statistics - reset and dumpgem5 缓存统计信息 - 重置和转储
【发布时间】:2014-05-24 06:13:58
【问题描述】:

我正在尝试熟悉 gem5 模拟器。 首先,我用

编写了一个简单的程序
int main()
{
    m5_reset_stats(0, 0);
    m5_dump_stats(0, 0);
    return 0;
}

我使用 util/m5/m5op_x86.S 编译它并使用...运行它...

 ./build/X86/gem5.opt configs/example/se.py --caches -c ~/tmp/hello

m5out/stats.txt 显示(除其他外)...

system.cpu.dcache.ReadReq_hits::total             881
system.cpu.dcache.WriteReq_hits::total            917
system.cpu.dcache.ReadReq_misses::total            54
system.cpu.dcache.WriteReq_misses::total           42

为什么一个空函数会显示如此多的命中和未命中?命中和未命中是由 libc 引起的吗?如果是这样,那么 m5_reset_stats() 和 m5_dump_stats() 的目的是什么?

【问题讨论】:

    标签: computer-architecture cpu-architecture gem5


    【解决方案1】:

    如果有两块

    ,我会检查 stats.txt 文件
    ---Begin--- 
    ---End-----
    

    因为正如您所解释的,模拟器应该在 dump_stats(0,0) 和运行结束时转储统计信息。因此,您似乎正在查看其中一个区间(我希望另一个区间的所有统计数据都为 0);或者模拟中存在错误,并且 dump_stats()(或 reset_stats())实际上没有做任何事情。这实际上发生在我身上很多次,但我不确定这个错误的来源。

    如果您想进一步排除故障,您可以执行以下操作:

    1. 查看反汇编代码,找到reset_stats.w和dump_stats.w
    2. 从 gem5 转储跟踪,查看它是否最终执行转储和重置指令,以及之前/之后执行了哪些指令(以及执行了多少)。

    希望这会有所帮助!

    【讨论】:

      猜你喜欢
      • 2010-12-11
      • 2019-01-16
      • 1970-01-01
      • 1970-01-01
      • 2011-05-08
      • 1970-01-01
      • 1970-01-01
      • 2015-04-22
      • 1970-01-01
      相关资源
      最近更新 更多