tree: 17201bb14c80f0d7c54916057a196a74d6641ba6 [path history] [tgz]
  1. commands/
  2. meta/
  3. tests/
  4. app.cc
  5. app.h
  6. BUILD.gn
  7. command.cc
  8. command.h
  9. main.cc
  10. OWNERS
  11. README.md
  12. results_export.cc
  13. results_export.h
  14. results_output.cc
  15. results_output.h
  16. spec.cc
  17. spec.h
  18. spec_unittest.cc
  19. tracer.cc
  20. tracer.h
garnet/bin/trace/README.md

trace - collects and converts trace data

trace enables tracing of an application. It exposes the following command line interface (invoke trace with --help to get an overview):

trace [options] command [command-specific options]
  --help: Produce this help message

  list-categories - list all known categories
  record - starts tracing and records data
    --[command args]: Run program before starting trace.
        The program is terminated when tracing ends unless --detach is specified
    --append-args=[""]: Additional args for the app being traced, appended to
        those from the spec file, if any
    --buffer-size=[4]: Maximum size of trace buffer for each provider in
        megabytes
    --provider-buffer-size=[provider-name:buffer-size]:
        Specify the buffer size that "provider-name" will use.
        May be specified multiple times, once per provider.
    --buffering-mode=[oneshot]: Specify buffering mode as one of oneshot,
        circular, or streaming
    --categories=[""]: Categories that should be enabled for tracing
    --decouple=[false]: Don't stop tracing when the traced program exits
    --detach=[false]: Don't stop the traced program when tracing finished
    --spawn=[false]: Use fdio_spawn to run a legacy app.
        Detach will have no effect when using this option.
    --return-child-result=[true]: Pass on the child's return code.
    --duration=[10]: Trace will be active for this many seconds after the
        session has been started. The provided value must be integral.
    --output-file=[/data/trace.json]: Trace data is stored in this file
        The output file may be "tcp:IP-ADDRESS:PORT" in which case a stream
        socket is connected to that address and trace data is streamed directly
        to it instead of saving the output locally. Streaming via TCP is
        generally only done when invoked by traceutil.
    --compress=[false]: Compress the output stream. Compressing a network
        output stream is not supported, if both --output-file=tcp:... and
        --compress are provided, --compress is ignored.
    --spec-file=[none]: Tracing specification file

Options provided on the command line override options found in the --spec-file spec file.