<commit_before>\chapter{\TRACE XML configuration file}\label{cha:XML}

\TRACE is configured through a XML file that is set through the {\tt EXTRAE\_CONFIG\_FILE} environment variable. The included examples provide several XML files to serve as a basis for the end user. There are four XML files:
\begin{itemize}
 \item {\tt extrae.xml} Exemplifies all the options available to set up in the configuration file. We will discuss below all the sections and options available. It is also available on this document on appendix \ref{cha:wholeXML}.
 \item {\tt extrae\_explained.xml} The same as the above with some comments on each section.
 \item {\tt summarized\_trace\_basic.xml} A small example for gathering information of MPI and OpenMP information with some performace counters and calling information at each MPI call.
 \item {\tt detailed\_trace\_basic.xml} A small example for gathering a summarized information of MPI and OpenMP parallel paradigms.
\end{itemize}

Please note that most of the nodes present in the XML file have an {\tt enabled} attribute that allows turning on and off some parts of the instrumentation mechanism. For example, {\tt <mpi enabled="yes">} means MPI instrumentation is enabled and process all the contained XML subnodes, if any; whether {\tt <mpi enabled="no">} means to skip gathering MPI information and do not process XML subnodes.

Each section points which environment variables could be used if the tracing package lacks XML support. See appendix \ref{cha:EnvVar} for the entire list.

Sometimes the XML tags are used for time selection (duration, for instance). In such tags, the following postfixes can be used: n or ns for nanoseconds, u or us for microseconds, m or ms for milliseconds, s for seconds, M for minutes, H for hours and D for days.

\section{XML Section: Trace configuration}\label{sec:XMLSectionTraceConfiguration}

The basic trace behavior is determined in the first part of the XML and {\bf contains} all of the remaining options. It looks like:

\input{XML/config.xml}

The {\tt <?xml version='1.0'?>} is mandatory for all XML files. Don't touch this. The available tunable options are under the {\tt <trace>} node:
\begin{itemize}
 \item {\tt enabled} Set to {\tt "yes"} if you want to generate tracefiles.
 \item {\tt home} Set to where the instrumentation package is installed. Usually it points to the same location that {\tt EXTRAE\_HOME} environment variable.
 \item {\tt initial-mode} Available options
  \begin{itemize}
   \item {\tt detail} Provides detailed information of the tracing.<commit_msg>Fix text<commit_after>\chapter{\TRACE XML configuration file}\label{cha:XML}

\TRACE is configured through a XML file that is set through the {\tt EXTRAE\_CONFIG\_FILE} environment variable. The included examples provide several XML files to serve as a basis for the end user. For instance, the MPI examples provide four XML configuration files:
\begin{itemize}
 \item {\tt extrae.xml} Exemplifies all the options available to set up in the configuration file. We will discuss below all the sections and options available. It is also available on this document on appendix \ref{cha:wholeXML}.
 \item {\tt extrae\_explained.xml} The same as the above with some comments on each section.
 \item {\tt summarized\_trace\_basic.xml} A small example for gathering information of MPI and OpenMP information with some performace counters and calling information at each MPI call.
 \item {\tt detailed\_trace\_basic.xml} A small example for gathering a summarized information of MPI and OpenMP parallel paradigms.
 \item {\tt extrae\_bursts\_1ms.xml} An XML configuration example to setup the bursts tracing mode. This XML file will only capture the regions in between MPI calls that last more than the given threshold (1ms in this example).
\end{itemize}

Please note that most of the nodes present in the XML file have an {\tt enabled} attribute that allows turning on and off some parts of the instrumentation mechanism. For example, {\tt <mpi enabled="yes">} means MPI instrumentation is enabled and process all the contained XML subnodes, if any; whether {\tt <mpi enabled="no">} means to skip gathering MPI information and do not process XML subnodes.

Each section points which environment variables could be used if the tracing package lacks XML support. See appendix \ref{cha:EnvVar} for the entire list.

Sometimes the XML tags are used for time selection (duration, for instance). In such tags, the following postfixes can be used: n or ns for nanoseconds, u or us for microseconds, m or ms for milliseconds, s for seconds, M for minutes, H for hours and D for days.

\section{XML Section: Trace configuration}\label{sec:XMLSectionTraceConfiguration}

The basic trace behavior is determined in the first part of the XML and {\bf contains} all of the remaining options. It looks like:

\input{XML/config.xml}

The {\tt <?xml version='1.0'?>} is mandatory for all XML files. Don't touch this. The available tunable options are under the {\tt <trace>} node:
\begin{itemize}
 \item {\tt enabled} Set to {\tt "yes"} if you want to generate tracefiles.
 \item {\tt home} Set to where the instrumentation package is installed. Usually it points to the same location that {\tt EXTRAE\_HOME} environment variable.
 \item {\tt initial-mode} Available options
  \begin{itemize}
   \item {\tt detail} Provides detailed information of the tracing.
{'fraction_non_alphanumeric': 0.06770255271920089, 'fraction_numerical': 0.0011098779134295228, 'mean_word_length': 4.478216818642351, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 2, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 13}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1313015', 'n_tokens_mistral': 1347, 'n_tokens_neox': 1307, 'n_words': 789}