Analyzing CodeThe memory available on mobile devices is limited and you should use it carefully. Qt Creator contains tools that you can use to analyze your code. The 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, Qt Creator 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 Qt Creator. You can use the code analysis tools in the Analyze mode. To switch to Analyze mode, select Analyze in the mode selector, or select the Analyze menu and then select a tool. When you are in the Analyze mode, you can switch between tools by selecting them in the menu on the toolbar. By default, the views in the Analyze mode are locked into place in the workspace. Select 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 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 Analyze > Valgrind Analyze Memory (Remote) or Valgrind Function Profile (Remote). To stop the currently running analyzer, select Analyze > Stop. To select options for the Valgrind tools, select Tools > Options... > Analyzer. You can override the general settings for each project in the Run Settings for the project. The following sections describe how to use the code analysis tools:
[Previous: Troubleshooting Debugger] [Next: Profiling QML Applications] © 2008-2011 Nokia Corporation and/or its subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation in Finland and/or other countries worldwide. All other trademarks are property of their respective owners. Privacy Policy Licensees holding valid Qt Commercial licenses may use this document in accordance with the Qt Commercial License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written agreement between you and Nokia. Alternatively, this document may be used under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. X
|