Lua: Difference between revisions
No edit summary |
No edit summary |
||
| (2 intermediate revisions by the same user not shown) | |||
| Line 32: | Line 32: | ||
Because each variable is taint-tagged by whichever AddOn generated it, WoW Lua is able to compute the memory usage of any particular AddOn. | Because each variable is taint-tagged by whichever AddOn generated it, WoW Lua is able to compute the memory usage of any particular AddOn. | ||
< | <pre> | ||
void lua_gcupdatesizes(lua_State* L); | void lua_gcupdatesizes(lua_State* L); | ||
lu_mem lua_gcgetsize(lua_State* L, const char* tag); | lu_mem lua_gcgetsize(lua_State* L, const char* tag); | ||
</ | </pre> | ||
Optionally, function performance can be profiled by turning on a flag. | Optionally, function performance can be profiled by turning on a flag (which is governed by the <code>scriptProfile</code> CVar). | ||
< | You can read the results of the function profiler with: | ||
void lua_gcupdatetimes(lua_State* L); | |||
<pre> | |||
void lua_gcupdatetimes(lua_State* L); | |||
lua_Number lua_gcgettime(lua_State* L, const char* tag); | lua_Number lua_gcgettime(lua_State* L, const char* tag); | ||
void lua_gcgetfunctiontime(lua_State* L, lua_Number* flat, lua_Number* total, int32_t* ncalls); | void lua_gcgetfunctiontime(lua_State* L, lua_Number* flat, lua_Number* total, int32_t* ncalls); | ||
void lua_gcresettimes(lua_State* L); | void lua_gcresettimes(lua_State* L); | ||
</ | </pre> | ||
=== Standard library === | === Standard library === | ||