Permalink
Browse files

updated the dtrace patch to make the stap function ngx_chain_dump() p…

…rint out info about the "last_buf" and "last_in_chain" flags in bufs.
  • Loading branch information...
1 parent 042e2fd commit e7053c9ca9ce392298d9fac7dde4cad1ed50ce01 @agentzh agentzh committed Apr 5, 2013
Showing with 14 additions and 4 deletions.
  1. +13 −3 patches/nginx-1.2.7-dtrace.patch
  2. +1 −1 util/ver
@@ -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 .= "<eof>"
++ out .= "<last_buf>"
++ }
++
++ if (ngx_buf_last_in_chain(buf)) {
++ out .= "<last_in_chain>"
+ }
+
+ if (ngx_buf_sync(buf)) {
View
@@ -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

0 comments on commit e7053c9

Please sign in to comment.