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.

pull/34/merge
agentzh (Yichun Zhang) 12 years ago
parent 042e2fd27b
commit e7053c9ca9

@ -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)) {

@ -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

Loading…
Cancel
Save