From 3a8658496ae7604b24ebbb7a6b9c9fdccf96912f Mon Sep 17 00:00:00 2001 From: hjk Date: Wed, 22 Aug 2012 14:39:48 +0200 Subject: [PATCH] analyzer: improve wording for "wrong mode" message Task-number: QTCREATORBUG-7747 Change-Id: I4a79e7d7047d6320f54824a019f98539d88a3c25 Reviewed-by: Leena Miettinen --- doc/src/analyze/creator-valgrind.qdoc | 19 +++++++++++++++++-- src/plugins/analyzerbase/analyzermanager.cpp | 5 ++++- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/doc/src/analyze/creator-valgrind.qdoc b/doc/src/analyze/creator-valgrind.qdoc index f3f716e595e..a25fbdbfd4c 100644 --- a/doc/src/analyze/creator-valgrind.qdoc +++ b/doc/src/analyze/creator-valgrind.qdoc @@ -129,8 +129,8 @@ After you download and install Valgrind tools, you can use Callgrind from \QC. - \note Callgrind is supported locally on Linux and Mac OS. You can run it on - a remote host from Windows. + \note Callgrind is supported locally on Linux and Mac OS. You can run + it on a remote Linux machine or device from any development machine. To analyze applications: @@ -166,6 +166,21 @@ the \gui Callers view and about the called functions in the \gui Callees view. + Since Debug and Release mode run-time characteristics differ + significantly, analytical findings for one mode may or not be + relevant for the other. Profiling a Debug mode build + often finds a major part of the time being spent in low-level + code like container implementations, while the same code + does not show up in the profile of a Release build of the + same application due to inlining and other optimizations + typically done there. + + Many recent compilers allow you to build an optimized application + with debug information present at the same time. Typical + options for GCC are for instance \c{-g -O2}. It is + advisable to use such a setup for Callgrind profiling. + + \image qtcreator-valgrind-callgrind.png "Profile view" \section1 Selecting Profiling Options diff --git a/src/plugins/analyzerbase/analyzermanager.cpp b/src/plugins/analyzerbase/analyzermanager.cpp index 2761c8e3aa7..500e233e044 100644 --- a/src/plugins/analyzerbase/analyzermanager.cpp +++ b/src/plugins/analyzerbase/analyzermanager.cpp @@ -515,7 +515,10 @@ void AnalyzerManagerPrivate::startLocalTool(IAnalyzerTool *tool) const QString message = tr("

You are trying " "to run the tool \"%1\" on an application in %2 mode. " "The tool is designed to be used in %3 mode.

" - "Do you want to continue and run it in %2 mode?

") + "Debug and Release mode run-time characteristics differ " + "significantly, analytical findings for one mode may or " + "may not be relevant for the other.

" + "Do you want to continue and run the tool in %2 mode?

") .arg(toolName).arg(currentMode).arg(toolModeString); const QString checkBoxText = tr("&Do not ask again"); bool checkBoxSetting = false;