The .o files are object files. They are intermediate files that should be passed on to the linker to produce the final library (with the extension .so).
Weird that you didn't get any errors while building. The makefile uses an old include path to the Lua headers. Ubuntu 12.04 has them in '/usr/include/lua5.1'. Open the config.linux file and replace the path of LUA_INCLUDE with this new path.
(Oops, my mind didn't parse that you already did this) Then you have to build it again. If you don't want to rename the Makefile you can also specify it to make with the -f option: make -f Makefile.linux.
Now it should create a folder named bin and in it a profiler.so. This is the actual binary. The makefile also has an install option (sudo make install), but if the path '/usr/local/lib/lua/5.1' does not exist, like it didn't for me, it will fail. You can copy it there by hand or to any other place where the default Lua package.path is pointing.
Now you can do 'local myProfiler = require("profiler")' in Lua. Or in LÖVE:
Code: Select all
profiler = require("profiler")
profiler.start("YourProfile.prof")
function love.quit()
profiler.stop()
end
Use the summary.lua script in 'src/analyzer' to get a simple overview of what went on. Execute it like 'lua summary.lua YourProfile.prof'.
Beware, the file gets big very fast.
Edit: Some time ago I hacked up a summary.lua that is a bit more verbose. It's not of good code quality, but it should work. Edit2: Actually, it looks like I just changed the formatting.
Usage: lua summary2.lua -v YourProfile.prof
Shallow indentations.