diff options
author | Glen Keane <glenkeane.94@gmail.com> | 2015-02-02 18:57:17 +0000 |
---|---|---|
committer | Ben Noordhuis <info@bnoordhuis.nl> | 2015-02-02 21:55:56 +0100 |
commit | d75fecf6fd7a1ef9d3d84a70ab832e7c062f5880 (patch) | |
tree | 52f6feb4de795c333e8bbefc8d445e375dddaa60 /src/node_dtrace.cc | |
parent | 8c0742f43759d35da99f2475f81a026c2818c66a (diff) | |
download | node-new-d75fecf6fd7a1ef9d3d84a70ab832e7c062f5880.tar.gz |
src: remove unused dtrace probes
Removed DTRACE_NET_SOCKET_READ and DTRACE_NET_SOCKET_WRITE
as they were never called from within the source code.
PR-URL: https://github.com/iojs/io.js/pull/694
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Diffstat (limited to 'src/node_dtrace.cc')
-rw-r--r-- | src/node_dtrace.cc | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/src/node_dtrace.cc b/src/node_dtrace.cc index 36f2433e27..1b25db44e2 100644 --- a/src/node_dtrace.cc +++ b/src/node_dtrace.cc @@ -22,10 +22,6 @@ #define NODE_NET_SERVER_CONNECTION_ENABLED() (0) #define NODE_NET_STREAM_END(arg0) #define NODE_NET_STREAM_END_ENABLED() (0) -#define NODE_NET_SOCKET_READ(arg0, arg1, arg2, arg3, arg4) -#define NODE_NET_SOCKET_READ_ENABLED() (0) -#define NODE_NET_SOCKET_WRITE(arg0, arg1, arg2, arg3, arg4) -#define NODE_NET_SOCKET_WRITE_ENABLED() (0) #define NODE_GC_START(arg0, arg1, arg2) #define NODE_GC_DONE(arg0, arg1, arg2) #endif @@ -139,37 +135,6 @@ void DTRACE_NET_STREAM_END(const FunctionCallbackInfo<Value>& args) { NODE_NET_STREAM_END(&conn, conn.remote, conn.port, conn.fd); } - -void DTRACE_NET_SOCKET_READ(const FunctionCallbackInfo<Value>& args) { - if (!NODE_NET_SOCKET_READ_ENABLED()) - return; - Environment* env = Environment::GetCurrent(args); - SLURP_CONNECTION(args[0], conn); - - if (!args[1]->IsNumber()) { - return env->ThrowError("expected argument 1 to be number of bytes"); - } - - int nbytes = args[1]->Int32Value(); - NODE_NET_SOCKET_READ(&conn, nbytes, conn.remote, conn.port, conn.fd); -} - - -void DTRACE_NET_SOCKET_WRITE(const FunctionCallbackInfo<Value>& args) { - if (!NODE_NET_SOCKET_WRITE_ENABLED()) - return; - Environment* env = Environment::GetCurrent(args); - SLURP_CONNECTION(args[0], conn); - - if (!args[1]->IsNumber()) { - return env->ThrowError("expected argument 1 to be number of bytes"); - } - - int nbytes = args[1]->Int32Value(); - NODE_NET_SOCKET_WRITE(&conn, nbytes, conn.remote, conn.port, conn.fd); -} - - void DTRACE_HTTP_SERVER_REQUEST(const FunctionCallbackInfo<Value>& args) { node_dtrace_http_server_request_t req; @@ -286,8 +251,6 @@ void InitDTrace(Environment* env, Handle<Object> target) { #define NODE_PROBE(name) #name, name { NODE_PROBE(DTRACE_NET_SERVER_CONNECTION) }, { NODE_PROBE(DTRACE_NET_STREAM_END) }, - { NODE_PROBE(DTRACE_NET_SOCKET_READ) }, - { NODE_PROBE(DTRACE_NET_SOCKET_WRITE) }, { NODE_PROBE(DTRACE_HTTP_SERVER_REQUEST) }, { NODE_PROBE(DTRACE_HTTP_SERVER_RESPONSE) }, { NODE_PROBE(DTRACE_HTTP_CLIENT_REQUEST) }, |