From e6a254880758dba82d4ce9a17dcbf0e2ffadd61c Mon Sep 17 00:00:00 2001 From: Tom Gallacher Date: Fri, 18 Jan 2019 16:29:38 +0000 Subject: [PATCH] src: allow --perf-basic-prof-only-functions in NODE_OPTIONS PR-URL: https://github.com/nodejs/node/pull/25565 Reviewed-By: Sam Roberts Reviewed-By: Colin Ihrig Reviewed-By: Anna Henningsen Reviewed-By: Gireesh Punathil Reviewed-By: James M Snell --- doc/api/cli.md | 1 + src/node_options.cc | 4 ++++ test/parallel/test-cli-node-options.js | 1 + 3 files changed, 6 insertions(+) diff --git a/doc/api/cli.md b/doc/api/cli.md index 06de886c69499a..04f4801c3d4c93 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -712,6 +712,7 @@ V8 options that are allowed are: - `--abort-on-uncaught-exception` - `--max-old-space-size` - `--perf-basic-prof` +- `--perf-basic-prof-only-functions` - `--perf-prof` - `--stack-trace-limit` diff --git a/src/node_options.cc b/src/node_options.cc index d163d73f2246aa..4494dda7d9a22b 100644 --- a/src/node_options.cc +++ b/src/node_options.cc @@ -299,6 +299,10 @@ PerIsolateOptionsParser::PerIsolateOptionsParser() { kAllowedInEnvironment); AddOption("--max-old-space-size", "", V8Option{}, kAllowedInEnvironment); AddOption("--perf-basic-prof", "", V8Option{}, kAllowedInEnvironment); + AddOption("--perf-basic-prof-only-functions", + "", + V8Option{}, + kAllowedInEnvironment); AddOption("--perf-prof", "", V8Option{}, kAllowedInEnvironment); AddOption("--stack-trace-limit", "", V8Option{}, kAllowedInEnvironment); diff --git a/test/parallel/test-cli-node-options.js b/test/parallel/test-cli-node-options.js index 4ff63009a7a1e3..1554e80c0b8de0 100644 --- a/test/parallel/test-cli-node-options.js +++ b/test/parallel/test-cli-node-options.js @@ -38,6 +38,7 @@ expect('--trace-event-file-pattern {pid}-${rotation}.trace_events ' + if (!common.isWindows) { expect('--perf-basic-prof', 'B\n'); + expect('--perf-basic-prof-only-functions', 'B\n'); } if (common.isLinux && ['arm', 'x64'].includes(process.arch)) {