use buildin LuaJIT profiler

pull/564/head
chrox 10 years ago
parent d3cf30aab2
commit 659e5f6bdd

@ -1 +1 @@
Subproject commit c78c2cd4a8824f855a330ff50b631d554f830120
Subproject commit 362a1c51b186339270733edae3206666c583bfab

@ -26,14 +26,9 @@ local Screen = require("ui/screen")
local ReaderUI = require("apps/reader/readerui")
Profiler = nil
local Profiler = nil
function exitReader()
if Profiler ~= nil then
Profiler:stop()
Profiler:dump("./profile.html")
end
G_reader_settings:close()
input.closeAll()
@ -56,6 +51,7 @@ function exitReader()
end
end
if Profiler then Profiler.stop() end
os.exit(0)
end
@ -146,14 +142,8 @@ while argidx <= #ARGV do
elseif arg == "-d" then
DEBUG:turnOn()
elseif arg == "-p" then
local lulip = require("ffi/lulip")
Profiler = lulip:new()
pcall(function()
-- set maxrows only if the optional arg is numeric
Profiler:maxrows(ARGV[argidx] + 0)
argidx = argidx + 1
end)
Profiler:start()
Profiler = require("jit.p")
Profiler.start("la")
else
-- not a recognized option, should be a filename
argidx = argidx - 1

Loading…
Cancel
Save