doc: Add documentation for the local statistics
[deliverable/tracecompass.git] / doc / org.eclipse.tracecompass.doc.user / doc / User-Guide.mediawiki
index cd79d074d7d49f3f056c57cb9e30568b161c3e53..f9f51ed37e7398005d07747a345621c0bdeccee7 100644 (file)
@@ -58,12 +58,20 @@ At present, the LTTng plug-ins support the following kernel-oriented views:
 
 * ''Control Flow'' - to visualize processes state transitions
 * ''Resources'' - to visualize system resources state transitions
-* ''CPU usage'' - to visualize the usage of the processor with respect to the time in traces
+* ''CPU Usage'' - to visualize the usage of the processor with respect to the time in traces
+* ''Kernel Memory Usage'' - to visualize the relative usage of system memory
+* ''IO Usage'' - to visualize the usage of input/output devices
+* ''System Calls'' - presents all the system calls in a table view
+* ''System Call Statistics'' - present all the system calls statistics
+* ''System Call Density'' - to visualize the system calls displayed by duration
+* ''System Call vs Time'' - to visualize when system calls occur
 
 Also, the LTTng plug-ins supports the following User Space traces views:
 
 * ''Memory Usage'' - to visualize the memory usage per thread with respect to time in the traces
 * ''Call Stack'' - to visualize the call stack's evolution over time
+* ''Function Duration Density'' - to visualize function calls displayed by duration
+* ''Flame Graph'' - to visualize why the CPU is busy
 
 Finally, the LTTng plug-ins supports the following Control views:
 * ''Control'' - to control the tracer and configure the tracepoints
@@ -587,6 +595,8 @@ An event range can be selected by holding the '''Shift''' key while clicking ano
 
 The Events editor can be closed, disposing a trace. When this is done, all the views displaying the information will be updated with the trace data of the next event editor tab. If all the editor tabs are closed, then the views will display their empty states.
 
+Column order and size is preserved when changed. If a column is lost due to it being resized to 0 pixels, right click on the context menu and select '''Show All''', it will be restored to a visible size.
+
 === Searching and Filtering ===
 
 Searching and filtering of events in the table can be performed by entering matching conditions in one or multiple columns in the header row (the first row below the column header).
@@ -843,6 +853,74 @@ The view shows a tree of currently selected traces and their registered state sy
 
 To modify the time of attributes shown in the view, select a different current time in other views that support time synchronization (e.g. event table, histogram view). When a time range is selected, this view uses the begin time.
 
