Initial version by Jan Kneschke (found from http://jan.kneschke.de/assets/projects/lua/lua-callgrind.lua)