doc: Document new previous/next event action in CFV
[deliverable/tracecompass.git] / doc / org.eclipse.tracecompass.doc.user / doc / User-Guide.mediawiki
index eff14c62bfb27a4ead8187ceb79cafdd34f75aa9..4e5720fd1e25a67206af284b73d668e5ac7e7ba7 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).
@@ -845,15 +855,15 @@ To modify the time of attributes shown in the view, select a different current t
 
 == External Analyses ==
 
-Trace Compass supports the execution of '''external analyses''' conforming to the machine interface of [https://github.com/lttng/lttng-analyses/releases/tag/v0.4.3 LTTng-Analyses 0.4.3], or any later [https://github.com/lttng/lttng-analyses/releases LTTng-Analyses 0.4.x] version. Later (0.5+) versions of LTTng-Analyses will be supported by later versions of Trace Compass.
+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 [[#Run an External Analysis|program executed by Trace Compass]]. When the program is done analyzing, Trace Compass generates a '''[[#Open a Report|report]]''' containing its results. A report contains one or more tables which can also be viewed as bar and scatter [[#Create a Chart from a Result Table|charts]].
+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.
 
-=== Run an External Analysis ===
+=== Running an External Analysis ===
 
 To run an external analysis:
 
@@ -867,33 +877,33 @@ To run an external analysis:
 
 Note that many external analyses can be started concurrently.
 
-When the external analysis is done analyzing, its results are saved as a [[#Open 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.
+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.
 
-=== Open a Report ===
+=== Opening a Report ===
 
-A '''report''' is created after a successful [[#Run an External Analysis|execution of an external analysis]].
+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>
 
-=== Create a Chart from a Result Table ===
+=== Creating a Chart from a Result Table ===
 
 To create a bar or a scatter chart from the data of a given result table:
 
-# [[#Open a Report|Open the report]] containing the result table to use for creating the chart.
+# [[#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>
 
-=== Show or Hide a Result Table ===
+=== Showing or Hiding a Result Table ===
 
-To show or hide a result table once a [[#Create a Chart from a Result Table|chart]] has been created:
+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>
 
-=== Add and Remove a User-Defined External Analysis ===
+=== 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.
 
@@ -1176,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]].
 
@@ -1270,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.
@@ -1361,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]]
 
@@ -1421,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]]
 
@@ -1654,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).
@@ -1681,6 +1759,11 @@ The Control View provides property information of selected tree component. Depen
 ** '''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 ==
 
@@ -1703,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 ==
 
-This section presents a description of the LTTng Kernel 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.
+
+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 ==
 
@@ -1934,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
@@ -2137,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.
 
@@ -2269,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:
@@ -2374,6 +2494,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.
@@ -3362,12 +3583,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.
This page took 0.03274 seconds and 5 git commands to generate.