Valgrind
For more information, see.
What can valgrind do?
• Memory usage detection, including:-Memory leakage-illegal memory access-Use of uninitialized variables-repeated release of memory • multi-thread competition-detection of deadlocks
-Detect Competition
What else can valgrind do?
• Performance Analysis
-Cachegrind + cg_annotate
It simulates the level-1 cache I1, D1, and L2 level-2 cache in the CPU and can accurately point outProgramCache loss and hit. If needed, it can also provide us with the number of cache losses, the number of memory references, and each rowCode, Each function, each module, and the number of commands generated by the entire program can be seen as the execution cost of the program. The above data is of little significance for app development and serves only as a reference.
Usage:
-Callgrind + callgrind_annotate/kcachegrind
Callgrind is more useful than cachegrind. Callgrind is implemented on the basis of cachegrind to visually display the function call relationship and the cost of each function during the whole process. For