Comparing version 5.4.0 to 5.4.1
@@ -23,2 +23,6 @@ # 0x kernel tracing | ||
> Note: `0x` uses `linux_perf` for kernel tracing, which requires spawning a non-nodejs process | ||
directly, for this reason, one can't use `--kernel-tracing` together with `--on-port`. Instead, | ||
run it in a separate terminal. | ||
## Troubleshooting | ||
@@ -25,0 +29,0 @@ |
@@ -85,3 +85,3 @@ # UI | ||
Functions in dependencies. That is, functions that are in files within the `node_modules` folder). | ||
Functions in dependencies. That is, functions that are in files within the `node_modules` folder. | ||
@@ -88,0 +88,0 @@ Enabled by default. |
{ | ||
"name": "0x", | ||
"version": "5.4.0", | ||
"version": "5.4.1", | ||
"description": "🔥 single-command flamegraph profiling 🔥", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -13,4 +13,2 @@ 'use strict' | ||
pathTo, | ||
spawnOnPort, | ||
when | ||
} = require('../lib/util') | ||
@@ -24,2 +22,7 @@ | ||
const { status, outputDir, workingDir, name, onPort, pathToNodeBinary } = args | ||
if (onPort) { | ||
cb(Error('--on-port couldn\'t be used with Linux profiling. Run it in a separate terminal')) | ||
return | ||
} | ||
const perf = pathTo('perf') | ||
@@ -52,4 +55,3 @@ if (!perf) { | ||
'--perf-basic-prof', | ||
'-r', path.join(__dirname, '..', 'lib', 'preload', 'soft-exit'), | ||
...(onPort ? ['-r', path.join(__dirname, '..', 'lib', 'preload', 'detect-port.js')] : []) | ||
'-r', path.join(__dirname, '..', 'lib', 'preload', 'soft-exit.js'), | ||
].filter(Boolean).concat(args.argv), { | ||
@@ -69,16 +71,4 @@ stdio: ['ignore', 'inherit', 'inherit', 'ignore', 'ignore', 'pipe'] | ||
if (onPort) status('Profiling\n') | ||
else status('Profiling') | ||
status('Profiling') | ||
if (onPort) { | ||
when(proc.stdio[5], 'data').then((port) => { | ||
const whenPort = spawnOnPort(onPort, port) | ||
whenPort.then(() => proc.kill('SIGINT')) | ||
whenPort.catch((err) => { | ||
proc.kill() | ||
cb(err) | ||
}) | ||
}) | ||
} | ||
const handleExit = () => { | ||
@@ -85,0 +75,0 @@ spawn('sudo', ['kill', '-SIGINT', '' + proc.pid], { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
101682
2006