feature: added new dtrace static probe http-lua-user-thread-wait.

This commit is contained in:
agentzh (Yichun Zhang) 2012-11-28 23:32:24 -08:00
Родитель d3214ca9c4
Коммит e6b20cb2eb
3 изменённых файлов: 8 добавлений и 0 удалений

Просмотреть файл

@ -47,6 +47,9 @@ provider nginx_lua {
probe http__lua__coroutine__done(ngx_http_request_t *r, void *co, probe http__lua__coroutine__done(ngx_http_request_t *r, void *co,
int success); int success);
/* lua_State *parent, lua_State *child */
probe http__lua__user__thread__wait(void *parent, void *child);
}; };

Просмотреть файл

@ -59,6 +59,9 @@
#define ngx_http_lua_probe_coroutine_done(r, co, success) \ #define ngx_http_lua_probe_coroutine_done(r, co, success) \
NGINX_LUA_HTTP_LUA_COROUTINE_DONE(r, co, success) NGINX_LUA_HTTP_LUA_COROUTINE_DONE(r, co, success)
#define ngx_http_lua_probe_user_thread_wait(parent, child) \
NGINX_LUA_HTTP_LUA_USER_THREAD_WAIT(parent, child)
#else /* !(NGX_DTRACE) */ #else /* !(NGX_DTRACE) */
#define ngx_http_lua_probe_info(s) #define ngx_http_lua_probe_info(s)
@ -75,6 +78,7 @@
#define ngx_http_lua_probe_thread_delete(r, thread, ctx) #define ngx_http_lua_probe_thread_delete(r, thread, ctx)
#define ngx_http_lua_probe_run_posted_thread(r, thread, status) #define ngx_http_lua_probe_run_posted_thread(r, thread, status)
#define ngx_http_lua_probe_coroutine_done(r, co, success) #define ngx_http_lua_probe_coroutine_done(r, co, success)
#define ngx_http_lua_probe_user_thread_wait(parent, child)
#endif #endif

Просмотреть файл

@ -175,6 +175,7 @@ ngx_http_lua_uthread_wait(lua_State *L)
break; break;
} }
ngx_http_lua_probe_user_thread_wait(L, sub_coctx->co);
sub_coctx->waited_by_parent = 1; sub_coctx->waited_by_parent = 1;
} }