Showing posts with label valgrind. Show all posts
Showing posts with label valgrind. Show all posts

Sunday, April 5, 2015

Use valgrind's callgrind tool to find out the most time consuming function in your application

  1. Use "$ valgrind --tool=callgrind ./APPLICATION ..." to analyze application performance,
     it will generate a callgrind output(ex:callgrind.out.7722) to help you get performance informations:
      $ valgrind --tool=callgrind ./your_application param1 param2 ...
     
  2. Use kcachegrind tool to visualize callgrind output:
      $ sudo apt-get install kcachegrind
      $ kcachegrind callgrind.out.7722
     
  3. REF: http://baptiste-wicht.com/posts/2011/09/profile-c-application-with-callgrind-kcachegrind.html