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

[8.x] deps: backport V8 memory fixes #21269

Closed
wants to merge 51 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
4994b7f
http: add options to http.createServer()
Oct 19, 2017
5bfc1d1
http2: add http fallback options to .createServer
hekike Oct 27, 2017
852b996
http2: add req and res options to server creation
Oct 5, 2017
0829b54
doc: fix typo in http2.md
vsemozhetbyt Feb 19, 2018
f7d96ac
http2: pass session to DEBUG_HTTP2SESSION2
danbev May 18, 2018
83cd22e
tools: speed up lint-md-build
refack Nov 10, 2017
bdbef5f
src: remove superfluous check in backtrace_posix.cc
addaleax Nov 11, 2017
141e3e9
trace_events: add file pattern cli option
AndreasMadsen Jan 31, 2018
b2b85e5
src, test: node internals' postmortem metadata
Dec 26, 2017
d27ca6d
test: fix cctest -Wunused-variable warning
bnoordhuis Feb 2, 2018
591812f
src: do not redefine private for GenDebugSymbols
joyeecheung Feb 8, 2018
3a7ad60
src: expose uv.errmap to binding
joyeecheung Dec 25, 2017
4a55524
util: implement util.getSystemErrorName()
joyeecheung Jan 16, 2018
05076ac
errors: lazy load util in internal/errors.js
joyeecheung Jan 24, 2018
de86203
util: skip type checks in internal getSystemErrorName
joyeecheung Feb 3, 2018
64f4b19
errors: move error creation helpers to errors.js
joyeecheung Feb 3, 2018
a974479
errors: make message non-enumerable
BridgeAR Apr 1, 2018
4406f6e
test: set clientOpts.port property
danbev Apr 3, 2018
4f05d1b
test: remove test case 0 from tls-cnnic-whitelist
danbev Apr 13, 2018
6251f2a
crypto: remove BIO_set_shutdown
danbev Dec 7, 2017
4512116
tools: don't lint-md as part of main lint target
refack Dec 7, 2017
a6d6325
tls: use correct class name in deprecation message
addaleax Dec 9, 2017
4cd0ab5
src: make FSEventWrap/StatWatcher::Start more robust
TimothyGu Dec 3, 2017
e0a780b
url: added space to class string of iterator objects
prohaejin Dec 9, 2017
d81a3f4
url: added url fragment lookup table
Kimeiga Dec 8, 2017
b07b9f2
test: add test for postmortem metadata validation
cjihrig Dec 14, 2017
524efb9
lib, src: use process.config instead of regex
maclover7 Dec 21, 2017
3aefc25
test: fix unreliable async-hooks/test-signalwrap
Trott Dec 22, 2017
14f29e3
src: remove duplicate words in comments
tniessen Jan 1, 2018
b046412
http2: remove duplicate words in comments
tniessen Jan 1, 2018
d8c3ecc
perf_hooks: fix scheduling regression
apapirovski Jan 9, 2018
2b941c6
src: update make for new code coverage locations
mhdawson Jan 4, 2018
a337e3a
src: fix code coverage cleanup
mhdawson Jan 10, 2018
0230caf
test: refactor test-repl
addaleax Dec 31, 2017
07e8195
benchmark: add JSStreamWrap benchmark
addaleax Jan 4, 2018
5b8e46d
src: harden JSStream callbacks
addaleax Jan 7, 2018
0082efd
src: rename `On*` -> `Emit*` for stream callbacks
addaleax Dec 15, 2017
396c96e
build: make gyp user defined variables lowercase
danbev Oct 16, 2017
04c166a
build: add node_lib_target_name to cctest deps
danbev Feb 5, 2018
e37643c
src: refactor callback #defines into C++ templates
addaleax Jan 13, 2018
453077f
http: simplify parser lifetime tracking
addaleax Jan 13, 2018
29f49e9
deps: cherry-pick dbfe4a49d8 from upstream V8
Nov 9, 2017
c4c468b
module: Set dynamic import callback
Oct 1, 2017
a0c7df8
module: enable dynamic import flag for esmodules
MylesBorins Jan 25, 2018
1af6ac2
doc: Update tools/icu/README.md
srl295 Nov 10, 2017
de963da
tools: fix icu readme lint error
apapirovski Jan 30, 2018
1a3c296
stream: delete redundant code
Jan 14, 2018
4b2792a
stream: delete redundant code
Jan 15, 2018
084ef60
n-api: take n-api out of experimental
mhdawson Mar 9, 2018
95d0e13
deps: V8: cherry-pick 502c6ae6 from upstream
ofrobots Jun 11, 2018
ca8df17
deps: V8: cherry-pick 5ebd6fcd from upstream
ofrobots Jun 11, 2018
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
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
lib/internal/v8_prof_polyfill.js
lib/punycode.js
test/addons/??_*
test/es-module/test-esm-dynamic-import.js
test/fixtures
tools/eslint
tools/icu
Expand Down
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ deps/npm/node_modules/.bin/

