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>
This commit is contained in:
parent
8c0742f437
commit
d75fecf6fd
30
src/node.stp
30
src/node.stp
@ -24,36 +24,6 @@ probe node_net_stream_end = process("node").mark("net__stream__end")
|
||||
fd);
|
||||
}
|
||||
|
||||
probe node_net_socket_write = process("node").mark("net__socket__write")
|
||||
{
|
||||
bytes = $arg2;
|
||||
remote = user_string($arg3);
|
||||
port = $arg4;
|
||||
fd = $arg5;
|
||||
|
||||
probestr = sprintf("%s(bytes=%d, remote=%s, port=%d, fd=%d)",
|
||||
$$name,
|
||||
bytes,
|
||||
remote,
|
||||
port,
|
||||
fd);
|
||||
}
|
||||
|
||||
probe node_net_socket_read = process("node").mark("net__socket__read")
|
||||
{
|
||||
bytes = $arg2;
|
||||
remote = user_string($arg3);
|
||||
port = $arg4;
|
||||
fd = $arg5;
|
||||
|
||||
probestr = sprintf("%s(bytes=%d, remote=%s, port=%d, fd=%d)",
|
||||
$$name,
|
||||
bytes,
|
||||
remote,
|
||||
port,
|
||||
fd);
|
||||
}
|
||||
|
||||
probe node_http_server_request = process("node").mark("http__server__request")
|
||||
{
|
||||
remote = user_string($arg3);
|
||||
|
@ -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) },
|
||||
|
@ -57,12 +57,6 @@ provider node {
|
||||
int fd);
|
||||
probe net__stream__end(node_dtrace_connection_t *c, const char *a,
|
||||
int p, int fd) : (node_connection_t *c, string a, int p, int fd);
|
||||
probe net__socket__read(node_dtrace_connection_t *c, int b,
|
||||
const char *a, int p, int fd) : (node_connection_t *c, int b, string a,
|
||||
int p, int fd);
|
||||
probe net__socket__write(node_dtrace_connection_t *c, int b,
|
||||
const char *a, int p, int fd) : (node_connection_t *c, int b, string a,
|
||||
int p, int fd);
|
||||
probe http__server__request(node_dtrace_http_server_request_t *h,
|
||||
node_dtrace_connection_t *c, const char *a, int p, const char *m,
|
||||
const char *u, int fd) : (node_http_request_t *h, node_connection_t *c,
|
||||
|
@ -67,13 +67,8 @@ INLINE bool NODE_HTTP_CLIENT_REQUEST_ENABLED();
|
||||
INLINE bool NODE_HTTP_CLIENT_RESPONSE_ENABLED();
|
||||
INLINE bool NODE_NET_SERVER_CONNECTION_ENABLED();
|
||||
INLINE bool NODE_NET_STREAM_END_ENABLED();
|
||||
INLINE bool NODE_NET_SOCKET_READ_ENABLED();
|
||||
INLINE bool NODE_NET_SOCKET_WRITE_ENABLED();
|
||||
INLINE bool NODE_V8SYMBOL_ENABLED();
|
||||
|
||||
#define NODE_NET_SOCKET_READ(...) /* no-op */
|
||||
#define NODE_NET_SOCKET_WRITE(...) /* no-op */
|
||||
|
||||
} // namespace node
|
||||
|
||||
#endif // SRC_NODE_WIN32_ETW_PROVIDER_H_
|
||||
|
@ -7,5 +7,3 @@ macro DTRACE_HTTP_SERVER_REQUEST(x) = ;
|
||||
macro DTRACE_HTTP_SERVER_RESPONSE(x) = ;
|
||||
macro DTRACE_NET_SERVER_CONNECTION(x) = ;
|
||||
macro DTRACE_NET_STREAM_END(x) = ;
|
||||
macro DTRACE_NET_SOCKET_READ(x) = ;
|
||||
macro DTRACE_NET_SOCKET_WRITE(x) = ;
|
||||
|
@ -141,8 +141,6 @@ if (global.DTRACE_HTTP_SERVER_RESPONSE) {
|
||||
knownGlobals.push(DTRACE_HTTP_CLIENT_REQUEST);
|
||||
knownGlobals.push(DTRACE_NET_STREAM_END);
|
||||
knownGlobals.push(DTRACE_NET_SERVER_CONNECTION);
|
||||
knownGlobals.push(DTRACE_NET_SOCKET_READ);
|
||||
knownGlobals.push(DTRACE_NET_SOCKET_WRITE);
|
||||
}
|
||||
|
||||
if (global.COUNTER_NET_SERVER_CONNECTION) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user