aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeena Miettinen <riitta-leena.miettinen@qt.io>2021-11-15 17:26:16 +0100
committerLeena Miettinen <riitta-leena.miettinen@qt.io>2021-11-18 15:49:22 +0000
commit9576c34366c70e271f7c532cdaf4152e06b8c954 (patch)
tree31d800cbae4f8dd812e7e2f8fcd9e2b209aef011
parent75f9c91c76d88af735710d1e5b351450d3cebc24 (diff)
Doc: Update info about Valgrind toolsqds/v2.3-beta1
Describe the toolbar options. Task-number: QTCREATORBUG-26278 Change-Id: I51ebd08a42ba696a3d76f709ff894181d4e9bb7d Reviewed-by: hjk <hjk@qt.io>
-rw-r--r--doc/qtcreator/images/qtcreator-analyzer-settings.pngbin20907 -> 5650 bytes
-rw-r--r--doc/qtcreator/images/qtcreator-valgrind-callgrind-options.pngbin4355 -> 9383 bytes
-rw-r--r--doc/qtcreator/images/qtcreator-valgrind-callgrind-toolbar.pngbin0 -> 1537 bytes
-rw-r--r--doc/qtcreator/images/qtcreator-valgrind-callgrind.pngbin3836 -> 34375 bytes
-rw-r--r--doc/qtcreator/images/qtcreator-valgrind-memcheck-options.pngbin28803 -> 6053 bytes
-rw-r--r--doc/qtcreator/images/qtcreator-valgrind-memcheck.pngbin2345 -> 2347 bytes
-rw-r--r--doc/qtcreator/src/analyze/creator-valgrind.qdoc148
-rw-r--r--doc/qtcreator/src/projects/creator-only/creator-projects-settings-run-analyze.qdocinc14
8 files changed, 125 insertions, 37 deletions
diff --git a/doc/qtcreator/images/qtcreator-analyzer-settings.png b/doc/qtcreator/images/qtcreator-analyzer-settings.png
index b2c1cdc412..6caf407302 100644
--- a/doc/qtcreator/images/qtcreator-analyzer-settings.png
+++ b/doc/qtcreator/images/qtcreator-analyzer-settings.png
Binary files differ
diff --git a/doc/qtcreator/images/qtcreator-valgrind-callgrind-options.png b/doc/qtcreator/images/qtcreator-valgrind-callgrind-options.png
index 82684f645b..9860170655 100644
--- a/doc/qtcreator/images/qtcreator-valgrind-callgrind-options.png
+++ b/doc/qtcreator/images/qtcreator-valgrind-callgrind-options.png
Binary files differ
diff --git a/doc/qtcreator/images/qtcreator-valgrind-callgrind-toolbar.png b/doc/qtcreator/images/qtcreator-valgrind-callgrind-toolbar.png
new file mode 100644
index 0000000000..9ee00dc901
--- /dev/null
+++ b/doc/qtcreator/images/qtcreator-valgrind-callgrind-toolbar.png
Binary files differ
diff --git a/doc/qtcreator/images/qtcreator-valgrind-callgrind.png b/doc/qtcreator/images/qtcreator-valgrind-callgrind.png
index e57038a151..8721c62c58 100644
--- a/doc/qtcreator/images/qtcreator-valgrind-callgrind.png
+++ b/doc/qtcreator/images/qtcreator-valgrind-callgrind.png
Binary files differ
diff --git a/doc/qtcreator/images/qtcreator-valgrind-memcheck-options.png b/doc/qtcreator/images/qtcreator-valgrind-memcheck-options.png
index a102b61367..8855d7a6d8 100644
--- a/doc/qtcreator/images/qtcreator-valgrind-memcheck-options.png
+++ b/doc/qtcreator/images/qtcreator-valgrind-memcheck-options.png
Binary files differ
diff --git a/doc/qtcreator/images/qtcreator-valgrind-memcheck.png b/doc/qtcreator/images/qtcreator-valgrind-memcheck.png
index 8bcbcbc404..8131846ef5 100644
--- a/doc/qtcreator/images/qtcreator-valgrind-memcheck.png
+++ b/doc/qtcreator/images/qtcreator-valgrind-memcheck.png
Binary files differ
diff --git a/doc/qtcreator/src/analyze/creator-valgrind.qdoc b/doc/qtcreator/src/analyze/creator-valgrind.qdoc
index da0952f317..249879fa5d 100644
--- a/doc/qtcreator/src/analyze/creator-valgrind.qdoc
+++ b/doc/qtcreator/src/analyze/creator-valgrind.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2019 The Qt Company Ltd.
+** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Creator documentation.
@@ -76,10 +76,23 @@
Click a line to view where a memory leak
occurred and a stack trace that shows what caused it.
+ As an alternative to collecting data, you can select \inlineimage open.png
+ to load an external log file in XML format into the \uicontrol Memcheck
+ view.
+
\image qtcreator-valgrind-memcheck.png "Memcheck view"
Move the mouse on a row to view more information about the function.
+ To move between rows, select \inlineimage prev.png
+ or \inlineimage next.png
+ .
+
+ To filter the results, select \inlineimage filtericon.png
+ , and then select the types of issues to display in the view. You
+ can view and hide definite and possible memory leaks, uninitialized
+ values, invalid calls to \c free(), and external errors.
+
For more information about using Memcheck, see
\l{http://valgrind.org/docs/manual/quick-start.html#quick-start.mcrun}
{Interpreting Memcheck's Output} in the Valgrind documentation.
@@ -90,6 +103,13 @@
separately for each project in the \l{Specifying Run Settings}{run settings}
of the project.
+ To specify global settings for Valgrind, select \uicontrol Tools >
+ \uicontrol Options > \uicontrol Analyzer. The \uicontrol
+ {Memcheck Memory Analysis Options} group contains Memcheck options.
+
+ In \uicontrol {Extra Memcheck arguments}, specify additional arguments
+ for launching the executable.
+
Stack traces can get quite large and confusing, and therefore, reading them
from the bottom up can help. If the stack trace is not big enough or it is
too big, select \uicontrol Tools > \uicontrol Options > \uicontrol Analyzer
@@ -160,26 +180,7 @@
You can run Callgrind on a remote Linux machine or device from any
development machine.
- To analyze applications:
-
- \list 1
-
- \li In the \uicontrol Projects mode, select a release build configuration.
-
- \li Select \uicontrol Debug to open the \uicontrol Debug mode, and then
- select \uicontrol Callgrind on the toolbar.
-
- \li Select the
- \inlineimage qtcreator-analyze-start-button.png "Start button"
- button to start the application.
-
- \li Use the application to analyze it.
-
- \li Select the \inlineimage stop_small.png "Stop button"
- button to view the results of the analysis in the \uicontrol Profile
- view.
-
- \endlist
+ \section1 Building Apps for Profiling
Callgrind records the call history of functions that are executed when the
application is run. It collects the number of instructions that are
@@ -188,10 +189,6 @@
also use cache simulation or branch prediction to gather information about
the runtime behavior of an application.
- Double-click a function to view information about the calling functions in
- the \uicontrol Callers view and about the called functions in the \uicontrol Callees
- view.
-
Since the run-time characteristics of debug and release
\l{glossary-build-config}{build configurations}
differ significantly, analytical findings for one build configuration may
@@ -207,12 +204,84 @@
options for GCC are: \c{-g -O2}. It is
advisable to use such a setup for Callgrind profiling.
+ \section1 Collecting Data
+
+ To analyze applications:
+
+ \list 1
+
+ \li In the \uicontrol Projects mode, select a release build configuration.
+
+ \li Select \uicontrol Debug to open the \uicontrol Debug mode, and then
+ select \uicontrol Callgrind on the toolbar.
+
+ \image qtcreator-valgrind-callgrind-toolbar.png "Callgrind view toolbar"
+
+ \li Select the
+ \inlineimage qtcreator-analyze-start-button.png "Start button"
+ button to start the application.
+
+ \li Use the application to analyze it.
+
+ \li Select the \inlineimage stop_small.png "Stop button"
+ button to view the results of the analysis in the
+ \uicontrol Functions view.
+
+ \endlist
+
+ Select \inlineimage icons/pause-icon.png
+ to speed up program execution during profiling by pausing event
+ logging. No events are counted while logging is paused.
- \image qtcreator-valgrind-callgrind.png "Profile view"
+ Select \inlineimage reload_gray.png
+ to reset all event counters.
- To view the data in KCachegrind, select the \inlineimage kcachegrind.png
- (\uicontrol {Open Results in KCachegrind}) button on the toolbar. \QC
- launches KCachegrind and loads the data into it for visualization.
+ Select \inlineimage clean_pane_small.png
+ to discard all collected data.
+
+ Select \inlineimage kcachegrind.png
+ to view the data in KCachegrind. \QC launches KCachegrind
+ and loads the data into it for visualization.
+
+ \section1 Viewing Collected Data
+
+ The results of the analysis are displayed in the \uicontrol Callgrind views.
+ You can detach views and move them around. To revert the changes, select
+ \uicontrol Views > \uicontrol {Reset to Default Layout}.
+
+ Select \uicontrol Views to show and hide views and view
+ titles. The \uicontrol Visualization view is hidden by
+ default. Select \inlineimage redo.png
+ to refresh the data displayed in it when it is shown.
+
+ As an alternative to collecting data, you can select \inlineimage open.png
+ to load an external log file into the \uicontrol Callgrind views.
+
+ \image qtcreator-valgrind-callgrind.png "Callgrind views"
+
+ Enter a string in the \uicontrol Filter field to filter the results.
+
+ Move the cursor on a function in the \uicontrol Functions view for more
+ information about it.
+
+ Double-click a function to view information about the calling functions in
+ the \uicontrol Callers view and about the called functions in the
+ \uicontrol Callees view.
+
+ Select \inlineimage prev.png
+ or \inlineimage next.png
+ To move between functions in the \uicontrol Callee view.
+
+ To set the cost format, select \uicontrol $. You can view absolute
+ or relative costs, as well as relative costs to parent. Select
+ \inlineimage filtericon.png
+ to view only profiling info that originated from the project.
+
+ To properly handle recursive or circular function calls, enable cycle
+ detection by selecting \uicontrol O.
+
+ To remove template parameter lists when displaying function names, select
+ \uicontrol <>.
\section1 Selecting Profiling Options
@@ -220,7 +289,7 @@
separately for each project in the \l{Specifying Run Settings}{run settings}
of the project.
- To specify settings for Valgrind, select \uicontrol Tools >
+ To specify global settings for Valgrind, select \uicontrol Tools >
\uicontrol Options > \uicontrol Analyzer. The \uicontrol
{Callgrind Profiling Options} group contains Callgrind options.
@@ -229,12 +298,21 @@
In the \uicontrol {KCachegrind executable} field, enter the path to the
KCachegrind executable to launch.
- In the \uicontrol {Result view: Minimum event cost}
- field, limit the amount of results the profiler gives you to increase
- profiler performance.
+ In \uicontrol {Extra Callgrind arguments}, specify additional arguments
+ for launching the executable.
+
+ In the \uicontrol {Result view: Minimum event cost} and
+ \uicontrol {Visualization: Minimum event cost} fields,
+ limit the amount of results the profiler presents and
+ visualizes to increase profiler performance.
+
+ To show additional information about events in tooltips, select
+ \uicontrol {Show additional information for events in tooltips}.
- You can collect information about the system call times and the number of
- global bus events of the event type \c Ge that are executed.
+ To collect information about the system call times, select
+ \uicontrol {Collect system call time}. To collect the number of
+ global bus events of the event type \c Ge that are executed,
+ select \uicontrol {Collect global bus events}.
\section2 Enabling Full Cache Simulation
diff --git a/doc/qtcreator/src/projects/creator-only/creator-projects-settings-run-analyze.qdocinc b/doc/qtcreator/src/projects/creator-only/creator-projects-settings-run-analyze.qdocinc
index f802f89f0d..22cab73490 100644
--- a/doc/qtcreator/src/projects/creator-only/creator-projects-settings-run-analyze.qdocinc
+++ b/doc/qtcreator/src/projects/creator-only/creator-projects-settings-run-analyze.qdocinc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2017 The Qt Company Ltd.
+** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Creator documentation.
@@ -45,9 +45,19 @@
\image qtcreator-analyzer-settings.png "Valgrind Settings"
+ \li In \uicontrol {Valgrind executable}, specify the path to the
+ Valgrind executable.
+
+ \li In \uicontrol {Valgrind arguments}, specify additional arguments
+ for Valgrind.
+
+ \li In \uicontrol {Detect self-modifying code}, select whether to
+ detect self-modifying code and where to detect it: only on stack,
+ everywhere, or everywhere except in file-backend mappings.
+
\endlist
- For more information about the settings, see:
+ For more information about the CallGrind and MemCheck settings, see:
\list