# test artifacts
tools/faketime
tools/remark-cli
tools/remark-preset-lint-node
tools/remark-cli/node_modules
tools/remark-preset-lint-node/node_modules
icu_config.gypi
*.tap

Expand Down
9 changes: 4 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ check: test
coverage-clean:
if [ -d lib_ ]; then $(RM) -r lib; mv lib_ lib; fi
$(RM) -r node_modules
$(RM) -r gcovr testing
$(RM) -r gcovr build
$(RM) -r out/$(BUILDTYPE)/.coverage
$(RM) -r .cov_tmp
$(RM) out/$(BUILDTYPE)/obj.target/node/{src,gen}/*.gcda
Expand All @@ -162,11 +162,11 @@ coverage-build: all
$(NODE) ./deps/npm install nyc --no-save --no-package-lock; fi
if [ ! -d gcovr ]; then git clone --depth=1 \
--single-branch git://github.com/gcovr/gcovr.git; fi
if [ ! -d testing ]; then git clone --depth=1 \
--single-branch https://github.com/nodejs/testing.git; fi
if [ ! -d build ]; then git clone --depth=1 \
--single-branch https://github.com/nodejs/build.git; fi
if [ ! -f gcovr/scripts/gcovr.orig ]; then \
(cd gcovr && patch -N -p1 < \
"$(CURDIR)/testing/coverage/gcovr-patches.diff"); fi
"$(CURDIR)/build/jenkins/scripts/coverage/gcovr-patches.diff"); fi
if [ -d lib_ ]; then $(RM) -r lib; mv lib_ lib; fi
mv lib lib_
$(NODE) ./node_modules/.bin/nyc instrument --extension .js --extension .mjs lib_/ lib/
Expand Down Expand Up @@ -1123,7 +1123,6 @@ lint: ## Run JS, C++, MD and doc linters.
@EXIT_STATUS=0 ; \
$(MAKE) lint-js || EXIT_STATUS=$$? ; \
$(MAKE) lint-cpp || EXIT_STATUS=$$? ; \
$(MAKE) lint-md || EXIT_STATUS=$$? ; \
$(MAKE) lint-addon-docs || EXIT_STATUS=$$? ; \
$(MAKE) lint-md || EXIT_STATUS=$$? ; \
exit $$EXIT_STATUS
Expand Down
107 changes: 107 additions & 0 deletions benchmark/net/net-wrap-js-stream-passthrough.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
// test the speed of .pipe() with JSStream wrapping for PassThrough streams
'use strict';

const common = require('../common.js');
const { PassThrough } = require('stream');

const bench = common.createBenchmark(main, {
len: [102400, 1024 * 1024 * 16],
type: ['utf', 'asc', 'buf'],
dur: [5],
}, {
flags: ['--expose-internals']
});

var dur;
var len;
var type;
var chunk;
var encoding;
var JSStreamWrap; // Can only require internals inside main().

function main(conf) {
dur = +conf.dur;
len = +conf.len;
type = conf.type;
JSStreamWrap = require('internal/wrap_js_stream');

switch (type) {
case 'buf':
chunk = Buffer.alloc(len, 'x');
break;
case 'utf':
encoding = 'utf8';
chunk = 'ü'.repeat(len / 2);
break;
case 'asc':
encoding = 'ascii';
chunk = 'x'.repeat(len);
break;
default:
throw new Error(`invalid type: ${type}`);
}

doBenchmark();
}

function Writer() {
this.received = 0;
this.writable = true;
}

Writer.prototype.write = function(chunk, encoding, cb) {
this.received += chunk.length;

if (typeof encoding === 'function')
encoding();
else if (typeof cb === 'function')
cb();

return true;
};

// doesn't matter, never emits anything.
Writer.prototype.on = function() {};
Writer.prototype.once = function() {};
Writer.prototype.emit = function() {};
Writer.prototype.prependListener = function() {};


function flow() {
const dest = this.dest;
const res = dest.write(chunk, encoding);
if (!res)
dest.once('drain', this.flow);
else
process.nextTick(this.flow);
}

function Reader() {
this.flow = flow.bind(this);
this.readable = true;
}

Reader.prototype.pipe = function(dest) {
this.dest = dest;
this.flow();
return dest;
};


function doBenchmark() {
const reader = new Reader();
const writer = new Writer();

// the actual benchmark.
const fakeSocket = new JSStreamWrap(new PassThrough());
bench.start();
reader.pipe(fakeSocket);
fakeSocket.pipe(writer);

setTimeout(function() {
const bytes = writer.received;
const gbits = (bytes * 8) / (1024 * 1024 * 1024);
bench.end(gbits);
process.exit(0);
}, dur * 1000);
}
20 changes: 10 additions & 10 deletions common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -40,29 +40,29 @@

'conditions': [
['GENERATOR=="ninja"', {
'OBJ_DIR': '<(PRODUCT_DIR)/obj',
'V8_BASE': '<(PRODUCT_DIR)/obj/deps/v8/src/libv8_base.a',
'obj_dir': '<(PRODUCT_DIR)/obj',
'v8_base': '<(PRODUCT_DIR)/obj/deps/v8/src/libv8_base.a',
}, {
'OBJ_DIR%': '<(PRODUCT_DIR)/obj.target',
'V8_BASE%': '<(PRODUCT_DIR)/obj.target/deps/v8/src/libv8_base.a',
'obj_dir%': '<(PRODUCT_DIR)/obj.target',
'v8_base%': '<(PRODUCT_DIR)/obj.target/deps/v8/src/libv8_base.a',
}],
['OS == "win"', {
'os_posix': 0,
'v8_postmortem_support%': 'false',
'OBJ_DIR': '<(PRODUCT_DIR)/obj',
'V8_BASE': '<(PRODUCT_DIR)/lib/v8_libbase.lib',
'obj_dir': '<(PRODUCT_DIR)/obj',
'v8_base': '<(PRODUCT_DIR)/lib/v8_libbase.lib',
}, {
'os_posix': 1,
'v8_postmortem_support%': 'true',
}],
['OS== "mac"', {
'OBJ_DIR%': '<(PRODUCT_DIR)/obj.target',
'V8_BASE': '<(PRODUCT_DIR)/libv8_base.a',
'obj_dir%': '<(PRODUCT_DIR)/obj.target',
'v8_base': '<(PRODUCT_DIR)/libv8_base.a',
}],
['openssl_fips != ""', {
'OPENSSL_PRODUCT': '<(STATIC_LIB_PREFIX)crypto<(STATIC_LIB_SUFFIX)',
'openssl_product': '<(STATIC_LIB_PREFIX)crypto<(STATIC_LIB_SUFFIX)',
}, {
'OPENSSL_PRODUCT': '<(STATIC_LIB_PREFIX)openssl<(STATIC_LIB_SUFFIX)',
'openssl_product': '<(STATIC_LIB_PREFIX)openssl<(STATIC_LIB_SUFFIX)',
}],
['OS=="mac"', {
'clang%': 1,
Expand Down
2 changes: 1 addition & 1 deletion deps/v8/include/v8-version.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#define V8_MAJOR_VERSION 6
#define V8_MINOR_VERSION 2
#define V8_BUILD_NUMBER 414
#define V8_PATCH_LEVEL 54
#define V8_PATCH_LEVEL 57

// Use 1 for candidates and 0 otherwise.
// (Boolean macro values are not supported by all preprocessors.)
Expand Down
Loading