Valgrind Tutorial Part 6 -- Callgrind
As we already valgrind is basically a wrapper around a lot of tools.In the previous posts, we were using the most popular valgrind tool known as memcheck,today we will be using another tool known as callgrind. Before knowing about callgrind we have to know about profiling in programming... What is profiling? Profiling is a form of dynamic program analysis,that measures things such as 1.Time complexity 2. Space complexity 3. How many times a particular function is called. 4. Time taken to execute a particular function. Basically , we use it to find where our program is taking more amount of time and try to optimize it. So there are many tools which performs profiling operation such as gprof..valgrind also has a tool i.e.,callgrind..So, we now know that cachegrind is a profiling tool. So,in order to use this tool,you have to specify --tool=cachegrind as an argument to the valgrind else the default tool memcheck will be considered. So, in ...