SUMMARY Callgrind allows cache simulation and also user-specified cache configuration. Regarding the latter and especially the --LL=<>,<>,<> flag I noticed that when an L3/L4 cache is discovered the following warning pops up "warning: L3 cache found, using its data for the LL simulation". However when callgrind's output (i.e. callgrind.out.<pid>) is read by callgrind_annotate it seems that the user-specified cache configuration has been used. In my understanding the source code in file "cg_arch.c", where this warning is printed, does NOT override the user specifications in case of a HW L3/L4 cache is detected. STEPS TO REPRODUCE 1. Run callgrind with --cache-sim=yes --LL=<>,<>,<> 2. Observe the warning that pops 3. Observe the output file using callgrind_annotate OBSERVED RESULT There is no coherence between the warning and the callgrind output result. EXPECTED RESULT The warning is wrongly printed. SOFTWARE/OS VERSIONS Windows: macOS: Linux/KDE Plasma: (available in About System) KDE Plasma Version: KDE Frameworks Version: Qt Version: ADDITIONAL INFORMATION
My (limited) understanding of this is that, indeed, a --LL= specification overrides whatever config info we might pull automatically from the hardware.