Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

src: Remove unused Dtrace probes. #694

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 0 additions & 30 deletions src/node.stp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
37 changes: 0 additions & 37 deletions src/node_dtrace.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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) },
Expand Down
6 changes: 0 additions & 6 deletions src/node_provider.d
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
5 changes: 0 additions & 5 deletions src/node_win32_etw_provider.h
Original file line number Diff line number Diff line change
Expand Up @@ -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_
2 changes: 0 additions & 2 deletions src/notrace_macros.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,3 @@
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) = ;
2 changes: 0 additions & 2 deletions test/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down