This is a simple toolkit for working with SpiderMonkey's Tracelogger debugging/profiling system.
- Ensure
python3
is installed. - Copy the contents of this repository wherever you like.
- Symlink
tracelogger.py
astracelogger
somewhere in your$PATH
.
The tracelogger
command contains three handy subcommands. Run tracelogger -h
for usage information, or tracelogger <subcommand> -h
for usage information
for a particular subcommand.
Clears out all tl-*.json
and tl-*.tl
files left over from previous
Tracelogger runs. Use -d
/--directory
to manually specify a non-default
Tracelogger output directory. -v
/--verbose
prints out each file deleted, and
-i
/--interactive
asks for confirmation before deleting each file.
Run a command with the magic environment variables set to enable Tracelogger
output. Use -l
/--log
and -o
/--options
if you need to manually tweak
the values of these variables. Separate your command from your tracelogger run
options with --
. For example:
tracelogger run -- js -e 'print("Hi!");'
tracelogger run -o Something,Special -- js -e 'print("Hi!");'
Collect Tracelogger output files in a directory and move them to a new one.
tracelogger save ~/traces/my-benchmark
Use -d
/--directory
to manually specify a non-default source directory, and
-c
/--copy
to copy the files instead of moving them. -v
/--verbose
turns
on verbose logging and -i
/--interactive
asks for confirmation before
processing each file.
Launch a local web server with a GUI viewer for your Tracelogger output. Use
-o
/--open
to auto-open the web page in a new browser tab, and
-d
/--directory
if you need to manually specify a non-default Tracelogger
output directory. -t
/--title
lets you set a custom title for the web viewer
page (useful when comparing multiple traces). -a
/--address
and -p
/--port
let you specify a specific host address and port for the HTTP server, and
-v
/--verbose
prints out server request log information.
tracelogger-tools is licensed under the Mozilla Public License, Version 2.0. The text of this license can be found in the LICENSE file and on its website. The FAQ may also be helpful.
The web UI is taken and slightly modified from h4writer/tracelogger.