Skip to content

Commit aa3a572

Browse files
authoredJul 17, 2022
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 PR-URL: #43652 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
1 parent 8baf372 commit aa3a572

31 files changed

+10
-2722
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,
@@ -356,7 +351,6 @@ ObjectSetPrototypeOf(ClientRequest.prototype, OutgoingMessage.prototype);
356351
ObjectSetPrototypeOf(ClientRequest, OutgoingMessage);
357352

358353
ClientRequest.prototype._finish = function _finish() {
359-
DTRACE_HTTP_CLIENT_REQUEST(this, this.socket);
360354
FunctionPrototypeCall(OutgoingMessage.prototype._finish, this);
361355
if (hasObserver('http')) {
362356
startPerf(this, kClientRequestStatistics, {
@@ -642,7 +636,6 @@ function parserOnIncomingClient(res, shouldKeepAlive) {
642636
req.shouldKeepAlive = false;
643637
}
644638

645-
DTRACE_HTTP_CLIENT_RESPONSE(socket, req);
646639
if (req[kClientRequestStatistics] && hasObserver('http')) {
647640
stopPerf(req, kClientRequestStatistics, {
648641
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
@@ -111,10 +111,6 @@ const {
111111
validateString
112112
} = require('internal/validators');
113113
const kLastWriteQueueSize = Symbol('lastWriteQueueSize');
114-
const {
115-
DTRACE_NET_SERVER_CONNECTION,
116-
DTRACE_NET_STREAM_END
117-
} = require('internal/dtrace');
118114

119115
// Lazy loaded to improve startup performance.
120116
let cluster;
@@ -654,7 +650,6 @@ Socket.prototype._read = function(n) {
654650
Socket.prototype.end = function(data, encoding, callback) {
655651
stream.Duplex.prototype.end.call(this,
656652
data, encoding, callback);
657-
DTRACE_NET_STREAM_END(this);
658653
return this;
659654
};
660655

@@ -1711,7 +1706,6 @@ function onconnection(err, clientHandle) {
17111706
socket.server = self;
17121707
socket._server = self;
17131708

1714-
DTRACE_NET_SERVER_CONNECTION(socket);
17151709
self.emit('connection', socket);
17161710
}
17171711

0 commit comments

Comments
 (0)
Please sign in to comment.