Michaël Zasso
0817840f77
lib: force using primordials for JSON, Math and Reflect
...
Use the "no-restricted-globals" ESLint rule to lint for it.
PR-URL: https://github.com/nodejs/node/pull/27027
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2019-04-03 21:36:08 +08:00
Daiki Arai
b02cac5b09
lib: convert to Arrow Function
...
convert to Arrow Function and test by `./tools/test.py tick-processor`
PR-URL: https://github.com/nodejs/node/pull/24615
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Masashi Hirano <shisama07@gmail.com >
2018-11-28 14:59:07 +05:30
Anna Henningsen
87b808f761
src,lib: move natives and constants to internalBinding()
...
Refs: https://github.com/nodejs/node/issues/22160
PR-URL: https://github.com/nodejs/node/pull/23663
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Weijia Wang <starkwang@126.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: Denys Otrishko <shishugi@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
2018-10-21 03:17:12 +02:00
cjihrig
22b6804259
lib: define printErr() in script string
...
This commit moves the printErr() function, used by the
tick profiler processer, into the code string passed to
vm.runInThisContext().
PR-URL: https://github.com/nodejs/node/pull/19285
Fixes: https://github.com/nodejs/node/issues/19260
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-03-12 08:45:13 -07:00
Anna Henningsen
b24d65dcdc
lib: re-fix v8_prof_processor
...
Make the script not error out immediately because of a missing
pseudo-global.
(Note that it seems like tests are still broken on `master`.)
PR-URL: https://github.com/nodejs/node/pull/19059
Fixes: https://github.com/nodejs/node/issues/19044
Refs: https://github.com/nodejs/node/pull/18623
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Evan Lucas <evanlucas@me.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matheus Marchini <matheus@sthima.com >
Reviewed-By: Minwoo Jung <minwoo@nodesource.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-03-05 09:16:18 +00:00
Myles Borins
99d693da5c
lib: replace eval with vm.runInThisContext
...
PR-URL: https://github.com/nodejs/node/pull/18623
Refs: https://github.com/nodejs/node/pull/18212#pullrequestreview-94616927
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-02-17 14:35:34 +01:00
cjihrig
42258d7e54
lib: include missing profiler file
...
This commit includes deps/v8/tools/arguments.js, which is
needed by the profiler.
PR-URL: https://github.com/nodejs/node/pull/18455
Fixes: https://github.com/nodejs/node/issues/18451
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-02-02 10:58:30 -08:00
Timothy Gu
0e10717e43
build: runtime-deprecate requiring deps
...
PR-URL: https://github.com/nodejs/node/pull/16392
Fixes: https://github.com/nodejs/node/pull/15566#discussion_r146111170
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2017-11-13 10:50:12 -08:00
davidmarkclements
7c948ce233
fix --prof-process --preprocess flag
...
This is a one-line fix to prevent the --preprocess
option (used with --prof-process to output JSON)
to cause an isolate log file profiling process to crash.
PR-URL: https://github.com/nodejs/node/pull/14966
Reviewed-By: Luca Maraschi <luca.maraschi@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-08-23 08:19:14 -07:00
Fedor Indutny
27cc30aea8
profiler: declare missing printErr
...
`v8/tools/tickprocessor.js` assumes presence of global `printErr`, which
is defined in `d8`.
PR-URL: https://github.com/nodejs/node/pull/13590
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2017-06-12 14:10:35 +02:00
Adri Van Houdt
3ddc9dba7e
process: changed var to const in internal/v8_prof_processor
...
PR-URL: https://github.com/nodejs/node/pull/8619
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ilkka Myller <ilkka.myller@nodefield.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2016-09-22 09:48:47 -07:00
Fedor Indutny
15d72c8365
tickprocessor: apply c++filt manually on mac
...
`/bin/sh -c` trick wasn't working for several reasons:
* `/bin/sh -c "..."` expects the first argument after `"..."` to be a
`$0`, not a `$1`. Previously `-n` wasn't passed to `nm` because of
this, and many symbols were ordered improperly
* `c++filt` was applied not only to the names of the functions but to
their `nm` prefixes like `t` and `a` (`t xxx` turns into
`unsigned char xxx`).
Instead of applying `c++filt` wide and using `sh -c`, execute `nm` as
requested by `deps/v8/tools/tickprocessor.js` and apply `c++filt` to all
matching entries manually.
Included test demonstrates where previous approach failed: all builtins
were merged into `v8::internal::Builtins::~Builtins`, because they were
prefixed by `t` in `nm` output.
PR-URL: https://github.com/nodejs/node/pull/8480
Reviewed-By: Matthew Loring <mattloring@google.com >
2016-09-13 12:47:20 +02:00
Rich Trott
4bbd41864a
tools: enable linting for v8_prof_processor.js
...
`lib/internal/v8_prof_processor.js` was being excluded from linting, but
the only lint issue it has is that it cannot run in strict mode. Disable
the `strict` rule with a comment and remove the file from
`.eslintignore`.
PR-URL: https://github.com/nodejs/node/pull/6262
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Roman Klauke <romaaan.git@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-04-20 08:33:59 -07:00
Ali Ijaz Sheikh
953173b0d7
lib: wrap tick_processor scripts in IIFE
...
PR-URL: https://github.com/nodejs/node/pull/4722
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Michaël Zasso <mic.besace@gmail.com >
2016-03-03 20:35:20 -08:00
Matt Loring
3e2a2e6efa
tools: run tick processor without forking
...
Using the tick processor no longer creates temporary files or spawns a
child process.
PR-URL: https://github.com/nodejs/node/pull/4224
Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: jasnell - James M Snell <jasnell@gmail.com >
2015-12-29 14:14:43 -08:00
Matt Loring
49440b7ea2
tools: add --prof-process flag to node binary
...
This change cleans up outstanding comments on #3032 . It improves error
handling when no isolate file is provided and adds the --prof-process
flag to the node binary which executes the tick processor on the
provided isolate file.
PR-URL: https://github.com/nodejs/node/pull/4021
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Evan Lucas <evanlucas@me.com >
2015-12-08 02:00:46 +01:00