Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Lua Profiler #253

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open

Lua Profiler #253

wants to merge 9 commits into from

Conversation

leinlin
Copy link
Contributor

@leinlin leinlin commented Nov 16, 2018

采用Hook技术,对luaL_loadbuffer 进行hook,修改buff里面的代码

@leinlin
Copy link
Contributor Author

leinlin commented Nov 16, 2018

用Lua的分词器,解析 function 跟end把 return 替换为 return unpack(...)

@leinlin
Copy link
Contributor Author

leinlin commented Nov 16, 2018

function miku_unpack(...)
EndSample()
return ...
end

函数function 下插入 BeginSample(''函数名字加 file line")
然后进行 时间内存统计

对slua源码毫无入侵

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant