/****************************************************************************
**
** This file is part of Qt Creator
**
** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
**
** Contact: Nokia Corporation (qt-info@nokia.com)
**
**
** GNU Free Documentation License
**
** Alternatively, this file may be used under the terms of the GNU Free
** Documentation License version 1.3 as published by the Free Software
** Foundation and appearing in the file included in the packaging of this
** file.
**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
**
****************************************************************************/

// **********************************************************************
// NOTE: the sections are not ordered by their logical order to avoid
// reshuffling the file each time the index order changes (i.e., often).
// Run the fixnavi.pl script to adjust the links to the index order.
// **********************************************************************

/*!
    \contentspage index.html
    \previouspage creator-troubleshooting-debugging.html
    \page creator-analyze-mode.html
    \nextpage creator-qml-performance-monitor.html

    \title Analyzing Code

    The memory available on mobile devices is limited and you should use it
    carefully. \QC contains tools that you can use to analyze your code.

    The \gui {QML Profiler} allows you to profile your Qt
    Quick applications. You can inspect binding evaluations, signal handling,
    and painting operations when running QML code. This is useful for
    identifying potential bottlenecks, especially in the evaluation of bindings.

    In addition, \QC integrates Valgrind code analysis tools for
    detecting memory leaks and profiling function execution. These tools are
    supported locally only on Linux and Mac OS. You can run them on a remote
    host from Windows. You have to download and install them
    separately to use them from \QC.

    You can use the code analysis tools in the \gui Analyze mode. To switch to
    \gui Analyze mode, select \gui Analyze in the mode selector, or select the
    \gui {Analyze} menu and then select a tool. When you are in the
    \gui Analyze mode, you can switch
    between tools by selecting them in the menu on the toolbar.

    \image qtcreator-analyze-menu.png "Analyze mode menu"

    By default, the views in the \gui Analyze mode are locked into place in the
    workspace. Select \gui {Window > Views > Locked} to unlock the views. Drag
    and drop the views into new positions on the screen. Drag view borders to
    resize the views. The size and position of views are saved for future
    sessions. Select \gui {Window > Views > Reset to Default Layout} to reset
    the views to their original sizes and positions.

    To run the Valgrind tools on a remote host over SSH, select \gui {Analyze
    > Valgrind Analyze Memory (Remote)} or \gui {Valgrind Function Profile
    (Remote)}.

    To stop the currently running analyzer, select \gui {Analyze
    > Stop}.

    To select options for the Valgrind tools, select \gui {Tools > Options >
    Analyzer}. You can override the general settings for each project in the
    \gui {Run Settings} for the project.

    The following sections describe how to use the code analysis tools:

    \list

        \o  \l{Profiling QML Applications} describes how to inspect binding
            evaluations, signal handling, and painting operations when running
            QML code.

        \o  \l{Detecting Memory Leaks} describes how to use the Valgrind
            Memcheck tool to detect problems in memory management.

        \o  \l{Profiling Function Execution} describes how to use the Valgrind
            Callgrind tool to find cache misses in the code.

        \o  \l{Running Valgrind Tools Remotely} describes how to run the
            Valgrind tools on a remote host.

    \endlist

*/

