diff options
author | Mike Pall <mike> | 2013-09-02 01:49:19 +0200 |
---|---|---|
committer | Mike Pall <mike> | 2013-09-02 01:49:19 +0200 |
commit | 4dce22c40d38dd7dc3d05cc383ddf004fb1f92c4 (patch) | |
tree | 34800356c01e0a4f7f820d5affb131de8c091d89 /src/luajit.h | |
parent | 19c2dd17dbaf66f1341efe2a71a26f0b5724f9e1 (diff) | |
download | luajit-4dce22c40d38dd7dc3d05cc383ddf004fb1f92c4.tar.gz luajit-4dce22c40d38dd7dc3d05cc383ddf004fb1f92c4.tar.bz2 luajit-4dce22c40d38dd7dc3d05cc383ddf004fb1f92c4.zip |
Add low-overhead profiler. Part 1: interpreter, low-level C API.
Diffstat (limited to 'src/luajit.h')
-rw-r--r-- | src/luajit.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/luajit.h b/src/luajit.h index a4c939bf..80530d95 100644 --- a/src/luajit.h +++ b/src/luajit.h | |||
@@ -64,6 +64,15 @@ enum { | |||
64 | /* Control the JIT engine. */ | 64 | /* Control the JIT engine. */ |
65 | LUA_API int luaJIT_setmode(lua_State *L, int idx, int mode); | 65 | LUA_API int luaJIT_setmode(lua_State *L, int idx, int mode); |
66 | 66 | ||
67 | /* Low-overhead profiling API. */ | ||
68 | typedef void (*luaJIT_profile_callback)(void *data, lua_State *L, | ||
69 | int samples, int vmstate); | ||
70 | LUA_API void luaJIT_profile_start(lua_State *L, const char *mode, | ||
71 | luaJIT_profile_callback cb, void *data); | ||
72 | LUA_API void luaJIT_profile_stop(lua_State *L); | ||
73 | LUA_API const char *luaJIT_profile_dumpstack(lua_State *L, const char *fmt, | ||
74 | int depth, size_t *len); | ||
75 | |||
67 | /* Enforce (dynamic) linker error for version mismatches. Call from main. */ | 76 | /* Enforce (dynamic) linker error for version mismatches. Call from main. */ |
68 | LUA_API void LUAJIT_VERSION_SYM(void); | 77 | LUA_API void LUAJIT_VERSION_SYM(void); |
69 | 78 | ||