小编Kev*_*ski的帖子

你如何解释cachegrind输出缓存未命中?

出于好奇,我编写了几个不同版本的矩阵乘法,并对其运行cachegrind.在下面的结果中,我想知道哪些部分是L1,L2,L3未命中和引用以及它们的真正含义是什么?下面是我的矩阵乘法代码,万一有人需要.

#define SLOWEST
==6933== Cachegrind, a cache and branch-prediction profiler
==6933== Copyright (C) 2002-2012, and GNU GPL'd, by Nicholas Nethercote et al.
==6933== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info
==6933== Command: ./a.out 500
==6933== 
--6933-- warning: L3 cache found, using its data for the LL simulation.
--6933-- warning: pretending that LL cache has associativity 24 instead of actual 16
Multiplied matrix A and B in 60.7487 seconds.
==6933== 
==6933== I   refs:      6,039,791,314
==6933== I1  misses:            1,611 …
Run Code Online (Sandbox Code Playgroud)

c++ optimization caching valgrind cachegrind

16
推荐指数
1
解决办法
7072
查看次数

标签 统计

c++ ×1

cachegrind ×1

caching ×1

optimization ×1

valgrind ×1