Skip to content

Commit e2189e8

Browse files
committed
build: remove dtrace & etw support
There are no clear indicators anyone is using the dtrace USDT probes. ETW support is very intertwined with the dtrace infrastructure. It's not clear if anyone uses ETW so to keep things simple it too is removed. Fixes: #43649
1 parent 5de16e0 commit e2189e8

31 files changed

+8
-2719
lines changed

common.gypi

-3
Original file line numberDiff line numberDiff line change
@@ -546,9 +546,6 @@
546546
}],
547547
],
548548
}],
549-
['OS=="freebsd" and node_use_dtrace=="true"', {
550-
'libraries': [ '-lelf' ],
551-
}],
552549
['OS=="freebsd"', {
553550
'ldflags': [
554551
'-Wl,--export-dynamic',

configure.py

-44
Original file line numberDiff line numberDiff line change
@@ -508,18 +508,6 @@
508508
help='MIPS floating-point ABI ({0}) [default: %(default)s]'.format(
509509
', '.join(valid_mips_float_abi)))
510510

511-
parser.add_argument('--with-dtrace',
512-
action='store_true',
513-
dest='with_dtrace',
514-
default=None,
515-
help='build with DTrace (default is true on sunos and darwin)')
516-
517-
parser.add_argument('--with-etw',
518-
action='store_true',
519-
dest='with_etw',
520-
default=None,
521-
help='build with ETW (default is true on Windows)')
522-
523511
parser.add_argument('--use-largepages',
524512
action='store_true',
525513
dest='node_use_large_pages',
@@ -628,18 +616,6 @@
628616

629617
parser.add_argument_group(http2_optgroup)
630618

631-
parser.add_argument('--without-dtrace',
632-
action='store_true',
633-
dest='without_dtrace',
634-
default=None,
635-
help='build without DTrace')
636-
637-
parser.add_argument('--without-etw',
638-
action='store_true',
639-
dest='without_etw',
640-
default=None,
641-
help='build without ETW')
642-
643619
parser.add_argument('--without-npm',
644620
action='store_true',
645621
dest='without_npm',
@@ -1306,18 +1282,6 @@ def configure_node(o):
13061282

13071283
o['variables']['enable_lto'] = b(options.enable_lto)
13081284

1309-
if flavor in ('solaris', 'mac', 'linux', 'freebsd'):
1310-
use_dtrace = not options.without_dtrace
1311-
# Don't enable by default on linux and freebsd
1312-
if flavor in ('linux', 'freebsd'):
1313-
use_dtrace = options.with_dtrace
1314-
o['variables']['node_use_dtrace'] = b(use_dtrace)
1315-
elif options.with_dtrace:
1316-
raise Exception(
1317-
'DTrace is currently only supported on SunOS, MacOS or Linux systems.')
1318-
else:
1319-
o['variables']['node_use_dtrace'] = 'false'
1320-
13211285
if options.node_use_large_pages or options.node_use_large_pages_script_lld:
13221286
warn('''The `--use-largepages` and `--use-largepages-script-lld` options
13231287
have no effect during build time. Support for mapping to large pages is
@@ -1328,14 +1292,6 @@ def configure_node(o):
13281292
if options.no_ifaddrs:
13291293
o['defines'] += ['SUNOS_NO_IFADDRS']
13301294

1331-
# By default, enable ETW on Windows.
1332-
if flavor == 'win':
1333-
o['variables']['node_use_etw'] = b(not options.without_etw)
1334-
elif options.with_etw:
1335-
raise Exception('ETW is only supported on Windows.')
1336-
else:
1337-
o['variables']['node_use_etw'] = 'false'
1338-
13391295
o['variables']['node_with_ltcg'] = b(options.with_ltcg)
13401296
if flavor != 'win' and options.with_ltcg:
13411297
raise Exception('Link Time Code Generation is only supported on Windows.')

doc/api/process.md

-1
Original file line numberDiff line numberDiff line change
@@ -1075,7 +1075,6 @@ An example of the possible output looks like:
10751075
node_shared_http_parser: 'false',
10761076
node_shared_libuv: 'false',
10771077
node_shared_zlib: 'false',
1078-
node_use_dtrace: 'false',
10791078
node_use_openssl: 'true',
10801079
node_shared_openssl: 'false',
10811080
strict_aliasing: 'true',

lib/_http_client.js

-7
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,6 @@ const {
7777
validateInteger,
7878
} = require('internal/validators');
7979
const { getTimerDuration } = require('internal/timers');
80-
const {
81-
DTRACE_HTTP_CLIENT_REQUEST,
82-
DTRACE_HTTP_CLIENT_RESPONSE
83-
} = require('internal/dtrace');
84-
8580
const {
8681
hasObserver,
8782
startPerf,
@@ -352,7 +347,6 @@ ObjectSetPrototypeOf(ClientRequest.prototype, OutgoingMessage.prototype);
352347
ObjectSetPrototypeOf(ClientRequest, OutgoingMessage);
353348

354349
ClientRequest.prototype._finish = function _finish() {
355-
DTRACE_HTTP_CLIENT_REQUEST(this, this.socket);
356350
FunctionPrototypeCall(OutgoingMessage.prototype._finish, this);
357351
if (hasObserver('http')) {
358352
startPerf(this, kClientRequestStatistics, {
@@ -633,7 +627,6 @@ function parserOnIncomingClient(res, shouldKeepAlive) {
633627
req.shouldKeepAlive = false;
634628
}
635629

636-
DTRACE_HTTP_CLIENT_RESPONSE(socket, req);
637630
if (req[kClientRequestStatistics] && hasObserver('http')) {
638631
stopPerf(req, kClientRequestStatistics, {
639632
detail: {

lib/_http_server.js

-6
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,6 @@ const {
7979
validateBoolean
8080
} = require('internal/validators');
8181
const Buffer = require('buffer').Buffer;
82-
const {
83-
DTRACE_HTTP_SERVER_REQUEST,
84-
DTRACE_HTTP_SERVER_RESPONSE
85-
} = require('internal/dtrace');
8682
const { setInterval, clearInterval } = require('timers');
8783
let debug = require('internal/util/debuglog').debuglog('http', (fn) => {
8884
debug = fn;
@@ -215,7 +211,6 @@ ObjectSetPrototypeOf(ServerResponse.prototype, OutgoingMessage.prototype);
215211
ObjectSetPrototypeOf(ServerResponse, OutgoingMessage);
216212

217213
ServerResponse.prototype._finish = function _finish() {
218-
DTRACE_HTTP_SERVER_RESPONSE(this.socket);
219214
if (this[kServerResponseStatistics] && hasObserver('http')) {
220215
stopPerf(this, kServerResponseStatistics, {
221216
detail: {
@@ -944,7 +939,6 @@ function parserOnIncoming(server, socket, state, req, keepAlive) {
944939

945940
res.shouldKeepAlive = keepAlive;
946941
res[kUniqueHeaders] = server[kUniqueHeaders];
947-
DTRACE_HTTP_SERVER_REQUEST(req, socket);
948942

949943
if (onRequestStartChannel.hasSubscribers) {
950944
onRequestStartChannel.publish({

lib/internal/dtrace.js

-21
This file was deleted.

lib/net.js

-6
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,6 @@ const {
110110
validateString
111111
} = require('internal/validators');
112112
const kLastWriteQueueSize = Symbol('lastWriteQueueSize');
113-
const {
114-
DTRACE_NET_SERVER_CONNECTION,
115-
DTRACE_NET_STREAM_END
116-
} = require('internal/dtrace');
117113

118114
// Lazy loaded to improve startup performance.
119115
let cluster;
@@ -653,7 +649,6 @@ Socket.prototype._read = function(n) {
653649
Socket.prototype.end = function(data, encoding, callback) {
654650
stream.Duplex.prototype.end.call(this,
655651
data, encoding, callback);
656-
DTRACE_NET_STREAM_END(this);
657652
return this;
658653
};
659654

@@ -1682,7 +1677,6 @@ function onconnection(err, clientHandle) {
16821677
socket.server = self;
16831678
socket._server = self;
16841679

1685-
DTRACE_NET_SERVER_CONNECTION(socket);
16861680
self.emit('connection', socket);
16871681
}
16881682

0 commit comments

Comments
 (0)