feature: initial support for dtrace static probes. it requires nginx-dtrace though: https://github.com/agentzh/nginx-dtrace
This commit is contained in:
Родитель
c25689b93a
Коммит
d3a9ba25b1
3
config
3
config
|
@ -247,6 +247,9 @@ if [ $ngx_found = yes ]; then
|
|||
CORE_LIBS="-Wl,-E $CORE_LIBS"
|
||||
fi
|
||||
|
||||
NGX_DTRACE_PROVIDERS="$NGX_DTRACE_PROVIDERS $ngx_addon_dir/dtrace/ngx_lua_provider.d"
|
||||
NGX_TAPSET_SRCS="$NGX_TAPSET_SRCS $ngx_addon_dir/tapset/ngx_lua.stp"
|
||||
|
||||
USE_MD5=YES
|
||||
USE_SHA1=YES
|
||||
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
typedef struct { int dummy; } lua_State;
|
||||
|
||||
|
||||
provider nginx_lua {
|
||||
probe http__lua__register__preload__package(lua_State *L, char *pkg);
|
||||
};
|
||||
|
||||
|
||||
#pragma D attributes Evolving/Evolving/Common provider nginx provider
|
||||
#pragma D attributes Private/Private/Unknown provider nginx module
|
||||
#pragma D attributes Private/Private/Unknown provider nginx function
|
||||
#pragma D attributes Private/Private/Common provider nginx name
|
||||
#pragma D attributes Evolving/Evolving/Common provider nginx args
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
#ifndef NGX_HTTP_LUA_PROBE_H
|
||||
#define NGX_HTTP_LUA_PROBE_H
|
||||
|
||||
|
||||
#include <ngx_config.h>
|
||||
#include <ngx_core.h>
|
||||
#include <ngx_http.h>
|
||||
|
||||
|
||||
#if defined(NGX_DTRACE) && NGX_DTRACE
|
||||
|
||||
#include <ngx_dtrace_provider.h>
|
||||
|
||||
#define ngx_http_lua_probe_register_preload_package(L, pkg) \
|
||||
NGINX_LUA_HTTP_LUA_REGISTER_PRELOAD_PACKAGE(L, pkg)
|
||||
|
||||
#else /* !(NGX_DTRACE) */
|
||||
|
||||
#define ngx_http_lua_probe_register_preload_package(L, pkg)
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* NGX_HTTP_LUA_PROBE_H */
|
|
@ -0,0 +1,5 @@
|
|||
function ngx_http_lua_ctx_context(r)
|
||||
{
|
||||
|
||||
}
|
||||
|
Загрузка…
Ссылка в новой задаче