Permalink
Browse files

luatrace.profile doesn't need to create several versions of a frame

  • Loading branch information...
1 parent 1fb7614 commit 53894023f8dab7632f06aab3e75bdd98c527987a @geoffleyland geoffleyland committed May 1, 2011
Showing with 3 additions and 2 deletions.
  1. +3 −2 lua/luatrace/profile.lua
View
@@ -73,7 +73,7 @@ local function push(frame)
replay_push(frame)
local thread = thread_stack[thread_stack.top]
thread.top = thread.top + 1
- thread[thread.top] = { func=frame.func }
+ thread[thread.top] = frame
end
@@ -209,7 +209,8 @@ function profile.record(a, b, c, d)
local thread = get_thread(thread_id)
-- replay the thread onto the stack
for _, frame in ipairs(thread) do
- replay_push{ source_file=frame.func.source_file, func=frame.func, frame_time=0, current_line=frame.current_line }
+ frame.frame_time = 0
+ replay_push(frame)
end
push_thread(thread)

0 comments on commit 5389402

Please sign in to comment.