简体   繁体   中英

how to measure cache usage of a cpp program?

I wonder if there is any tool to measure how much a cpp program benefits from caching (L1,L2,L3) ? For example, i) to measure how many requests could be handled directly by cache? ii) how many times the cache got flushed?

Valgrind has a cache profiling utility called cachegrind

Visual Studio (from VS 2010 on) has an embedded profiler which shows information about cache hits and misses, accessible with the CPU Counter options.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM