summaryrefslogtreecommitdiff
path: root/lib/internal/v8_prof_polyfill.js
AgeCommit message (Collapse)Author
2019-11-25lib: replace var with letDennis Saenger
PR-URL: https://github.com/nodejs/node/pull/30396 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-10-05lib: make tick processor detect xcodebuild errorsBen Noordhuis
`node --prof-process` on macOS calls out to nm(1) to look up C++ symbols. If Xcode hasn't been properly installed or its license hasn't been accepted yet, it prints out an error and exits. Before this commit, that error was swallowed and the output of the tick processor was not showing the C++ entry points. This commit detects that error message and turns it into an exception. No regression test because this particular condition is hard to test for without going to extreme lengths to mock the output of nm. Fixes: https://github.com/nodejs/node/issues/29804 PR-URL: https://github.com/nodejs/node/pull/29830 Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Minwoo Jung <minwoo@nodesource.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-11-06v8_prof_polyfill: remove unused catch bindingscjihrig
PR-URL: https://github.com/nodejs/node/pull/24079 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Wyatt Preul <wpreul@gmail.com>
2018-02-17tools, test: fix prof polyfill readlinekillagu
`node --prof foo.js` may not print the full profile log file, leaving the last line broken (for example `tick,`. When that happens, `readline` will be stuck in an infinite loop. This patch fixes it. Also introduced `common.isCPPSymbolsNotMapped` to avoid duplicated code on tick-processor tests. PR-URL: https://github.com/nodejs/node/pull/18641 Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: Matheus Marchini <matheus@sthima.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-11-11lib: replace String concatenation with templatesaiHemak
PR-URL: https://github.com/nodejs/node/pull/16922 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
2017-11-07lib: shuffle v8_prof_polyfill.js for unit testingBen Noordhuis
Make it possible to test the versionCheck() function from that file in isolation. PR-URL: https://github.com/nodejs/node/pull/16769 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2017-11-07lib: fix version check in tick processorBen Noordhuis
Introduced in 70832bc3538 ("build: add V8 embedder version string".) Fixes: https://github.com/nodejs/node/issues/16736 PR-URL: https://github.com/nodejs/node/pull/16769 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2017-10-18build: add V8 embedder version stringMichaël Zasso
After this commit, `process.versions.v8` will look like: "6.0.287.53-node.0". The goal is that everytime we apply a non-official patch to `deps/v8`, we increment our own number instead of V8's patch level. This number must be set back to 0 after major V8 updates. Fixes: https://github.com/nodejs/node/issues/15698 PR-URL: https://github.com/nodejs/node/pull/15785 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2017-06-19v8: fix RegExp nits in v8_prof_polyfill.jsVse Mozhet Byt
* Do not repeat RegExp creation in cycle. * Use sufficient string instead of RegExp in split(). PR-URL: https://github.com/nodejs/node/pull/13709 Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2016-10-06lib: fix TypeError in v8-polyfillWyatt Preul
PR-URL: https://github.com/nodejs/node/pull/8863 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-09-22lib: changed var to const in internal/v8_polyfillAdri Van Houdt
PR-URL: https://github.com/nodejs/node/pull/8615 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-09-13tickprocessor: apply c++filt manually on macFedor Indutny
`/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-03-16buffer: add .from(), .alloc() and .allocUnsafe()James M Snell
Several changes: * Soft-Deprecate Buffer() constructors * Add `Buffer.from()`, `Buffer.alloc()`, and `Buffer.allocUnsafe()` * Add `--zero-fill-buffers` command line option * Add byteOffset and length to `new Buffer(arrayBuffer)` constructor * buffer.fill('') previously had no effect, now zero-fills * Update the docs PR-URL: https://github.com/nodejs/node/pull/4682 Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
2015-12-29tools: run tick processor without forkingMatt Loring
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-08tools: add --prof-process flag to node binaryMatt Loring
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>