From e7053c9ca9ce392298d9fac7dde4cad1ed50ce01 Mon Sep 17 00:00:00 2001 From: "agentzh (Yichun Zhang)" Date: Thu, 4 Apr 2013 18:26:27 -0700 Subject: [PATCH] updated the dtrace patch to make the stap function ngx_chain_dump() print out info about the "last_buf" and "last_in_chain" flags in bufs. --- patches/nginx-1.2.7-dtrace.patch | 16 +++++++++++++--- util/ver | 2 +- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/patches/nginx-1.2.7-dtrace.patch b/patches/nginx-1.2.7-dtrace.patch index a8bd510..76281f9 100644 --- a/patches/nginx-1.2.7-dtrace.patch +++ b/patches/nginx-1.2.7-dtrace.patch @@ -454,10 +454,10 @@ index efbc244..8d81aab 100644 diff --git a/src/dtrace/nginx.stp b/src/dtrace/nginx.stp new file mode 100644 -index 0000000..8a5a54a +index 0000000..4c228bd --- /dev/null +++ b/src/dtrace/nginx.stp -@@ -0,0 +1,278 @@ +@@ -0,0 +1,288 @@ +/* tapset for nginx */ + + @@ -598,6 +598,12 @@ index 0000000..8a5a54a +} + + ++function ngx_buf_last_in_chain(b) ++{ ++ return @cast(b, "ngx_buf_t", "/home/agentzh/git/lua-nginx-module/work/nginx/sbin/nginx")->last_in_chain ++} ++ ++ +function ngx_buf_sync(b) +{ + return @cast(b, "ngx_buf_t", "/home/agentzh/git/lua-nginx-module/work/nginx/sbin/nginx")->sync @@ -651,7 +657,11 @@ index 0000000..8a5a54a + } + + if (ngx_buf_last_buf(buf)) { -+ out .= "" ++ out .= "" ++ } ++ ++ if (ngx_buf_last_in_chain(buf)) { ++ out .= "" + } + + if (ngx_buf_sync(buf)) { diff --git a/util/ver b/util/ver index 7759fe0..f5a5a97 100755 --- a/util/ver +++ b/util/ver @@ -2,7 +2,7 @@ #main_ver=1.3.11 main_ver=1.2.7 -minor_ver=5rc1 +minor_ver=5rc2 version=$main_ver.$minor_ver echo $version