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

build: remove dtrace & etw support #43652

Merged
merged 1 commit into from Jul 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 0 additions & 3 deletions common.gypi
Expand Up @@ -546,9 +546,6 @@
}],
],
}],
['OS=="freebsd" and node_use_dtrace=="true"', {
'libraries': [ '-lelf' ],
}],
['OS=="freebsd"', {
'ldflags': [
'-Wl,--export-dynamic',
Expand Down
44 changes: 0 additions & 44 deletions configure.py
Expand Up @@ -508,18 +508,6 @@
help='MIPS floating-point ABI ({0}) [default: %(default)s]'.format(
', '.join(valid_mips_float_abi)))

parser.add_argument('--with-dtrace',
action='store_true',
dest='with_dtrace',
default=None,
help='build with DTrace (default is true on sunos and darwin)')

parser.add_argument('--with-etw',
action='store_true',
dest='with_etw',
default=None,
help='build with ETW (default is true on Windows)')

parser.add_argument('--use-largepages',
action='store_true',
dest='node_use_large_pages',
Expand Down Expand Up @@ -628,18 +616,6 @@

parser.add_argument_group(http2_optgroup)

parser.add_argument('--without-dtrace',
action='store_true',
dest='without_dtrace',
default=None,
help='build without DTrace')

parser.add_argument('--without-etw',
action='store_true',
dest='without_etw',
default=None,
help='build without ETW')

parser.add_argument('--without-npm',
action='store_true',
dest='without_npm',
Expand Down Expand Up @@ -1306,18 +1282,6 @@ def configure_node(o):

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

if flavor in ('solaris', 'mac', 'linux', 'freebsd'):
use_dtrace = not options.without_dtrace
# Don't enable by default on linux and freebsd
if flavor in ('linux', 'freebsd'):
use_dtrace = options.with_dtrace
o['variables']['node_use_dtrace'] = b(use_dtrace)
elif options.with_dtrace:
raise Exception(
'DTrace is currently only supported on SunOS, MacOS or Linux systems.')
else:
o['variables']['node_use_dtrace'] = 'false'

if options.node_use_large_pages or options.node_use_large_pages_script_lld:
warn('''The `--use-largepages` and `--use-largepages-script-lld` options
have no effect during build time. Support for mapping to large pages is
Expand All @@ -1328,14 +1292,6 @@ def configure_node(o):
if options.no_ifaddrs:
o['defines'] += ['SUNOS_NO_IFADDRS']

# By default, enable ETW on Windows.
if flavor == 'win':
o['variables']['node_use_etw'] = b(not options.without_etw)
elif options.with_etw:
raise Exception('ETW is only supported on Windows.')
else:
o['variables']['node_use_etw'] = 'false'

o['variables']['node_with_ltcg'] = b(options.with_ltcg)
if flavor != 'win' and options.with_ltcg:
raise Exception('Link Time Code Generation is only supported on Windows.')
Expand Down
1 change: 0 additions & 1 deletion doc/api/process.md
Expand Up @@ -1075,7 +1075,6 @@ An example of the possible output looks like:
node_shared_http_parser: 'false',
node_shared_libuv: 'false',
node_shared_zlib: 'false',
node_use_dtrace: 'false',
node_use_openssl: 'true',
node_shared_openssl: 'false',
strict_aliasing: 'true',
Expand Down
7 changes: 0 additions & 7 deletions lib/_http_client.js
Expand Up @@ -77,11 +77,6 @@ const {
validateInteger,
} = require('internal/validators');
const { getTimerDuration } = require('internal/timers');
const {
DTRACE_HTTP_CLIENT_REQUEST,
DTRACE_HTTP_CLIENT_RESPONSE
} = require('internal/dtrace');

const {
hasObserver,
startPerf,
Expand Down Expand Up @@ -356,7 +351,6 @@ ObjectSetPrototypeOf(ClientRequest.prototype, OutgoingMessage.prototype);
ObjectSetPrototypeOf(ClientRequest, OutgoingMessage);

ClientRequest.prototype._finish = function _finish() {
DTRACE_HTTP_CLIENT_REQUEST(this, this.socket);
FunctionPrototypeCall(OutgoingMessage.prototype._finish, this);
if (hasObserver('http')) {
startPerf(this, kClientRequestStatistics, {
Expand Down Expand Up @@ -642,7 +636,6 @@ function parserOnIncomingClient(res, shouldKeepAlive) {
req.shouldKeepAlive = false;
}

DTRACE_HTTP_CLIENT_RESPONSE(socket, req);
if (req[kClientRequestStatistics] && hasObserver('http')) {
stopPerf(req, kClientRequestStatistics, {
detail: {
Expand Down
6 changes: 0 additions & 6 deletions lib/_http_server.js
Expand Up @@ -79,10 +79,6 @@ const {
validateBoolean
} = require('internal/validators');
const Buffer = require('buffer').Buffer;
const {
DTRACE_HTTP_SERVER_REQUEST,
DTRACE_HTTP_SERVER_RESPONSE
} = require('internal/dtrace');
const { setInterval, clearInterval } = require('timers');
let debug = require('internal/util/debuglog').debuglog('http', (fn) => {
debug = fn;
Expand Down Expand Up @@ -215,7 +211,6 @@ ObjectSetPrototypeOf(ServerResponse.prototype, OutgoingMessage.prototype);
ObjectSetPrototypeOf(ServerResponse, OutgoingMessage);

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

res.shouldKeepAlive = keepAlive;
res[kUniqueHeaders] = server[kUniqueHeaders];
DTRACE_HTTP_SERVER_REQUEST(req, socket);

if (onRequestStartChannel.hasSubscribers) {
onRequestStartChannel.publish({
Expand Down
21 changes: 0 additions & 21 deletions lib/internal/dtrace.js

This file was deleted.

6 changes: 0 additions & 6 deletions lib/net.js
Expand Up @@ -111,10 +111,6 @@ const {
validateString
} = require('internal/validators');
const kLastWriteQueueSize = Symbol('lastWriteQueueSize');
const {
DTRACE_NET_SERVER_CONNECTION,
DTRACE_NET_STREAM_END
} = require('internal/dtrace');

// Lazy loaded to improve startup performance.
let cluster;
Expand Down Expand Up @@ -654,7 +650,6 @@ Socket.prototype._read = function(n) {
Socket.prototype.end = function(data, encoding, callback) {
stream.Duplex.prototype.end.call(this,
data, encoding, callback);
DTRACE_NET_STREAM_END(this);
return this;
};

Expand Down Expand Up @@ -1711,7 +1706,6 @@ function onconnection(err, clientHandle) {
socket.server = self;
socket._server = self;

DTRACE_NET_SERVER_CONNECTION(socket);
self.emit('connection', socket);
}

Expand Down