diff options
author | Dave Pacheco <dap@joyent.com> | 2013-03-29 00:52:43 +0400 |
---|---|---|
committer | isaacs <i@izs.me> | 2013-04-03 20:52:56 +0400 |
commit | bf22f99f3a17e33b78df5c8f85fab5372c032143 (patch) | |
tree | 3115c6004ed3f8ed0d77cd5a659a22d3929c351d /src/node_dtrace.cc | |
parent | ec69fcf4256dfe6b8c90e96e71c2dff570fd36c3 (diff) |
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 df42af2a977..85583905df8 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(); @@ -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(); @@ -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(); @@ -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(); @@ -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(); } @@ -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(); @@ -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(); } @@ -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(); |