From ca9f8d06223b4921cde62f55ddbbd5db258d638f Mon Sep 17 00:00:00 2001 From: "agentzh (Yichun Zhang)" Date: Mon, 13 May 2013 12:09:47 -0700 Subject: [PATCH] updated the dtrace patch to reflect recent changes. --- patches/nginx-1.2.8-dtrace.patch | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/patches/nginx-1.2.8-dtrace.patch b/patches/nginx-1.2.8-dtrace.patch index 76281f9..d7cba98 100644 --- a/patches/nginx-1.2.8-dtrace.patch +++ b/patches/nginx-1.2.8-dtrace.patch @@ -1,13 +1,11 @@ diff --git a/README b/README -index 2f68e14..4f2c4a7 100644 +index 2f68e14..262822a 100644 --- a/README +++ b/README -@@ -1,3 +1,40 @@ +@@ -1,3 +1,38 @@ +This is an Nginx fork that adds dtrace USDT probes. -Documentation is available at http://nginx.org -+This is still under development and not usable yet. -+ +Installation: + + ./configure --with-dtrace-probes \ @@ -454,10 +452,10 @@ index efbc244..8d81aab 100644 diff --git a/src/dtrace/nginx.stp b/src/dtrace/nginx.stp new file mode 100644 -index 0000000..4c228bd +index 0000000..e824daf --- /dev/null +++ b/src/dtrace/nginx.stp -@@ -0,0 +1,288 @@ +@@ -0,0 +1,299 @@ +/* tapset for nginx */ + + @@ -592,6 +590,12 @@ index 0000000..4c228bd +} + + ++function ngx_buf_in_file(b) ++{ ++ return @cast(b, "ngx_buf_t", "NGX_SBIN_PATH")->in_file ++} ++ ++ +function ngx_buf_last_buf(b) +{ + return @cast(b, "ngx_buf_t", "/home/agentzh/git/lua-nginx-module/work/nginx/sbin/nginx")->last_buf @@ -656,6 +660,11 @@ index 0000000..4c228bd + out .= "\"\"" + } + ++ if (ngx_buf_in_file(buf)) { ++ out .= sprintf("", ngx_buf_file_pos(buf), ++ ngx_buf_file_last(buf)) ++ } ++ + if (ngx_buf_last_buf(buf)) { + out .= "" + }