Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • September 03, 2015, 06:27:28 PM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Debugging gems: runtime code profiling in Linux - KCacheGrind  (Read 2508 times)

Gothi[c]

  • DC Server Admin
  • Charter Honorary Member
  • Joined in 2006
  • ***
  • Posts: 857
    • View Profile
    • linkerror
    • Donate to Member
Debugging gems: runtime code profiling in Linux - KCacheGrind
« on: January 30, 2007, 04:27:49 AM »
I recently stumbled upon the (so far) best FOSS runtime code profiling tool I ever tried: KCacheGrind

It is really a front-end for the common *nix debugging tool valgrind, but the way it visualizes the data makes the valgrind actually allot more usable.

You can navigate through the call graph tree, go into different levels and subtrees, view how much time was spent in each function, detect memory leaks, bugs, etc,...

A nice addition to my debugging arsenal, I thought I would share ;)

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: Debugging gems: runtime code profiling in Linux - KCacheGrind
« Reply #1 on: January 30, 2007, 05:56:37 AM »
Thanks a lot!!
Valgrind can become quite hard to understand, i hope this'll help. It sure does look good  :Thmbsup:

Gothi[c]

  • DC Server Admin
  • Charter Honorary Member
  • Joined in 2006
  • ***
  • Posts: 857
    • View Profile
    • linkerror
    • Donate to Member
Re: Debugging gems: runtime code profiling in Linux - KCacheGrind
« Reply #2 on: January 30, 2007, 06:08:51 AM »
Be sure to read the manual to get the most out of it ;)

to produce the output needed for KCacheGrind, run:
Code: [Select]
valgrind --tool=callgrind ./yourprogram

+ any other options you want to pass to valgrind

Then open the produced yourprogram.out.12345 file with KCacheGrind.

tinjaw

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,927
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: Debugging gems: runtime code profiling in Linux - KCacheGrind
« Reply #3 on: January 30, 2007, 07:24:59 AM »
That's a pretty sweet find. Thanks for pointing it out.