diff options
author | Dave Pacheco <dap@joyent.com> | 2013-03-28 13:52:43 -0700 |
---|---|---|
committer | Ben Noordhuis <info@bnoordhuis.nl> | 2013-03-30 01:04:00 +0100 |
commit | 7634069614ea38e38458e4c3a3c3e17d8bc4137e (patch) | |
tree | e1b1ed0b9f45f5075bb4849434956ee2115ad5fb /src/node_dtrace.cc | |
parent | fe7440ce19c2ee406b2895766ff191479bea1014 (diff) | |
download | node-new-7634069614ea38e38458e4c3a3c3e17d8bc4137e.tar.gz |
dtrace: pass more arguments to probes
OSX and other DTrace implementations don't support dereferencing
structs in probes. To accomodate that pass members from the struct as
arguments so that DTrace is useful on those systems.
Diffstat (limited to 'src/node_dtrace.cc')
-rw-r--r-- | src/node_dtrace.cc | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/node_dtrace.cc b/src/node_dtrace.cc index 99bc3002d7..3e531644dc 100644 --- a/src/node_dtrace.cc +++ b/src/node_dtrace.cc @@ -139,7 +139,7 @@ Handle<Value> DTRACE_NET_SERVER_CONNECTION(const Arguments& args) { NODE_NET_SERVER_CONNECTION(conn.fd, conn.remote, conn.port, \ conn.buffered); #else - NODE_NET_SERVER_CONNECTION(&conn); + NODE_NET_SERVER_CONNECTION(&conn, conn.remote, conn.port); #endif return Undefined(node_isolate); @@ -157,7 +157,7 @@ Handle<Value> DTRACE_NET_STREAM_END(const Arguments& args) { #ifdef HAVE_SYSTEMTAP NODE_NET_STREAM_END(conn.fd, conn.remote, conn.port, conn.buffered); #else - NODE_NET_STREAM_END(&conn); + NODE_NET_STREAM_END(&conn, conn.remote, conn.port); #endif return Undefined(node_isolate); @@ -181,7 +181,7 @@ Handle<Value> DTRACE_NET_SOCKET_READ(const Arguments& args) { "argument 1 to be number of bytes")))); } int nbytes = args[1]->Int32Value(); - NODE_NET_SOCKET_READ(&conn, nbytes); + NODE_NET_SOCKET_READ(&conn, nbytes, conn.remote, conn.port); #endif return Undefined(node_isolate); @@ -205,7 +205,7 @@ Handle<Value> DTRACE_NET_SOCKET_WRITE(const Arguments& args) { "argument 1 to be number of bytes")))); } int nbytes = args[1]->Int32Value(); - NODE_NET_SOCKET_WRITE(&conn, nbytes); + NODE_NET_SOCKET_WRITE(&conn, nbytes, conn.remote, conn.port); #endif return Undefined(node_isolate); @@ -247,7 +247,8 @@ Handle<Value> DTRACE_HTTP_SERVER_REQUEST(const Arguments& args) { NODE_HTTP_SERVER_REQUEST(&req, conn.fd, conn.remote, conn.port, \ conn.buffered); #else - NODE_HTTP_SERVER_REQUEST(&req, &conn); + NODE_HTTP_SERVER_REQUEST(&req, &conn, conn.remote, conn.port, req.method, \ + req.url); #endif return Undefined(node_isolate); } @@ -264,7 +265,7 @@ Handle<Value> DTRACE_HTTP_SERVER_RESPONSE(const Arguments& args) { #ifdef HAVE_SYSTEMTAP NODE_HTTP_SERVER_RESPONSE(conn.fd, conn.remote, conn.port, conn.buffered); #else - NODE_HTTP_SERVER_RESPONSE(&conn); + NODE_HTTP_SERVER_RESPONSE(&conn, conn.remote, conn.port); #endif return Undefined(node_isolate); @@ -310,7 +311,8 @@ Handle<Value> DTRACE_HTTP_CLIENT_REQUEST(const Arguments& args) { NODE_HTTP_CLIENT_REQUEST(&req, conn.fd, conn.remote, conn.port, \ conn.buffered); #else - NODE_HTTP_CLIENT_REQUEST(&req, &conn); + NODE_HTTP_CLIENT_REQUEST(&req, &conn, conn.remote, conn.port, req.method, \ + req.url); #endif return Undefined(node_isolate); } @@ -326,7 +328,7 @@ Handle<Value> DTRACE_HTTP_CLIENT_RESPONSE(const Arguments& args) { #ifdef HAVE_SYSTEMTAP NODE_HTTP_CLIENT_RESPONSE(conn.fd, conn.remote, conn.port, conn.buffered); #else - NODE_HTTP_CLIENT_RESPONSE(&conn); + NODE_HTTP_CLIENT_RESPONSE(&conn, conn.remote, conn.port); #endif return Undefined(node_isolate); |