lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> Based on the other lua profilers I wrote a kcachegrind backend for lua:
>
>  http://jan.kneschke.de/projects/profiling-lua-with-kcachegrind
>
> that gives the data a more visual approach.

Sorry for the kind of late reply. This tool greatly simplified our
profiling, thank you!

However, there is minor regexp glitch which prohibits loading of
lua-cachegrind with metalua (see below).

Alexander.

--- a/lua-callgrind.lua
+++ b/lua-callgrind.lua
@@ -165,7 +165,7 @@ func2name = function(m, tbl, prefix)
       -- already mapped
     elseif type(func) == "function" then
       -- remove the package.loaded. prefix from the loaded methods
-      m[tostring(func)] = { name = (prefix..name):gsub("^package\.loaded\.", ""
+      m[tostring(func)] = { name = (prefix..name):gsub("^package%.loaded%.", ""
       method_id = method_id + 1
     elseif type(func) == "table" and type(name) == "string" then
       -- a package, class, ...