Typical profiling of JavaScript code is performed by passing the --gjs
and
--no-perf
options:
$ sysprof-cli --gjs --no-perf -- gjs script.js
This will result in a capture.syscap
file in the current directory, which can
then be reviewed in the sysprof GUI:
$ sysprof capture.syscap
Other flags can also be combined with --gjs
when appropriate:
sysprof-cli --gjs --gtk -- gjs gtk.js
- Christian Hergert's Blog Posts on Sysprof