From c6efbf6cb71ceb028ac5792ed1e146ed7aefecbe Mon Sep 17 00:00:00 2001 From: Simon Cruanes Date: Thu, 28 Dec 2023 18:03:16 -0500 Subject: [PATCH] add some documentation for import-fuchsia (and import-chrome) to manual --- manual/tracy.tex | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/manual/tracy.tex b/manual/tracy.tex index 64a3be56..b1ec8746 100644 --- a/manual/tracy.tex +++ b/manual/tracy.tex @@ -3847,7 +3847,28 @@ You can customize the output with the following command line options: \section{Importing external profiling data} \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}[ noborder=true, @@ -3855,6 +3876,7 @@ couleur=black!5, logo=\bclampe ]{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. +This applies for both chrome and fuchsia traces. \end{bclogo} \begin{bclogo}[ @@ -3862,7 +3884,8 @@ noborder=true, couleur=black!5, logo=\bclampe ]{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} \begin{bclogo}[