Created
January 28, 2014 15:42
-
-
Save kamichidu/8669956 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- profiler.lua.orig 2013-09-15 06:29:15.000000000 +0900 | |
| +++ profiler.lua 2014-01-29 00:33:15.181192708 +0900 | |
| @@ -84,7 +84,7 @@ | |
| -- if we have a prior calling function, then grab how much time we have spent so far in the current function by checking | |
| -- the top stack entry's call time, and add it into the data for that function; when we return, we will reset this value | |
| -- to whatever counter is on return | |
| - local StackSize = sizeof (profiler_call_stack) | |
| + local StackSize = #(profiler_call_stack) | |
| if (StackSize > 0) then | |
| local Top = profiler_call_stack [StackSize] | |
| @@ -105,7 +105,7 @@ | |
| -- grab the call record on top of the call stack; this is the current function including it's last entry time; record | |
| -- the duration and pop this from the stack | |
| - local StackSize = sizeof (profiler_call_stack) | |
| + local StackSize = #(profiler_call_stack) | |
| if (StackSize > 0) then | |
| local Top = profiler_call_stack [StackSize] | |
| @@ -116,7 +116,7 @@ | |
| end | |
| -- now, adjust the current stack top so that it's counter is the current counter (we are only interested in self counts) | |
| - StackSize = sizeof (profiler_call_stack) | |
| + StackSize = #(profiler_call_stack) | |
| if (StackSize > 0) then | |
| local Top = profiler_call_stack [StackSize] | |
| @@ -231,4 +231,4 @@ | |
| File:write ("\n") | |
| end | |
| end | |
| - | |
| \ No newline at end of file | |
| + |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment