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

Trace Events JS API doesn't work w/o CLI args #24944

Closed
kjin opened this issue Dec 10, 2018 · 0 comments
Closed

Trace Events JS API doesn't work w/o CLI args #24944

kjin opened this issue Dec 10, 2018 · 0 comments
Labels
regression Issues related to regressions. trace_events Issues and PRs related to V8, Node.js core, and userspace code trace events.

Comments

@kjin
Copy link
Contributor

kjin commented Dec 10, 2018

  • Version: 10.9+, 11+
  • Platform: macOS, Ubuntu
  • Subsystem: trace_events

The Trace Events JS API isn't functional if none of --trace-events-enabled or --trace-event-categories is passed as a CLI argument. In other words, traces are never written when this program is run without command line arguments:

const trace_events = require('trace_events');
const tracing = trace_events.createTracing({ categories: ['v8', 'node', 'node.perf', 'node.async_hooks'] });
tracing.enable();
tracing.disable();

In Node 10.8 in earlier this code works as intended, and a trace file is created.

@bnoordhuis bnoordhuis added the trace_events Issues and PRs related to V8, Node.js core, and userspace code trace events. label Dec 10, 2018
@joyeecheung joyeecheung added the regression Issues related to regressions. label Dec 10, 2018
kjin added a commit to kjin/node that referenced this issue Feb 14, 2019
The Trace Events JS API isn't functional if none of
--trace-events-enabled or --trace-event-categories is passed as a CLI
argument. This commit fixes that.

In addition, we currently don't test the trace_events JS API in the case where no CLI
args are provided. This commit adds that test.

Fixes nodejs#24944
targos pushed a commit that referenced this issue Feb 15, 2019
The Trace Events JS API isn't functional if none of
--trace-events-enabled or --trace-event-categories is passed as a CLI
argument. This commit fixes that.

In addition, we currently don't test the trace_events JS API in the
casewhere no CLI args are provided. This commit adds that test.

Fixes #24944

PR-URL: #24945
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
rvagg pushed a commit that referenced this issue Feb 28, 2019
The Trace Events JS API isn't functional if none of
--trace-events-enabled or --trace-event-categories is passed as a CLI
argument. This commit fixes that.

In addition, we currently don't test the trace_events JS API in the
casewhere no CLI args are provided. This commit adds that test.

Fixes #24944

PR-URL: #24945
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression Issues related to regressions. trace_events Issues and PRs related to V8, Node.js core, and userspace code trace events.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants