add some documentation for import-fuchsia (and import-chrome) to manual

This commit is contained in:
Simon Cruanes 2023-12-28 18:03:16 -05:00
parent 7769f23c76
commit c6efbf6cb7
No known key found for this signature in database
GPG Key ID: EBFFF6F283F3A2B4

View File

@ -3847,7 +3847,28 @@ You can customize the output with the following command line options:
\section{Importing external profiling data} \section{Importing external profiling data}
\label{importingdata} \label{importingdata}
Tracy can import data generated by other profilers. This external data cannot be directly loaded but must be converted first. Currently, there's only support for converting chrome:tracing data through the \texttt{import-chrome} utility. Tracy can import data generated by other profilers. This external data cannot be directly loaded but must be converted first.
Currently, there's support for the following formats:
\begin{itemize}
\item chrome:tracing data through the \texttt{import-chrome} utility. The trace files
typically have a \texttt{.json} or \texttt{.json.zst} extension.
To use this tool to process a file named \texttt{mytracefile.json}, assuming it's compiled, run:
\begin{lstlisting}[language=sh]
$ import-chrome mytracefile.json mytracefile.tracy
$ tracy mytracefile.tracy
\end{lstlisting}
\item \href{https://fuchsia.dev/fuchsia-src/reference/tracing/trace-format}{Fuchsia's tracing format}
data through the \texttt{import-fuchsia} utility.
This format has many commonalities with the chrome:tracing format, but it uses a
compact and efficient binary encoding that can help lower tracing overhead.
The file extension is \texttt{.fxt} or \texttt{.fxt.zst}.
To this this tool, assuming it's compiled, run:
\begin{lstlisting}[language=sh]
$ import-fuchsia mytracefile.fxt mytracefile.tracy
$ tracy mytracefile.tracy
\end{lstlisting}
\end{itemize}
\begin{bclogo}[ \begin{bclogo}[
noborder=true, noborder=true,
@ -3855,6 +3876,7 @@ couleur=black!5,
logo=\bclampe logo=\bclampe
]{Compressed traces} ]{Compressed traces}
Tracy can import traces compressed with the Zstandard algorithm (for example, using the \texttt{zstd} command-line utility). Traces ending with \texttt{.zst} extension are assumed to be compressed. Tracy can import traces compressed with the Zstandard algorithm (for example, using the \texttt{zstd} command-line utility). Traces ending with \texttt{.zst} extension are assumed to be compressed.
This applies for both chrome and fuchsia traces.
\end{bclogo} \end{bclogo}
\begin{bclogo}[ \begin{bclogo}[
@ -3862,7 +3884,8 @@ noborder=true,
couleur=black!5, couleur=black!5,
logo=\bclampe logo=\bclampe
]{Source locations} ]{Source locations}
Chrome tracing format doesn't document a way to provide source location data. The \texttt{import-chrome} utility will however recognize a custom \texttt{loc} tag in the root of zone begin events. You should be formatting this data in the usual \texttt{filename:line} style, for example: \texttt{hello.c:42}. Providing the line number (including a colon) is optional but highly recommended. Chrome tracing format doesn't document a way to provide source location data.
The \texttt{import-chrome} and \texttt{import-fuchsia} utilities will however recognize a custom \texttt{loc} tag in the root of zone begin events. You should be formatting this data in the usual \texttt{filename:line} style, for example: \texttt{hello.c:42}. Providing the line number (including a colon) is optional but highly recommended.
\end{bclogo} \end{bclogo}
\begin{bclogo}[ \begin{bclogo}[