+== External Analyses ==
+
+Trace Compass supports the execution of '''external analyses''' conforming to the [https://github.com/lttng/lami-spec/blob/v1.0.1/lami.adoc LAMI 1.0.x specification]. This includes recent versions of the [https://github.com/lttng/lttng-analyses LTTng-Analyses project].
+
+An external analysis is a [[#Running an External Analysis|program executed by Trace Compass]]. When the program is done analyzing, Trace Compass generates a '''[[#Opening a Report|report]]''' containing its results. A report contains one or more tables which can also be viewed as bar and scatter [[#Creating a Chart from a Result Table|charts]].
+
+'''Note''': The program to execute is found by searching the directories listed in the standard <code>$PATH</code> environment variable when no path separator (<code>/</code> on Unix and OS X, <code>\</code> on Windows) is found in its command.
+
+Trace Compass ships with a default list of ''descriptors'' of external analyses (not the analyses themselves), including the descriptors of the [http://github.com/lttng/lttng-analyses LTTng analyses]. If the LTTng analyses project is installed, its analyses are available when opening or importing an LTTng kernel trace.
+
+=== Running an External Analysis ===
+
+To run an external analysis:
+
+# [[#Importing Traces to the Project|Import a trace to the project]].
+# Make sure the trace is opened by double-clicking its name in the [[#Project Explorer View]].
+# Under the trace in the [[#Project Explorer View]], expand ''External Analyses'' to view the list of available external analyses.<p>The external analyses which are either missing or not compatible with the trace are stroke and cannot be executed.</p><p>[[Image:images/externalAnalyses/external-analyses-list.png]]</p>
+# '''Optional''': If you want the external analysis to analyze a specific time range of the current trace, make a time range selection.<p>You can use views like the [[#Histogram View]] and the [[#Control Flow View]] (if it's available for this trace) to make a time range selection.</p><p>External analyses are executed on the current time range selection if there is one, or on the whole trace otherwise.</p>
+# Right-click the external analysis to run and click '''Run External Analysis'''.<p>[[Image:images/externalAnalyses/run-external-analysis.png]]</p>
+# In the opened ''External Analysis Parameters'' window, optionally enter extra parameters to pass to the program.<p>[[Image:images/externalAnalyses/external-analysis-parameters-dialog.png]]</p>
+# Click '''OK''' to start the analysis.
+
+Note that many external analyses can be started concurrently.
+
+When the external analysis is done analyzing, its results are saved as a [[#Opening a Report|report]] in Trace Compass. The tables contained in this report are also automatically opened into a new report view when the analysis is finished.
+
+=== Opening a Report ===
+
+A '''report''' is created after a successful [[#Running an External Analysis|execution of an external analysis]].
+
+To open a report:
+
+* Under ''Reports'' under a trace in the [[#Project Explorer View]], double-click the report to open.<p>Each result table generated by the external analysis is shown in its own tab in the opened report view.</p><p>[[Image:images/externalAnalyses/report-view.png]]</p>
+
+=== Creating a Chart from a Result Table ===
+
+To create a bar or a scatter chart from the data of a given result table:
+
+# [[#Opening a Report|Open the report]] containing the result table to use for creating the chart.
+# In the opened report view, click the tab of the result table to use for creating the chart.
+# Click the ''View Menu'' button, then click either '''New custom bar chart''' or '''New custom scatter chart'''.<p>[[Image:images/externalAnalyses/new-custom-scatter-chart-menu.png]]</p>
+# In the opened ''Bar chart series creation'' or ''Scatter chart series creation'' window, under ''Series creator'', select a column to use for the X axis of the chart, and one or more columns to use for the Y axis of the chart, then click '''Add''' to create a series.<p>[[Image:images/externalAnalyses/chart-configuration-dialog.png]]</p><p>Repeat this step to create more series.</p>
+# Click '''OK''' to create the chart.<p>The chart is created and shown at the right of its source result table.</p><p>[[Image:images/externalAnalyses/table-and-chart.png]]</p>
+
+=== Showing or Hiding a Result Table ===
+
+To show or hide a result table once a [[#Creating a Chart from a Result Table|chart]] has been created:
+
+* In the report view, click the ''Toggle the Table view of the results'' button.<p>[[Image:images/externalAnalyses/table-and-chart-toggle-button.png]]</p><p>If the result table was visible, it is now hidden:</p><p>[[Image:images/externalAnalyses/chart-only.png]]</p>
+
+=== Adding and Removing a User-Defined External Analysis ===
+
+You can add a user-defined external analysis to the current list of external analyses. Note that the command to invoke must conform to the machine interface of [http://github.com/lttng/lttng-analyses LTTng analyses] 0.4.
+
+'''Note''': If you want to create your own external analysis, consider following the [http://lttng.org/files/lami/lami-1.0.1.html LAMI 1.0 specification], which is supported by later versions of Trace Compass.
+
+To add a user-defined external analysis:
+
+# Under any trace in the [[#Project Explorer View]], right-click ''External Analyses'' and click '''Add External Analysis'''.<p>[[Image:images/externalAnalyses/add-external-analysis.png]]</p>
+# In the opened ''Add External Analysis'' window, enter the name of the new external analysis and the associated command to run.<p>[[Image:images/externalAnalyses/add-external-analysis-dialog.png]]</p><p>The name is the title of the external analysis as shown under ''External Analyses'' in the [[#Project Explorer View]].</p><p>The command is the complete command line to execute. You can put arguments containing spaces or other special characters in double quotes.</p><p>'''Note''': If the command is not a file system path, then it must be found in the directories listed in the <code>$PATH</code> environment variable.</p>
+# Click '''OK''' to add the user-defined external analysis.<p>A user-defined external analysis with a green icon is created under ''External Analyses'' in the [[#Project Explorer View]].</p><p>[[Image:images/externalAnalyses/user-defined-external-analysis.png]]</p>
+
+'''Note''': The new external analysis entry is saved in the workspace.
+
+To remove a user-defined external analysis:
+
+* Under ''External Analyses'' in the [[#Project Explorer View]], right-click the external analysis to remove and click '''Remove External Analysis'''.<p>[[Image:images/externalAnalyses/remove-external-analysis.png]]</p><p>'''Note''': Only user-defined (green icon) external analyses can be removed.</p>
+
 == Custom Parsers ==
 
 Custom parser wizards allow the user to define their own parsers for text or XML traces. The user defines how the input should be parsed into internal trace events and identifies the event fields that should be created and displayed. Traces created using a custom parser can be correlated with other built-in traces or traces added by plug-in extension.
@@ -859,8 +937,8 @@ The '''New Custom Text Parser''' wizard can be used to create a custom parser fo
 Fill out the first wizard page with the following information:
 
 * '''Category:''' Enter a category name for the trace type.
-* '''Trace type:''' Enter a name for the trace type, which is also the name of the custom parser.
-* '''Time Stamp format:''' Enter the date and time pattern that will be used to output the Time Stamp.<br>
+* '''Trace type:''' Enter a name for the trace type, which is also the name of the custom parser. This will also be the default event type name.
+* '''Time Stamp format:''' Enter the date and time pattern that will be used to output the Time Stamp, or leave blank to use the default Time Format preference.<br>
 Note: information about date and time patterns can be found here: [http://archive.eclipse.org/tracecompass/doc/stable/org.eclipse.tracecompass.doc.user/reference/api/org/eclipse/tracecompass/tmf/core/timestamp/TmfTimestampFormat.html TmfTimestampFormat]
 
 Click the '''Add next line''', '''Add child line''' or '''Remove line''' buttons to create a new line of input or delete it. For each line of input, enter the following information:
@@ -870,12 +948,15 @@ Note: information about regular expression patterns can be found here: [http://d
 
 * '''Cardinality:''' Enter the minimum and maximum number of lines matching this line's regular expression that must be found in the log. At least the minimum number of lines must be found before the parser will consider the next line. Child lines will always be considered first.
 
+* '''Event type:''' Optionally enable this text field to enter an event type name that will override the default (trace type) when this line matches.
+
 <u>Important note:</u> The custom parsers identify a log entry when the first line's regular expression matches (Root Line n). Each subsequent text line in the log is attempted to be matched against the regular expression of the parser's input lines in the order that they are defined (Line n.*). Only the first matching input line will be used to process the captured data to be stored in the log entry. When a text line matches a Root Line's regular expression, a new log entry is started.
 
 Click the '''Add group''' or '''Remove group''' buttons to define the data extracted from the capturing groups in the line's regular expression. For each group, enter the following information:
 
 * '''Name combo:''' Select a name for the extracted data:
-** '''Time Stamp''': Select this option to identify the time stamp data. The input's data and time pattern must be entered in the format: text box.
+** '''Timestamp''': Select this option to identify the timestamp data. The input's data and time pattern must be entered in the format: text box.
+** '''Event type''': Select this option to identify the event type name. This will override the default or line-specific event type name.
 ** '''Message''': Select this option to identify the main log entry's message. This is usually a group which could have text of greater length.
 ** '''Other''': Select this option to identify any non-standard data. The name must be entered in the name: text box.
 
@@ -927,8 +1008,8 @@ The '''New Custom XML Parser''' wizard can be used to create a custom parser for
 Fill out the first wizard page with the following information:
 
 * '''Category:''' Enter a category name for the trace type.
-* '''Trace type:''' Enter a name for the trace type, which is also the name of the custom parser.
-* '''Time Stamp format:''' Enter the date and time pattern that will be used to output the Time Stamp.<br>
+* '''Trace type:''' Enter a name for the trace type, which is also the name of the custom parser. This will also be the default event type name.
+* '''Time Stamp format:''' Enter the date and time pattern that will be used to output the Time Stamp, or leave blank to use the default Time Format preference.<br>
 Note: information about date and time patterns can be found here: [http://archive.eclipse.org/tracecompass/doc/stable/org.eclipse.tracecompass.doc.user/reference/api/org/eclipse/tracecompass/tmf/core/timestamp/TmfTimestampFormat.html TmfTimestampFormat]
 
 Click the '''Add document element''' button to create a new document element and enter a name for the root-level document element of the XML file.
@@ -939,13 +1020,15 @@ Click the '''Add child''' button to create a new element of input to the documen
 * '''Log entry:''' Select this checkbox to identify an element which represents a log entry. Each element with this name in the XML file will be parsed to a new log entry. At least one log entry element must be identified in the XML document. Log entry elements cannot be nested.
 * '''Name combo:''' Select a name for the extracted data:
 ** '''Ignore''': Select this option to ignore the extracted element's data at this level. It is still possible to extract data from this element's child elements.
-** '''Time Stamp''': Select this option to identify the time stamp data. The input's data and time pattern must be entered in the format: text box.
+** '''Event type''': Select this option to identify the event type name. This will override the default or element-specific event type name.
+** '''Timestamp''': Select this option to identify the timestamp data. The input's data and time pattern must be entered in the format: text box.
 ** '''Message''': Select this option to identify the main log entry's message. This is usually an input which could have text of greater length.
 ** '''Other''': Select this option to identify any non-standard data. The name must be entered in the name: text box. It does not have to match the element name.
 * '''Action combo:''' Select the action to be performed on the extracted data:
 ** '''Set''': Select this option to overwrite the data for the chosen name when there is a match for this element.
 ** '''Append''': Select this option to append to the data with the chosen name, if any, when there is a match for this element.
 ** '''Append with |''' : Select this option to append to the data with the chosen name, if any, when there is a match for this element, using a | separator between matches.
+* '''Event type:''' Optionally enable this text field to enter an event type name that will override the default (trace type) when this element is present.
 
 Note: An element's extracted data 'value' is a parsed string representation of all its attributes, children elements and their own values. To extract more specific information from an element, ignore its data value and extract the data from one or many of its attributes and children elements.
 
@@ -953,7 +1036,8 @@ Click the '''Add attribute''' button to create a new attribute input from the do
 
 * '''Attribute name:''' Enter a name for the attribute that must match an attribute of this element in the XML file.
 * '''Name combo:''' Select a name for the extracted data:
-** '''Time Stamp''': Select this option to identify the time stamp data. The input's data and time pattern must be entered in the format: text box.
+** '''Timestamp''': Select this option to identify the timestamp data. The input's data and time pattern must be entered in the format: text box.
+** '''Event type''': Select this option to identify the event type name. This will override the default or element-specific event type name.
 ** '''Message''': Select this option to identify the main log entry's message. This is usually an input which could have text of greater length.
 ** '''Other''': Select this option to identify any non-standard data. The name must be entered in the name: text box. It does not have to match the element name.
 * '''Action combo:''' Select the action to be performed on the extracted data:
@@ -1102,7 +1186,7 @@ Under the host level two folder groups are located. The first one is the '''Prov
 
 Under the '''Provider''' group all trace providers are displayed. Trace providers are '''Kernel''' and any user space application that supports UST tracing. Under each provider a corresponding list of events are displayed.
 
-Under the '''Sessions''' group all current sessions will be shown. The level under the sessions show the configured domains. Currently the LTTng 2.0 Tracer Toolchan supports domain '''Kernel''' and '''UST global'''. Under each domain the configured channels will be displayed. The last level is under the channels where the configured events are displayed.
+Under the '''Sessions''' group all current sessions will be shown. The level under the sessions show the configured domains. Currently the LTTng Tracer Toolchain supports domain '''Kernel''', '''UST global''', '''JUL''', '''Log4j''' and '''Python'''. Under the domains '''Kernel''' and '''UST Global''' the configured channels will be displayed. The last level is under the channels where the configured events are displayed.
 
 Each session can be '''ACTIVE''' or '''INACTIVE'''. Active means that tracing has been started, inactive means that the tracing has been stopped. Depending on the state of a session a different icon is displayed. The icon for an active session is [[Image:images/Session_active.gif]]. The icon for an inactive session is [[Image:images/Session_inactive.gif]].
 
@@ -1196,6 +1280,8 @@ A dialog box will open for entering information about the channel to be created.
 
 By default the domain '''Kernel''' is selected. To create a UST channel, select '''UST''' under the domain section. The label <Default> in any text box indicates that the default value of the tracer will be configured. To initialize the dialog box press button '''Default'''.
 
+'''Note''': You cannot create a channel under the '''JUL''', '''LOG4J''' and '''Python''' domain. Instead those domains uses a default channel under the '''UST global''' domain named '''lttng_jul_channel''', '''lttng_log4j_channel''' or '''lttng_python_channel'''. Those are the channels that LTTng uses to trace Java or Python application and you cannot add '''UST''' events to those channels.
+
 If required update the following channel information and then press '''Ok'''.
 
 * '''Channel Name''': The name of the channel.
@@ -1273,7 +1359,13 @@ A dialog box will open for entering information about events to be enabled.
 
 By default the domain '''Kernel''' is selected and the kernel specific data sections are created. From this dialog box kernel '''Tracepoint''' events, '''System calls (Syscall)''', a '''Dynamic Probe''' or a '''Dynamic Function entry/return''' probe can be enabled. Note that events of one of these types at a time can be enabled.
 
-To enable '''Tracepoint''' events, first select the corresponding '''Select''' button, then select either all tracepoins (select '''All''') or select selectively one or more tracepoints in the displayed tree of tracepoints and finally press '''Ok'''.
+To enable all '''Tracepoints''' and all '''System calls (Syscall)''', select the button '''Select''' of section '''All Tracepoint Events and Syscalls''' and press '''Ok'''.
+
+[[Image:images/LTTng2EnableAllEventsDialog.png]]
+
+Upon successful operation, the domain '''Kernel''' will be created in the tree (if neccessary), the default channel with name "channel0" will be added under the domain (if necessary) as well as all a wildcard event '''*''' of type  '''TRACEPOINT''' under the channel and a wildcard event '''*''' of type '''SYSCALL''' . The channel and events will be '''ENABLED'''.
+
+To enable '''Tracepoint''' events, first select the corresponding '''Select''' button, then select either all tracepoins (select '''All''') or select selectively one or more tracepoints in the displayed tree of tracepoints. You can also enter directly the name of the events you want to enable (comma separated list and wildcards are supported). Finally press '''Ok'''.
 
 [[Image:images/LTTng2TracepointEventsDialog.png]]
 
@@ -1281,11 +1373,11 @@ Upon successful operation, the domain '''Kernel''' will be created in the tree (
 
 [[Image:images/LTTng2EnabledKernelTracepoints.png]]
 
-To enable all '''Syscalls''', select the corresponding '''Select''' button and press '''Ok'''.
+To enable '''Syscall''' events, first select the corresponding '''Select''' button, then select either all syscalls (select '''All''') or select selectively one or more syscalls in the displayed tree of syscalls. You can also enter directly the name of the events you want to enable (comma separated list and wildcards are supported). Finally press '''Ok'''.
 
 [[Image:images/LTTng2SyscallsDialog.png]]
 
-Upon successful operation, the event with the name '''syscalls''' and event type '''SYSCALL''' will be added under the default channel (channel0). If necessary the domain '''Kernel''' and the channel '''channel0''' will be created.
+Upon successful operation, the domain '''Kernel''' will be created in the tree (if neccessary), the default channel with name "channel0" will be added under the domain (if necessary) as well as all requested events of type '''SYSCALL''' under the channel. The channel and events will be '''ENABLED'''.
 
 [[Image:images/LTTng2EnabledKernelSyscalls.png]]
 
@@ -1325,6 +1417,10 @@ Upon successful operation, the event with the given wildcard and event type '''T
 
 [[Image:images/LTTng2EnabledUstWildcardEvents.png]]
 
+When enabling '''Tracepoint''' with wildcard, it is possible to specify event(s) (comma separated list) that we want to '''exclude''' from that wildcard selection. To '''exclude''' '''Tracepoint''' events, check the corresponding '''Select''' check box, fill the '''Event Names''' field and press '''Ok'''.
+
+[[Image:images/LTTng2UstExcludeEventsDialog.png]]
+
 For UST it is possible to enable '''Tracepoint''' events using log levels. To enable '''Tracepoint''' events using log levels, select first the corresponding '''Select''' button, select a log level from the drop down menu, fill in the relevant information (see below) and press '''Ok'''.
 
 * '''Event Name''': Name to display
@@ -1337,20 +1433,83 @@ Upon successful operation, the event with the given event name and event type ''
 
 [[Image:images/LTTng2EnabledUstLoglevelEvents.png]]
 
+=== Enabling JUL Events On Session Level ===
+
+For enabling JUL loggers, first open the enable events dialog as described in section [[#Enabling Kernel Events On Session Level | Enabling Kernel Events On Session Level]] and select domain '''JUL'''.
+
+To enable '''Loggers''', first select the corresponding '''Select''' button, then select either all loggers (select '''All''') or select selectively one or more loggers in the displayed tree of loggers and finally press '''Ok'''.
+
+[[Image:images/LTTng2JulLoggerEventsDialog.png]]
+
+Upon successful operation, the domain '''JUL''' will be created in the tree (if neccessary). With JUL loggers there is no channel, you see the enabled loggers directly under the '''JUL''' domain. Note that for the case that '''All''' loggers were selected the wildcard '''*''' is used which will be shown in the Control View as below.
+
+[[Image:images/LTTng2EnabledAllJulLoggers.png]]
+
+For JUL it is possible to enable '''Logger''' events using log levels. To enable '''Logger''' events using log levels, check the corresponding '''Select''' button, select a log level from the drop down menu, fill in the relevant information (see below) and press '''Ok'''.
+
+* '''loglevel''': To specify if a range of log levels (0 to selected log level) shall be configured
+* '''loglevel-only''': To specify that only the specified log level shall be configured
+
+[[Image:images/LTTng2JulLoglevelEventsDialog.png]]
+
+=== Enabling LOG4J Events On Session Level ===
+
+For enabling LOG4J loggers, first open the enable events dialog as described in section [[#Enabling JUL Events On Session Level | Enabling JUL Events On Session Level]] and select domain '''LOG4J'''.
+
+To enable '''Loggers''', first select the corresponding '''Select''' button, then select either all loggers (select '''All''') or select selectively one or more loggers in the displayed tree of loggers and finally press '''Ok'''.
+
+[[Image:images/LTTng2Log4jLoggerEventsDialog.png]]
+
+Upon successful operation, the domain '''LOG4J''' will be created in the tree (if neccessary). With LOG4J loggers there is no channel, you see the enabled loggers directly under the '''LOG4J''' domain. Note that for the case that '''All''' loggers were selected the wildcard '''*''' is used which will be shown in the Control View as below.
+
+[[Image:images/LTTng2EnabledAllLog4jLoggers.png]]
+
+For LOG4J it is possible to enable '''Logger''' events using log levels. To enable '''Logger''' events using log levels, check the corresponding '''Select''' button, select a log level from the drop down menu, fill in the relevant information (see below) and press '''Ok'''.
+
+* '''loglevel''': To specify if a range of log levels (0 to selected log level) shall be configured
+* '''loglevel-only''': To specify that only the specified log level shall be configured
+
+[[Image:images/LTTng2Log4jLoglevelEventsDialog.png]]
+
+=== Enabling Python Events On Session Level ===
+
+For enabling Python loggers, first open the enable events dialog as described in section [[#Enabling JUL Events On Session Level | Enabling JUL Events On Session Level]] and select domain '''Python'''.
+
+To enable '''Loggers''', first select the corresponding '''Select''' button, then select either all loggers (select '''All''') or select selectively one or more loggers in the displayed tree of loggers. You can also enter the name of your logger in the text field. Finally press '''Ok'''.
+
+[[Image:images/LTTng2PythonLoggerEventsDialog.png]]
+
+Upon successful operation, the domain '''Python''' will be created in the tree (if neccessary). With Python loggers there is no channel, you see the enabled loggers directly under the '''Python''' domain. Note that for the case that '''All''' loggers were selected the wildcard '''*''' is used which will be shown in the Control View as below.
+
+[[Image:images/LTTng2EnabledAllPythonLoggers.png]]
+
+For Python it is possible to enable '''Logger''' events using log levels. To enable '''Logger''' events using log levels, check the corresponding '''Select''' button, select a log level from the drop down menu, fill in the relevant information (see below) and press '''Ok'''.
+
+* '''loglevel''': To specify if a range of log levels (0 to selected log level) shall be configured
+* '''loglevel-only''': To specify that only the specified log level shall be configured
+
+[[Image:images/LTTng2PythonLoglevelEventsDialog.png]]
+
 === Enabling Events On Domain Level ===
 
-Kernel events can also be enabled on the domain level. For that select the relevant domain tree node, click the right mouse button and the select '''Enable Event (default channel)...'''. A new dialog box will open for providing information about the events to be enabled. Depending on the domain, '''Kernel''' or '''UST global''', the domain specifc fields are shown and the domain selector is preselected and read-only.
+Kernel events can also be enabled on the domain level. For that select the relevant domain tree node, click the right mouse button and the select '''Enable Event (default channel)...'''. A new dialog box will open for providing information about the events to be enabled. Depending on the domain, '''Kernel''', '''UST global''', '''JUL''', '''LOG4J''' or '''Python''', the domain specific fields are shown and the domain selector is preselected and read-only.
 
 [[Image:images/LTTng2EventOnDomainAction.png]]
 
-To enable events for domain '''Kernel''' follow the instructions in section [[#Enabling Kernel Events On Session Level | Enabling Kernel Events On Session Level]], for domain '''UST global''', see section [[#Enabling UST Events On Session Level | Enabling UST Events On Session Level]].
-The events will be add to the default channel '''channel0'''. This channel will be created by on the server side if neccessary.
+Instructions for enalbing events for a particular domain can be found here:
+* '''Kernel''' domain: [[#Enabling Kernel Events On Session Level | Enabling Kernel Events On Session Level]]
+* '''UST global''' domain: [[#Enabling UST Events On Session Level | Enabling UST Events On Session Level]]
+* '''JUL''' domain: [[#Enabling JUL Events On Session Level | Enabling JUL Events On Session Level]]
+* '''LOG4J''' domain: [[#Enabling LOG4J Events On Session Level | Enabling LOG4J Events On Session Level]]
+* '''Python''' domain: [[#Enabling Python Events On Session Level | Enabling Python Events On Session Level]]
+
+The events will be added to the default channel '''channel0'''. This channel will be created by on the server side if necessary.
 
 === Enabling Events On Channel Level ===
 
 Kernel events can also be enabled on the channel level. If necessary, create a channel as described in sections [[#Enabling Channels On Session Level | Enabling Channels On Session Level]] or [[#Enabling Channels On Domain Level | Enabling Channels On Domain Level]].
 
-Then select the relevant channel tree node, click the right mouse button and the select '''Enable Event...'''. A new dialog box will open for providing information about the events to be enabled. Depending on the domain, '''Kernel''' or '''UST global''', the domain specifc fields are shown and the domain selector is preselected and read-only.
+Then select the relevant channel tree node, click the right mouse button and the select '''Enable Event...'''. A new dialog box will open for providing information about the events to be enabled. Depending on the domain, '''Kernel''' or '''UST global''', the domain specific fields are shown and the domain selector is preselected and read-only. Since there is no channel under the '''JUL''', '''LOG4J''' or '''Python''' domain you cannot enable those loggers directly from a channel. 
 
 [[Image:images/LTTng2EventOnChannelAction.png]]
 
@@ -1570,6 +1729,9 @@ The Control View provides property information of selected tree component. Depen
 ** '''Event Type''': The event type ('''TRACEPOINT''' only).
 ** '''Fields''': Shows a list of fields defined for the selected event. (UST only, since support for LTTng Tools v2.1.0)
 ** '''Log Level''': The log level of the event.
+* '''Logger''' Properties (Provider)
+** '''Logger Name''': The name of the logger.
+** '''Logger Type''': The event type ('''TRACEPOINT''' only).
 * '''Session''' Properties
 ** '''Session Name''': The name of the Session.
 ** '''Session Path''': The path on the remote host where the traces will be stored. (Not shown for snapshot sessions).
@@ -1589,12 +1751,19 @@ The Control View provides property information of selected tree component. Depen
 ** '''State''': The channel state ('''ENABLED''' or '''DISABLED''')
 ** '''Sub Buffer size''': The size of the sub-buffers of the channel (in bytes).
 ** '''Switch Timer Interval''': The switch timer interval.
+** '''Number of Discarded Events''': The number of discarded events of the channel.
+** '''Number of Lost Packets''': The number of lost packets of the channel.
 * '''Event''' Properties (Channel)
 ** '''Event Name''': The name of the event.
 ** '''Event Type''': The event type ('''TRACEPOINT''', '''SYSCALL''' or '''PROBE''').
 ** '''Log Level''': The log level of the event. (For LTTng Tools v2.4.0 or later, '''<=''' prior the log level name will indicate a range of log levels and '''==''' a single log level.)
 ** '''State''': The Event state ('''ENABLED''' or '''DISABLED''')
 ** '''Filter''': Shows '''with filter''' if a filter expression is configured else property '''Filter''' is omitted. (since support for LTTng Tools v2.1.0)
+* '''Logger''' Properties (Domain)
+** '''Logger Name''': The name of the logger.
+** '''Logger Type''': The logger type ('''TRACEPOINT''').
+** '''Log Level''': The log level of the logger. (For LTTng Tools v2.4.0 or later, '''<=''' prior the log level name will indicate a range of log levels and '''==''' a single log level.)
+** '''State''': The logger state ('''ENABLED''' or '''DISABLED''')
 
 == LTTng Tracer Control Preferences ==
 
@@ -1617,9 +1786,34 @@ To configure the LTTng command execution timeout, select '''Tracing -> Remote Co
 
 = LTTng Kernel Analysis =
 
-Historically, LTTng was developped to trace the Linux kernel and, over time, a number of kernel-oriented analysis views were developped and organized in a perspective.
+Historically, LTTng was developed to trace the Linux kernel and, over time, a number of kernel-oriented analysis views were developed and organized in a perspective.
+
+This section presents a description of the '''OS Tracing Overview''' perspective and the '''LTTng Kernel''' perspective.
+
+== OS Tracing Overview Perspective ==
+
+The '''OS Tracing Overview''' perspective groups the following views:
+
+* [[#Project Explorer_View | Project Explorer View]]
+* [[#Events_Editor | Events Editor]]
+* [[#Histogram_View | Histogram View]]
+* [[#LTTng CPU Usage View | CPU Usage View]]
+* [[#Disk I/O Activity View | Disk I/O Activity View]]
+* [[#Kernel Memory Usage View | Kernel Memory Usage View]]
+
+The perspective can be opened from the Eclipse Open Perspective dialog ('''Window > Open Perspective... > Other''').
+
+[[Image:images/osOverview/select_os_overview.png]]
+
+This perspective is intended to be used to locate performance issues by observing resource usage.
+
+The perspective can show times resource usage is anomalous. This can help locating the causes of system slowdowns in throughput or response time.
 
-This section presents a description of the LTTng Kernel Perspective.
+An example can be program that is doing a lot of processing then slows down due to a database access. The user will see a dip in CPU usage and maybe a slight rise in I/O access. The user should consider both spike and slums to be an indication of an area worth investigating.
+
+[[Image:images/osOverview/os_overview_perspective.png]]
+
+Once a performance issue has been localized, it can be further investigated with the #LTTng kernel Perspective.
 
 == LTTng Kernel Perspective ==
 
@@ -1688,7 +1882,8 @@ The display of arrows is optional and can be toggled using the '''Hide Arrows'''
 The following mouse actions are available:
 
 * '''left-click''': select a time or time range begin time
-* '''Shift-left-click''': select a time range end time
+* '''Shift-left-click or drag''': Extend or shrink the selection range
+
 * '''left-drag horizontally''': select a time range or change the time range begin or end time
 * '''middle-drag or Ctrl-left-drag horizontally''': pan left or right
 * '''right-drag horizontally''': [[#Zoom region|zoom region]]
@@ -1797,11 +1992,11 @@ The Control Flow View '''toolbar''', located at the top right of the view, has s
 | Resets the zoom window to the full range.
 |-
 | [[Image:images/prev_event.gif]]
-| Select Previous Event
+| Select Previous State Change
 | Selects the previous state for the selected process. Pressing the '''Shift''' key at the same time will update the selection end time of the current selection range.
 |-
 | [[Image:images/next_event.gif]]
-| Select Next Event
+| Select Next State Change
 | Selects the next state for the selected process. Pressing the '''Shift''' key at the same time will update the selection end time of the current selection range.
 |-
 | [[Image:images/add_bookmark.gif]]
@@ -1847,6 +2042,14 @@ The Control Flow View '''toolbar''', located at the top right of the view, has s
 | [[Image:images/follow_arrow_fwd.gif]]
 | Follow CPU Forward
 | Selects the next state following CPU execution across processes. Pressing the '''Shift''' key at the same time will update the selection end time of the current selection range.
+|-
+| [[Image:images/shift_l_edit.gif]]
+| Go to previous event of the selected thread
+| Move to the closest previous event belonging to the selected thread. This action looks through all trace events, unlike the ''Select Previous State Change'' action which only stops at state changes.
+|-
+| [[Image:images/shift_r_edit.gif]]
+| Go to next event of the selected thread
+| Move to the closest following event belonging to the selected thread. This action looks through all trace events, unlike the ''Select Next State Change'' action which only stops at state changes.
 |}
 
 View Menu
@@ -1855,6 +2058,10 @@ View Menu
 |
 | Show Markers
 | A marker highlights a time interval. A marker can be used for instance to indicate a time range where lost events occurred or to bookmark an interesting interval for future reference. Selecting a category name will toggle the visibility of markers of that category.
+|-
+|
+| Thread Presentation
+| Select the threads layout. Two layouts are available. '''Flat''' layout lists the threads in a flat list per trace. '''Hierarchical''' layout shows the threads in a parent-child tree per trace.
 |}
 
 === Marker Axis ===
@@ -1935,11 +2142,11 @@ The Resources View '''toolbar''', located at the top right of the view, has shor
 | Resets the zoom window to the full range.
 |-
 | [[Image:images/prev_event.gif]]
-| Select Previous Event
+| Select Previous State Change
 | Selects the previous state for the selected resource. Pressing the '''Shift''' key at the same time will update the selection end time of the current selection range.
 |-
 | [[Image:images/next_event.gif]]
-| Select Next Event
+| Select Next State Change
 | Selects the next state for the selected resource. Pressing the '''Shift''' key at the same time will update the selection end time of the current selection range.
 |-
 | [[Image:images/add_bookmark.gif]]
@@ -2015,11 +2222,13 @@ The CPU Usage Chart on the right side of the view, plots the total time spent on
 The CPU Usage chart is usable with the mouse. The following actions are set:
 
 * '''left-click''': select a time or time range begin time
-* '''left-drag horizontally''': select a time range or change the time range begin or end time
-* '''middle-drag''': pan left or right
-* '''right-drag horizontally''': zoom region
-* '''mouse wheel up/down''': zoom in or out
+* '''Shift-left-click or drag''': Extend or shrink the selection range
 
+* '''left-drag horizontally''': select a time range or change the time range begin or end time
+* '''middle-drag or Ctrl-left-drag horizontally''': pan left or right
+* '''right-drag horizontally''': [[#Zoom region|zoom region]]
+* '''Shift-mouse wheel up/down''': scroll left or right
+* '''Ctrl-mouse wheel up/down''': zoom in or out horizontally
 
 ==== Tooltips ====
 
@@ -2044,7 +2253,7 @@ The CPU Usage View '''toolbar''', located at the top right of the view, has shor
 ==== CPU Filtering ====
 [[#Follow CPU | Follow a CPU]] will filter the CPU Usage View and will display only usage for the followed CPU.
 
-== Kernel Memory Usage ==
+== Kernel Memory Usage View ==
 
 The Kernel Memory Usage and view is specific to kernel traces. To open the view, double-click on the '''Kernel Memory Usage Analysis''' tree element under the '''Kernel''' tree element of the Project Explorer.
 
@@ -2077,10 +2286,13 @@ The Relative Kernel Memory Chart on the right side of the view, plots the relati
 The Relative Kernel Memory chart is usable with the mouse. The following actions are set:
 
 * '''left-click''': select a time or time range begin time
+* '''Shift-left-click or drag''': Extend or shrink the selection range
+
 * '''left-drag horizontally''': select a time range or change the time range begin or end time
-* '''middle-drag''': pan left or right
-* '''right-drag horizontally''': zoom region
-* '''mouse wheel up/down''': zoom in or out
+* '''middle-drag or Ctrl-left-drag horizontally''': pan left or right
+* '''right-drag horizontally''': [[#Zoom region|zoom region]]
+* '''Shift-mouse wheel up/down''': scroll left or right
+* '''Ctrl-mouse wheel up/down''': zoom in or out horizontally
 
 
 ==== Tooltips ====
@@ -2173,11 +2385,15 @@ And enable the following tracepoint
 
 The following views are available for input/output analyses:
 
-* Disk I/O Activity
+==== Disk I/O Activity View ====
 A time aligned XY chart of the read and write speed for the different disks on the system. This view is useful to see where there was more activity on the disks and whether it was mostly reads or writes.
 
  [[Image:images/io/diskIoActivity.png| Disk I/O Activity Example]]
 
+== System Call Latency Analysis ==
+
+The '''System Call Latency Analysis''' measures the system call latency between system call entry and exit per type of system call. The durations are visualized using the '''Latency''' views. For more information about the '''Latency''' views see chapter [[#Latency_Analyses | Latency Analyses]].
+
 == LTTng Kernel Events Editor ==
 
 The LTTng Kernel Events editor '''is''' the plain TMF [[#Events_Editor | Events Editor]], except that it provides its own specialized viewer to replace the standard one. In short, it has exactly the same behaviour but the layout is slightly different:
@@ -2214,9 +2430,9 @@ Shift-clicking on the time graph will select a time range. When the selection is
 
 Double-clicking on a call stack event will zoom the time graph to the selected function's range of execution.
 
-Clicking the '''Select Next Event''' or '''Select Previous Event''' or using the left and right arrows will navigate to the next or previous call stack event, and select the function currently at the top of the call stack. Note that pressing the '''Shift''' key at the same time will update the selection end time of the current selection.
+Clicking the '''Select Next State Change''' or '''Select Previous State Change''' or using the left and right arrows will navigate to the next or previous call stack event, and select the function currently at the top of the call stack. Note that pressing the '''Shift''' key at the same time will update the selection end time of the current selection.
 
-Clicking the '''Import Mapping File''' ([[Image:images/import.gif]]) icon will open a file selection dialog, allowing you to import a text file containing mappings from function addresses to function names. If the callstack provider for the current trace type only provides function addresses, a mapping file will be required to get the function names in the view. See the following sections for an example with LTTng-UST traces.
+Clicking the '''Configure symbol providers''' ([[Image:images/binaries_obj.gif]]) icon will open a file selection dialog, allowing you to import a text file containing mappings from function addresses to function names. If the callstack provider for the current trace type only provides function addresses, a mapping file will be required to get the function names in the view. See the following sections for an example with LTTng-UST traces.
 
 === Using the Callstack View with LTTng-UST traces ===
 
@@ -2249,12 +2465,14 @@ the binary file or mapping manually:
 
 === Importing a binary or function name mapping file (for LTTng-UST <2.8 traces) ===
 
+''For LTTng-UST 2.8+, if it doesn't resolve symbols automatically, see the [[#Binary file location configuration | Source Lookup's Binary file location configuration]].''
+
 If you followed the steps in the previous section, you should have a Callstack
 View populated with function entries and exits. However, the view will display
 the function addresses instead of names in the intervals, which are not very
 useful by themselves. To get the actual function names, you need to:
 
-* Click the '''Import Mapping File''' ([[Image:images/import.gif]]) button in the Callstack View.
+* Click the '''Configure symbol providers''' ([[Image:images/binaries_obj.gif]]) button in the Callstack View.
 
 Then either:
 * Point to the binary that was used for taking the trace
@@ -2278,6 +2496,107 @@ See Control Flow View's '''[[#Using_the_mouse | Using the mouse]]''', '''[[#Usin
 
 See Control Flow View's '''[[#Marker_Axis | Marker Axis]]'''.
 
+== Flame Graph View ==
+
+This is an aggregate view of the function calls from the '''Call Stack View'''. This shows a bird's eye view of what are the main
+time sinks in the traced applications. Each entry in the '''Flame Graph''' represents an aggregation of all the calls to a function
+in a certain depth of the call stack having the same caller. So, functions in the '''Flame Graph''' are aggregated by depth and
+caller. This enables the user to find the most executed code path easily.
+
+* In a '''Flame Graph''', each entry (box) represents a function in the stack.
+* If one takes a single vertical line in the view, it represents a full call stack with parents calling children.
+* The ''x-axis'' represents total duration (execution time) and not absolute time, so it is not aligned with the other views.
+* The width of an entry is the total time spent in that function, including time spent calling the children.
+* The total time can exceed the longest duration, if the program is pre-empted and not running during its trace time.
+* Each thread traced makes its own flame graph.
+
+The function name is visible on each Flame graph event if the size permits. Each box in the '''Flame Graph'''
+has the same color as the box representing the same function in the '''Call Stack'''.
+
+To open this view select a trace, expand it in the '''Project Explorer''' then expand the
+'''Call Graph Analysis''' (the trace must be loaded) and open the '''Flame Graph'''.
+It's also possible to go in '''Window''' -> '''Show View''' -> '''Tracing''' then
+select '''Flame Graph''' in the list.
+
+[[Image:images/Flame_Graph.png|Flame Graph View]]
+
+To use the '''Flame graph''', one can navigate it and find which function is consuming the most self-time.
+This can be seen as a large plateau. Then the entry can be inspected. At this point, the worst offender in
+terms of CPU usage will be highlighted, however, it is not a single call to investigate, but rather the
+aggregation of all the calls. Right mouse-clicking on that entry will open a context sensitive menu.
+Selecting '''Go to minimum''' or '''Go to maximum''' will take the user to the minimum or maximum
+recorded times in the trace. This is interesting to compare and contrast the two.
+
+Hovering over a function will show a tooltip with the statistics on a per-function basis. One can see the total and self times
+(''worst-case'', ''best-case'', ''average'', ''total time'', ''standard deviation'', ''number of calls'') for that function.
+
+=== How to use a Flame Graph ===
+
+Observing the time spent in each function can show where most of the time is spent and where one could optimize.
+An example in the image above: one can see that ''mp_sort'' is a recursive sort function, it takes approximately
+40% of the execution time of the program. That means that perfectly parallelizing it can yield a gain of 20% for 2 threads, 33% for 3
+and so forth. Looking at the function '''print_current_files''', it takes about 30% of the time, and it has a child ''print_many_per_line'' that has a large
+self time (above 10%). This could be another area that can be targeted for optimization. Knowing this in advance helps developers
+know where to aim their efforts.
+
+It is recommended to have a kernel trace as well as a user space trace in an experiment
+while using the '''Flame Graph''' as it will show what is causing the largest delays.
+When using the '''Flame Graph''' together with a call stack and a kernel trace,
+an example work flow would be to find the worst offender in terms of time taken for a function
+that seems to be taking too longThen, using the context menu '''Go to maximum''', one can navigate
+to the maximum duration and see if the OS is, for example, preempting the function for too long,
+or if the issue is in the code being executed.
+
+=== Using the mouse ===
+
+*'''Double-click on the duration ruler''' will zoom the graph to the selected duration range.
+*'''Shift-left-click or drag''': Extend or shrink the selection range
+*'''Mouse wheel up/down''': scroll up or down
+* '''Shift-mouse wheel up/down''': scroll left or right
+* '''Ctrl-mouse wheel up/down''': zoom in or out horizontally
+* '''Shift-Ctrl-mouse wheel up/down''': zoom in or out vertically
+
+When the mouse cursor is over entries (left pane):
+
+*'''-''': Collapse the '''Flame Graph''' of the selected thread
+*'''+''': Expand the '''Flame Graph''' of the selected thread
+
+=== Using the keyboard ===
+
+The following keyboard shortcuts are available:
+
+*'''Down Arrow''': selects the next stack depth
+*'''Up Arrow''': selects the previous stack depth
+*'''Home''': selects the first thread's '''Flame Graph'''
+*'''End''': selects the last thread's  '''Flame Graph''''s deepest depth
+*'''Enter''': toggles the expansion state of the current thread in the tree
+*'''Ctrl + +''': Zoom-in vertically
+*'''Ctrl + -''': Zoom-out vertically
+*'''Ctrl + 0''': Reset the vertical zoom
+
+=== Toolbar ===
+
+{|
+| [[Image:images/sort_alpha.gif]]
+| Sort by thread name
+| Sort the threads by thread name. Clicking the icon a second time will sort the threads by name in reverse order and change the icon to [[Image:images/sort_alpha_rev.gif]]
+|-
+| [[Image:images/sort_num.gif]]
+| Sort by thread id
+| Sort the threads by thread ID. Clicking the icon a second time will sort the threads by ID in reverse order and change the icon to [[Image:images/sort_num_rev.gif]].
+|}
+
+=== Importing a binary or function name mapping file (for LTTng-UST <2.8 traces) ===
+
+See Call Stack View's '''[[#Call Stack View | Importing a binary or function name mapping file (for LTTng-UST <2.8 traces) ]]'''.
+
+== Function Duration Density ==
+The '''Function Duration Density''' view shows the function duration of function displayed by duration for the current active time window range. This is useful to find global outliers.
+
+[[Image:images/FunctionDensityView.png|Function Duration Density View]]
+
+Using the right mouse button to drag horizontally it will update the table and graph to show only the density for the selected durations. Durations outside the selection range will be filtered out. Using the toolbar button [[Image:images/zoomout_nav.gif]] the zoom range will be reset.
+
 == Memory Usage ==
 
 The Memory Usage view allows the user to visualize the active memory usage per thread over time, if the application and trace provide this information.
@@ -2306,10 +2625,13 @@ Please note this view will not show shared memory or stack memory usage.
 The Memory Usage chart is usable with the mouse. The following actions are set:
 
 * '''left-click''': select a time or time range begin time
+* '''Shift-left-click or drag''': Extend or shrink the selection range
+
 * '''left-drag horizontally''': select a time range or change the time range begin or end time
-* '''middle-drag''': pan left or right
-* '''right-drag horizontally''': zoom region
-* '''mouse wheel up/down''': zoom in or out
+* '''middle-drag or Ctrl-left-drag horizontally''': pan left or right
+* '''right-drag horizontally''': [[#Zoom region|zoom region]]
+* '''Shift-mouse wheel up/down''': scroll left or right
+* '''Ctrl-mouse wheel up/down''': zoom in or out horizontally
 
 === Toolbar ===
 
@@ -2609,6 +2931,10 @@ Click the '''Import''' button and select a file from the opened file dialog to i
 
 Select an XML file from the list, click the '''Export''' button and enter or select a file in the opened file dialog to export the XML analysis. Note that if an existing file containing an analysis is selected, its content will be replaced with the analysis to export.
 
+* Edit
+
+Select an XML file from the list, click the '''Edit''' to open the XML editor. When the file is saved after being modified, it is validated and traces that are affected by this file are closed.
+
 * Delete
 
 Select an XML file from the list and click the '''Delete''' button to remove the XML file. Deleting an XML file will close all the traces for which this analysis applies and remove the analysis.
@@ -3251,7 +3577,7 @@ A time aligned '''scatter chart''' of the latencies with respect to the current
 
 
 * System Call Latency Statistics
-A view of the total '''statistics''' of the latencies. These show the ''minimum'', ''maximum'', ''average'', ''standard deviation'', and ''count'' of the latencies when applicable. This tool is useful for finding the outliers on a per-category basis.
+A view of the '''statistics''' of the latencies. These show the ''minimum'', ''maximum'', ''average'', ''standard deviation'', ''count'' and ''Total'' of the latencies when applicable. The view shows the total statistics for the whole trace also as the local statistics for a selection range. This tool is useful for finding the outliers on a per-category basis.
 
 Right-clicking on an entry of the table and select '''Go to minimum''' allows to select the range of the minimum latency for the selected entry and synchronize the other views to this time range.
 
@@ -3259,12 +3585,13 @@ Right-clicking on an entry of the table and select '''Go to maximum''' allows to
 
 [[Image:images/LatenciesStatistics.png| Latency Statistics example - System Call Latency Statistics]]
 
-
 * System Call Density
-A '''density''' view, analyzing the current time range. This is useful to find global outliers.
+A '''density''' view, analyzing the current time range. This is useful to find global outliers. Selecting a duration in the table it will synchronize other views to this time range.
 
 [[Image:images/LatenciesDensity.png| Latency Densities example - System Call Density]]
 
+Using the right mouse button to drag horizontally it will update the table and graph to show only the density for the selected durations. Durations outside the selection range will be filtered out. Using the toolbar button [[Image:images/zoomout_nav.gif]] the zoom range will be reset. 
+
 = Virtual Machine Analysis =
 
 Virtual environments are usually composed of host machines, who each run an hypervisor program on which one or many guests can be run. Tracing a guest machine alone can often yield some strange results as from its point of view, it has full use of the resources, but in reality, most resources are shared with the host and other guests.
@@ -3342,6 +3669,83 @@ The following tracepoints will be available
 
 Host and guests can now be traced together and their traces added to an experiment. Because each guest has a different clock than the host, it is necessary to synchronize the traces together. Unfortunately, automatic synchronization with the virtual machine events is not completely implemented yet, so another kind of synchronization needs to be done, with TCP packets for instance. See section on [[#Trace synchronization | trace synchronization]] for information on how to obtain synchronizable traces.
 
+= Java Logging =
+
+Trace Compass contains some Java Utility Logging (JUL) tracepoints in various places in the code. To diagnose issues with Trace Compass or when reporting problems with the application, a JUL trace may be useful to help pinpoint the problem. The following sections explain how to enable JUL logging in Trace Compass and use various handlers to handle the data.
+
+== Enable JUL Logging ==
+
+By default, all the logging of the Trace Compass namespace is disabled. To enable it, one needs to add the following property to the ''vmargs'': ''-Dorg.eclipse.tracecompass.logging=true''.
+
+The log levels and components can be controlled via a configuration file whose path is specified also in the ''vmargs'' like this: ''-Djava.util.logging.config.file=/path/to/logger.properties''. An example configuration file can be found in the next section.
+
+If running the RCP, these arguments can be appended at the end of the ''tracecompass.ini'' file located in the folder where the executable is located. If running from Eclipse in development mode, in the ''Run configurations...'', the arguments should be added in the ''Arguments'' tab in the ''VM args'' box.
+
+== Configuring JUL logging ==
+
+JUL logging can be fine-tuned to log only specific components, specific levels, but also to different log handlers, with different formats, etc. Or else, the default level is INFO and the default log handler is a ConsoleHandler which displays all log message to the Console, which can be quite cumbersome.
+
+Here is an example ''logger.properties'' file to control what is being logged and where.
+
+    # Specify the handlers to create in the root logger
+    # (all loggers are children of the root logger)
+    # These are example handlers
+
+    # Console handler
+    handlers = java.util.logging.ConsoleHandler
+    # Console and file handlers
+    #handlers = java.util.logging.ConsoleHandler, java.util.logging.FileHandler
+    # No handler
+    #handlers =
+
+    # Set the default logging level for the root logger
+    # Possible values: OFF, SEVERE, WARNING, INFO, CONFIG, FINE, FINER, FINEST, ALL
+    .level = OFF
+
+    # Fine tune log levels for specific components
+    # Use the INFO level for all tracecompass, but FINEST for the StateSystem component
+    #org.eclipse.tracecompass.internal.statesystem.core.StateSystem.level = FINEST
+    org.eclipse.tracecompass.level = INFO
+
+== LTTng JUL log handler ==
+
+The various log handlers have an overhead on the application. The ConsoleHandler has a visible impact on Trace Compass performance. The FileHandler also has an overhead though less visible, but when logging from multiple threads at the same time, the file becomes a bottleneck, so that logging data cannot be used with accuracy for performance analysis. The [http://lttng.org/docs/#doc-java-application LTTng log handler] is much better in a multi-threads context.
+
+LTTng-UST comes with the Java JUL agent in most distros. Otherwise, it is possible to manually compile lttng-ust with options ''--enable-java-agent-jul'' and install it.
+
+    git clone git://git.lttng.org/lttng-ust.git
+    cd lttng-ust
+    ./bootstrap
+    ./configure --enable-java-agent-jul
+    make
+    sudo make install
+
+The necessary classes for the java agent will have been installed on the system. Since Equinox (the OSGi implementation used by Eclipse and thus Trace Compass) uses its own classpath and ignores any classpath entered on the command line for security reasons, one needs to specify the agent class path with the bootclasspath argument:
+
+    -Xbootclasspath/a:/usr/local/share/java/lttng-ust-agent-jul.jar:/usr/local/share/java/lttng-ust-agent-common.jar
+
+Note that unlike the -classpath argument, -Xbootsclasspath does not follow the dependencies specified by a jar's Manifest, thus it is required to list both the -jul and the -common jars here.
+
+These classes need to load the LTTng JNI library. Because they were loaded from the boot class path by the boot ClassLoader, the library path entered on the command line is ignored. A workaround is to manually copy the library to the jvm's main library path. For example
+
+    sudo cp /usr/local/lib/liblttng-ust-jul-jni.so /usr/lib/jvm/java-8-openjdk/jre/lib/amd64/
+
+Or to overwrite the JVM's library path with the following VM argument.
+
+    -Dsun.boot.library.path=/usr/local/lib
+
+''Disclaimer: this last method overwrites the main java library path. It may have unknown side-effects. None were found yet.''
+
+LTTng can now be used as a handler for Trace Compass's JUL, by adding the following line to the logger.properties file
+
+    handlers = org.lttng.ust.agent.jul.LttngLogHandler
+
+The tracepoints will be those logged by a previously defined configuration file. Here is how to setup LTTng to handle JUL logging:
+
+    lttng create
+    lttng enable-event -j -a
+    lttng start
+
 = Limitations =
 
 * When parsing text traces, the timestamps are assumed to be in the local time zone. This means that when combining it to CTF binary traces, there could be offsets by a few hours depending on where the traces were taken and where they were read.
This page took 0.034149 seconds and 5 git commands to generate.