summaryrefslogtreecommitdiff
path: root/src/luajit.h
diff options
context:
space:
mode:
authorMike Pall <mike>2013-09-02 01:49:19 +0200
committerMike Pall <mike>2013-09-02 01:49:19 +0200
commit4dce22c40d38dd7dc3d05cc383ddf004fb1f92c4 (patch)
tree34800356c01e0a4f7f820d5affb131de8c091d89 /src/luajit.h
parent19c2dd17dbaf66f1341efe2a71a26f0b5724f9e1 (diff)
downloadluajit-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.h9
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. */
65LUA_API int luaJIT_setmode(lua_State *L, int idx, int mode); 65LUA_API int luaJIT_setmode(lua_State *L, int idx, int mode);
66 66
67/* Low-overhead profiling API. */
68typedef void (*luaJIT_profile_callback)(void *data, lua_State *L,
69 int samples, int vmstate);
70LUA_API void luaJIT_profile_start(lua_State *L, const char *mode,
71 luaJIT_profile_callback cb, void *data);
72LUA_API void luaJIT_profile_stop(lua_State *L);
73LUA_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. */
68LUA_API void LUAJIT_VERSION_SYM(void); 77LUA_API void LUAJIT_VERSION_SYM(void);
69 78