From: Volker D. <u6...@ti...> - 2023-04-25 19:57:12
|
Hallo, maybe I misunderstood, but it look like I don't understand tool=cachegrind correct (or there is a bug). I have a software. If it runs, then the task manager tells me that is use only 38 MB memory. Now i used cachegrind like this: valgrind --tool=cachegrind --LL=2097152,16,64 ./fet-cl --inputfile=German-100_and_0.fet --randomseeds10=10 --randomseeds11=11 --randomseeds12=12 --randomseeds20=20 --randomseeds21=21 --randomseeds22=22 i got this report: [...] ==43032== LL misses: 8,283,261 ( 7,840,142 rd + 443,119 wr) i doubled the LL cache by this: valgrind --tool=cachegrind --LL=4194304,16,64 ./fet-cl --inputfile=German-100_and_0.fet --randomseeds10=10 --randomseeds11=11 --randomseeds12=12 --randomseeds20=20 --randomseeds21=21 --randomseeds22=22 and got this: [...] ==48663== LL misses: 230,426 ( 89,082 rd + 141,344 wr) That sound ok (larger cache should reduce the misses). But I continued to double the cache again and again. Up to: valgrind --tool=cachegrind --LL=268435456,16,64 ./fet-cl --inputfile=German-100_and_0.fet --randomseeds10=10 --randomseeds11=11 --randomseeds12=12 --randomseeds20=20 --randomseeds21=21 --randomseeds22=22 So much more memory then my program use at all. But the misses never drop down to 0. They stay at: [...] ==6637== LL misses: 180,120 ( 41,252 rd + 138,868 wr) I don't understand that. Shouldn't the misses drop down to 0 as soon as LL is >64MB (since my software use only 38 MB)? (But i tried up to 256MB and it doesn't drop). Is that a bug in valgrind or is there a bug in my logic in understanding the LL misses? Please let me know. Thank you! |