AnalyzeTool Carbide extension 1.10.0
authorMatti Laitinen <matti.t.laitinen@nokia.com>
Tue, 24 Aug 2010 12:16:27 +0300
changeset 15 0367d2db2c06
parent 14 bb339882c6e9
child 16 72f198be1c1d
AnalyzeTool Carbide extension 1.10.0
sysperfana/analyzetoolext/com.nokia.carbide.extensions.analyzetool/feature.xml
sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool.corecomponents/META-INF/MANIFEST.MF
sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool.corecomponents/atool.exe
sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool.help/META-INF/MANIFEST.MF
sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool.help/about.html
sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool.help/html/cheatsheets/getStarted_at_cs.xml
sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool.help/html/concepts/datafile.htm
sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool.help/html/concepts/preferences.htm
sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool.help/html/concepts/tracing.htm
sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool.help/html/contexts.xml
sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool.help/html/gettingstarted/basic.htm
sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool.help/html/gettingstarted/prerequisites.htm
sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool.help/html/images/AT_preferences.png
sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool.help/html/images/btn_output_trace.png
sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool.help/html/images/btn_preferences.png
sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool.help/html/images/graph_settings_dialog.png
sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool.help/html/images/graph_view.png
sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool.help/html/images/graph_view_threshold.png
sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool.help/html/images/icon_graph_settings.png
sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool.help/html/images/importdatfile_step3.png
sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool.help/html/images/linkto_help.png
sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool.help/html/images/properties.png
sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool.help/html/images/properties_view.png
sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool.help/html/images/sample_graph.png
sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool.help/html/images/toolbar.PNG
sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool.help/html/reference/toolbar.htm
sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool.help/html/reference/troubleshooting.htm
sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool.help/html/release_notes.htm
sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool.help/html/tasks/build.htm
sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool.help/html/tasks/capture.htm
sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool.help/html/tasks/viewactivitygraph.htm
sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool.help/html/tool.htm
sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool.help/html/toolTOC.xml
sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/META-INF/MANIFEST.MF
sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/icons/graph_settings.png
sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/ActivateTrace.java
sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/Activator.java
sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/AnalyzeToolHelpContextIDs.java
sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/builder/AnalyzeToolBuilder.java
sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/builder/BuilderUtil.java
sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/builder/CustomPostBuilder.java
sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/builder/CustomPreBuilder.java
sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/builder/PostNature.java
sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/engine/CallstackDataParser.java
sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/engine/CallstackItem.java
sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/engine/DeferredCallstackManager.java
sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/engine/EpocReader.java
sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/engine/ICallstackManager.java
sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/engine/IMemoryActivityModel.java
sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/engine/IMemoryActivityModelChangeListener.java
sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/engine/ParseAnalyzeData.java
sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/engine/ParseXMLFileSAX.java
sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/engine/ProjectResults.java
sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/engine/RunResults.java
sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/engine/UseAtool.java
sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/engine/statistic/AllocCallstack.java
sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/engine/statistic/AllocInfo.java
sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/engine/statistic/BaseInfo.java
sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/engine/statistic/DllLoad.java
sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/engine/statistic/FreeInfo.java
sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/engine/statistic/ProcessInfo.java
sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/engine/statistic/ReadFile.java
sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/engine/statistic/SourceFile.java
sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/global/Constants.java
sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/global/Util.java
sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/internal/engine/MemoryActivityModel.java
sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/internal/ui/graph/AnalyzeToolGraph.java
sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/internal/ui/graph/ChartContainer.java
sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/internal/ui/graph/GraphSettingsDialog.java
sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/internal/ui/graph/GraphSettingsThresholdComposite.java
sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/internal/ui/graph/MemOpDescriptor.java
sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/internal/ui/graph/Messages.java
sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/internal/ui/graph/messages.properties
sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/internal/ui/util/ColorUtil.java
sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/internal/ui/util/GraphUtils.java
sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/preferences/AdvancedPreferencePage.java
sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/preferences/AnalyzeToolPreferencePage.java
sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/preferences/PreferenceInitializer.java
sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/ui/CustomMessageDialog.java
sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/ui/MainView.java
sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/ui/OutputModeDialog.java
sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/ui/WarningDialogWithCheckbox.java
sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/ui/actions/ViewMemoryLeakFromFile.java
--- a/sysperfana/analyzetoolext/com.nokia.carbide.extensions.analyzetool/feature.xml	Tue Aug 24 12:10:03 2010 +0300
+++ b/sysperfana/analyzetoolext/com.nokia.carbide.extensions.analyzetool/feature.xml	Tue Aug 24 12:16:27 2010 +0300
@@ -2,7 +2,7 @@
 <feature
       id="com.nokia.carbide.extensions.analyzetool"
       label="Carbide.c++ Extensions - AnalyzeTool"
-      version="1.9.0"
+      version="1.10.0"
       provider-name="Nokia"
       plugin="com.nokia.s60tools.analyzetool">
 
@@ -971,21 +971,20 @@
          id="com.nokia.s60tools.analyzetool"
          download-size="0"
          install-size="0"
-         version="1.9.0"
+         version="1.10.0"
          unpack="false"/>
 
    <plugin
          id="com.nokia.s60tools.analyzetool.corecomponents"
          download-size="0"
          install-size="0"
-         version="1.9.0"/>
+         version="1.10.0"/>
 
    <plugin
          id="com.nokia.s60tools.analyzetool.help"
          download-size="0"
          install-size="0"
-         version="1.9.0"
+         version="1.10.0"
          unpack="false"/>
 
-
 </feature>
--- a/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool.corecomponents/META-INF/MANIFEST.MF	Tue Aug 24 12:10:03 2010 +0300
+++ b/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool.corecomponents/META-INF/MANIFEST.MF	Tue Aug 24 12:16:27 2010 +0300
@@ -2,6 +2,6 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: Carbide.c++ Extensions - AnalyzeTool Core Components  Plug-in
 Bundle-SymbolicName: com.nokia.s60tools.analyzetool.corecomponents
-Bundle-Version: 1.9.0
+Bundle-Version: 1.10.0
 Bundle-Vendor: Nokia
 Bundle-RequiredExecutionEnvironment: J2SE-1.5
Binary file sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool.corecomponents/atool.exe has changed
--- a/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool.help/META-INF/MANIFEST.MF	Tue Aug 24 12:10:03 2010 +0300
+++ b/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool.help/META-INF/MANIFEST.MF	Tue Aug 24 12:16:27 2010 +0300
@@ -5,6 +5,6 @@
 Bundle-Name: Carbide.c++ Extensions - AnalyzeTool Help Plug-in
 Bundle-SymbolicName: com.nokia.s60tools.analyzetool.help;singleton:=tr
  ue
-Bundle-Version: 1.9.0
+Bundle-Version: 1.10.0
 Bundle-Vendor: Nokia
 
--- a/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool.help/about.html	Tue Aug 24 12:10:03 2010 +0300
+++ b/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool.help/about.html	Tue Aug 24 12:16:27 2010 +0300
@@ -8,7 +8,7 @@
 <body lang="&amp;#8221;EN-US&rdquo;">
 <h2>About This Content</h2>
 
-<p>April 21, 2010</p>
+<p>June 30, 2010</p>
 
 <h3>Copyright</h3>
 
--- a/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool.help/html/cheatsheets/getStarted_at_cs.xml	Tue Aug 24 12:10:03 2010 +0300
+++ b/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool.help/html/cheatsheets/getStarted_at_cs.xml	Tue Aug 24 12:16:27 2010 +0300
@@ -12,8 +12,8 @@
    </item>
    <item title="Define the data gathering mode." dialog="true" skip="false" href="/com.nokia.s60tools.analyzetool.help/html/concepts/preferences.htm">
       <description>
-         Go to <b>Preferences</b> to define how to capture the trace data either by using the monitored external, external data gathering or internal data gathering.
-Tip! You can also define the data gathering mode by using the AnalyzeTool toolbar.
+         Go to <b>Preferences</b> to define how to capture the trace data: either by using the out put to trace mode or output to file system mode.
+Tip! You can also define the output mode by using the AnalyzeTool toolbar.
       </description>
       <command serialization="org.eclipse.ui.window.preferences(preferencePageId=com.nokia.s60tools.analyzetool.preferences.AnalyzeToolPreferencePage)" confirm="false">
       </command>
@@ -25,7 +25,7 @@
    </item>
    <item title="Build your project with AnalyzeTool" dialog="true" skip="false" href="/com.nokia.s60tools.analyzetool.help/html/tasks/build.htm">
       <description>
-         To make memory leak analysis possible, you must build each project with AnalyzeTool. Information of the building process is displayed in the Console view. You can activate the project build from the AnalyzeTool toolbar or from the pop-up menu in the Project Explorer. You can also change the data gathering mode from the AnalyzeTool toolbar.
+         To make memory leak analysis possible, you must build each project with AnalyzeTool. You can activate the project build from the AnalyzeTool toolbar or from the pop-up menu in the Project Explorer. You can also change the output mode from the AnalyzeTool toolbar.
       </description>
       <command serialization="org.eclipse.ui.views.showView(org.eclipse.ui.views.showView.viewId=com.nokia.s60tools.analyzetool.ui.MainView)" confirm="true">
       </command>
@@ -34,16 +34,16 @@
       <description>
          You have two possible choices to capture data.
 <br/><br/>
-1. If you have selected the <b>External data gathering</b> mode in AnalyzeTool build, AnalyzeTool captures trace data directly from the target hardware. You can start and stop the trace capturing from the AnalyzeTool toolbar. See the <b>TraceViewer help</b> for detailed information on creating a TraceViewer connection.
+1. If you have selected the <b>Output to trace</b> mode in AnalyzeTool build, AnalyzeTool captures trace data directly from the target hardware. You can start and stop the trace capturing from the AnalyzeTool toolbar. See the <b>TraceViewer help</b> for detailed information on creating a TraceViewer connection.
 <br/><br/>
-2. If you have selected the <b>Internal data gathering</b>  mode in AnalyzeTool build, AnalyzeTool collects the test data into a file in the target hardware. You need to transfer this file to a PC after the test run is completed.
+2. If you have selected the <b>Output to file system</b>  mode in AnalyzeTool build, AnalyzeTool collects the test data into a file in the target hardware. You need to transfer this file to a PC after the test run is completed.
       </description>
    </item>
    <item title="View and analyze memory leaks" dialog="true" skip="false" href="/com.nokia.s60tools.analyzetool.help/html/tasks/viewmemoryleaks.htm">
       <description>
          The memory leak analysis results are displayed in the AnalyzeTool window. Test runs with the memory leak information is displayed in the left pane. The right pane shows the information on the selected memory leak call stack.
 <br/><br/>
-Test run details will be shown in the AnalyzeTool view automatically after the data capture in External data gathering mode. You can also open the memory analysis data file by yourself later by clicking <b>Open and analyze data file</b> in the AnalyzeTool toolbar.
+Test run details will be shown in the AnalyzeTool view automatically after the data capture in Output to trace mode. You can also open the memory analysis data file  later by clicking <b>Open and analyze data file</b> in the AnalyzeTool toolbar.
 <br/><br/>
 You can define how much detail you want to see in the memory leak analysis report by using the AnalyzeTool toolbar.
       </description>
--- a/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool.help/html/concepts/datafile.htm	Tue Aug 24 12:10:03 2010 +0300
+++ b/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool.help/html/concepts/datafile.htm	Tue Aug 24 12:16:27 2010 +0300
@@ -1,25 +1,41 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
-<html>
-<head>
-<meta content="text/html; charset=us-ascii" http-equiv="content-type">
-<meta content="text/css" http-equiv="content-style-type">
-<link href="../../book.css" rel="StyleSheet" type="text/css">
-<title>AnalyzeTool data file</title>
-</head>
-<body>
-
-<h2>AnalyzeTool files</h2><p>AnalyzeTool uses files as follows:</p>
-<ul>
-	<li>Device data file. Data file saved to target device in <b>monitored internal</b> data gathering mode.</li>
-	<li>Raw data file. Analysis file saved after the trace is captured in <b>monitored external</b> or <b>external</b> data gathering mode.</li>
-	<li>Memory leak results. Results file saved by user.</li>
-</ul>
-<p>Any of these files can be opened by using the same button in <b>AnalyzeTool</b> view. AnalyzeTool automatically recognizes the file type, and performs the desired action.</p>
-
-<h4>Saving analysis data</h4>
-<p>You can save the memory leak results or raw test run data. The difference between the file formats is that the raw test run data contains all available data collected during the test run, whereas the memory leak results file only contains the test results from the currently selected project. The memory leak results file can be opened and the results read without source codes, but the raw data always needs the source codes built with AnalyzeTool before it can be opened.</p>    
-
-<div id="footer">Copyright &copy; 2010 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
-License: <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.</div>
-</body>
-</html>
\ No newline at end of file
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 1.0 Transitional//EN">
+<html>
+<head>
+  <meta content="text/html; charset=us-ascii" http-equiv="content-type">
+  <meta content="text/css" http-equiv="content-style-type">
+  <link href="../../book.css" rel="StyleSheet" type="text/css">
+  <title>AnalyzeTool data file</title>
+</head>
+
+<body>
+<h2>AnalyzeTool files</h2>
+
+<p>AnalyzeTool uses files as follows:</p>
+<ul>
+  <li>Device data file. Data file saved to target device in <b>output to file
+    system</b> mode.</li>
+  <li>Raw data file. Analysis file saved after the trace is captured in
+    <b>output to trace</b> mode.</li>
+  <li>Memory leak results. Results file saved by user.</li>
+</ul>
+
+<p>Any of these files can be opened by using the same button in
+<b>AnalyzeTool</b> view. AnalyzeTool automatically recognizes the file type,
+and performs the desired action.</p>
+
+<h4>Saving analysis data</h4>
+
+<p>You can save the memory leak results or raw test run data. The difference
+between the file formats is that the raw test run data contains all available
+data collected during the test run, whereas the memory leak results file only
+contains the test results from the currently selected project. The memory leak
+results file can be opened and the results read without source codes, but the
+raw data always needs the source codes built with AnalyzeTool before it can be
+opened.</p>
+
+<div id="footer">
+Copyright &copy; 2010 Nokia Corporation and/or its subsidiary(-ies). All rights
+reserved. License: <a
+href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.</div>
+</body>
+</html>
--- a/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool.help/html/concepts/preferences.htm	Tue Aug 24 12:10:03 2010 +0300
+++ b/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool.help/html/concepts/preferences.htm	Tue Aug 24 12:16:27 2010 +0300
@@ -32,14 +32,21 @@
         used for instrumenting and uninstrumenting the project and analysing
         captured data. 
         <ul>
-          <li>Use internal engine. This option uses the built-in version of
-            <i>atool.exe</i>. </li>
-          <li>Use external command line engine. This options uses
-            <i>atool.exe</i> from a user-defined location. 
-            <ul>
-            </ul>
-          </li>
+          <li><strong>Use internal command line engine</strong>: This option
+            uses the built-in version of <i>atool.exe</i>. </li>
+          <li><strong>Use external command line engine</strong>: This options
+            uses <i>atool.exe</i> from the location selected to the
+            <strong>Atool.exe path</strong> field. </li>
         </ul>
+
+        <p>When the <em>atool.exe</em> version has been selected, the system
+        automatically checks that it matches with the version of the
+        AnalyzeTool Carbide extension. In case of a mismatch, an error is
+        displayed "<em>Command Line Engine is older than x.x.x</em>", and the
+        <strong>Apply</strong> and <strong>OK</strong> buttons are disnabled.
+        In this case you need to select a later CLE tool version. For more
+        information, see <a href="../reference/troubleshooting.htm">AnalyzeTool
+        Troubleshooting</a>.</p>
       </td>
     </tr>
     <!--<tr>
@@ -53,44 +60,47 @@
     </tr>
     <tr>
       <td>Engine version</td>
-      <td>Displays selected engine version number.</td>
+      <td>Displays selected engine's version number.</td>
     </tr>
     <tr>
-      <td>Data gathering mode</td>
-      <td>Specifies the data gathering mode for AnalyzeTool build. 
+      <td>Output mode</td>
+      <td>Specifies the output mode for AnalyzeTool build. 
         <ul>
-          <li>Monitored External or External: This option will send the memory
-            analysis data through tracing utility connection. For more
-            information, see <a
+          <li><strong>Output to trace (recommended)</strong>: This option will
+            send the memory analysis data through tracing utility connection.
+            For more information, see <a
             href="../tasks/capture.htm#capture_external">Capturing data in
-            external data gathering mode</a>.</li>
-          <li>Internal: This option will create a data file to the target
-            hardware. The data file name is the same as the project name. If
-            you select the <b>Name from the user</b> option, you must define a
-            name for the data file. For more information, see <a
-            href="../tasks/capture.htm#capture_s60_file">Capturing data in
-            internal data gathering mode</a> 
+            output to trace mode</a>.</li>
+          <li><strong>Output to file system</strong>: This option will create a
+            data file to the target hardware. When using this option, you must
+            define a location and name for the data file. For more information,
+            see <a href="../tasks/capture.htm#capture_s60_file">Capturing data
+            in output to file system mode</a> 
             <ul>
-              <li>Name from the process: This option will a use data file name
-                which is the same as application target name.</li>
-              <li>Name from the user: This option will ask a data file name
-                every time a project is built with the <i>atool.exe</i>.</li>
+              <li><strong>Log file path</strong>: Type here the location for
+                the log file.</li>
+              <li><strong>File name</strong>: Type here the name you want to
+                use for the log file</li>
             </ul>
           </li>
-          <li>Ask always: This option will ask before each build which data
-            gathering mode to use, External or Internal</li>
+          <li><strong>Ask always</strong>: When this option is selected,
+            Analyse tool will display a dialog, asking which output mode you
+            want to use, each time you build a project.</li>
         </ul>
       </td>
     </tr>
     <tr>
       <td>Stored callstack size</td>
       <td><ul>
-          <li>No items. This option does not store any callstack items.</li>
-          <li>40 items. This option stores forty callstack items.</li>
-          <li>100 items. This option stores hundred callstack items</li>
-          <li>Custom callstack size. This option provides possibility to define
-            custom size of callstack items. Custom size of callstack items is
-            limited to 0-255</li>
+          <li><strong>No callstack stored</strong>: This option does not store
+            any callstack items.</li>
+          <li><strong>40 items</strong>: This option stores forty callstack
+            items.</li>
+          <li><strong>100 items</strong>: This option stores hundred callstack
+            items. Note that storing this meni items </li>
+          <li><strong>Custom size (0-255</strong>): This option provides
+            possibility to define custom size of callstack items. Custom size
+            of callstack items is limited to 0-255</li>
         </ul>
         <b>Note!</b> The callstack size affects the speed of hooked process,
         lower callstack size is faster. </td>
--- a/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool.help/html/concepts/tracing.htm	Tue Aug 24 12:10:03 2010 +0300
+++ b/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool.help/html/concepts/tracing.htm	Tue Aug 24 12:16:27 2010 +0300
@@ -1,22 +1,29 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-<head>
-<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
-<title>Tracing</title>
-<link href="../../book.css" type="text/css" rel="stylesheet">
-</head>
-<body>
-
-<h2>Tracing</h2>
-<p>Tracing is a way to record debugging information that can be used in during software development. With tracing, you can generate detailed, low-level information about an application's execution.</p>
-<p>The AnalyzeTool uses a tracing utility for tracing memory leaks.</p>
-
-<h5>Related tasks</h5>
-<ul>
-	<li><a href="../tasks/capture.htm#capture_external">Capturing data in monitored external or external data gathering mode</a></li>
-</ul>
-
-<div id="footer">Copyright &copy; 2010 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
-License: <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.</div>
-</body>
-</html>
\ No newline at end of file
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+  <meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
+  <title>Tracing</title>
+  <link href="../../book.css" type="text/css" rel="stylesheet">
+</head>
+
+<body>
+<h2>Tracing</h2>
+
+<p>Tracing is a way to record debugging information that can be used in during
+software development. With tracing, you can generate detailed, low-level
+information about an application's execution.</p>
+
+<p>The AnalyzeTool uses a tracing utility for tracing memory leaks.</p>
+
+<h5>Related tasks</h5>
+<ul>
+  <li><a href="../tasks/capture.htm#capture_external">Capturing data in output
+    to trace mode</a></li>
+</ul>
+
+<div id="footer">
+Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies). All rights
+reserved. License: <a
+href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.</div>
+</body>
+</html>
--- a/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool.help/html/contexts.xml	Tue Aug 24 12:10:03 2010 +0300
+++ b/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool.help/html/contexts.xml	Tue Aug 24 12:16:27 2010 +0300
@@ -7,13 +7,17 @@
 	<topic label="Setting AnalyzeTool preferences" href="html/concepts/preferences.htm" />
 </context> 
 <context id="ANALYZETOOL_MAIN">
-	<description>AnalyzeTool Help</description>
+	<description>The AnalyzeTool view will show the test run details automatically after the data is capture with tracing utility connection.</description>
 	<topic label="AnalyzeTool introduction" href="html/gettingstarted/overview.htm" />
 	<topic label="AnalyzeTool basic walk-through" href="html/gettingstarted/basic.htm" />
 	<topic label="AnalyzeTool toolbar buttons" href="html/reference/toolbar.htm" />
+ <topic href="html/concepts/datafile.htm" label="AnalyzeTool files"/>
 </context>   
-<context id="ANALYZETOOL_GRAPH" title="AnalyzeTool Graph Help">
+<context id="ANALYZETOOL_GRAPH">
+   <description>Memory activity graphs are generated automatically after the data captured is stopped. The graph shows the cumulative memory of the given process over time.</description>
 	<topic label="AnalyzeTool Memory Activity Graph" href="html/tasks/viewactivitygraph.htm" />
 </context>   
- 
+<context id="ANALYZETOOL_TROUBLESHOOTING" title="AnalyzeTool Troubleshooting Help">
+	<topic label="AnalyzeTool troubleshooting" href="html/reference/troubleshooting.htm" />
+</context> 
 </contexts>
--- a/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool.help/html/gettingstarted/basic.htm	Tue Aug 24 12:10:03 2010 +0300
+++ b/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool.help/html/gettingstarted/basic.htm	Tue Aug 24 12:16:27 2010 +0300
@@ -1,31 +1,46 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 1.0 Transitional//EN">
-<html>
-<head>
-<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
-<title>AnalyzeTool Basic walk-through</title>
-<link href="../../book.css" type="text/css" rel="StyleSheet">
-</head>
-<body>
-
-<h2>Basic walk-through</h2>
-<p>This section guides you with three easy steps for using AnalyzeTool to perform memory leak tests for a simple application.</p>
-<p>You can launch the AnalyzeTool Carbide.c++ Extension by selecting <b>AnalyzeTool</b> in the <b>Carbide</b> menu, or from <b>Window > Show View > Other... > Carbide Extensions > AnalyzeTool</b>.</p>
-
-<h5>Before you start</h5>
-<ul>
-	<li>Check the <a href="../gettingstarted/prerequisites.htm">Prerequisites</a> for AnalyzeTool.</li>
-	<li>Check the <a href="../concepts/preferences.htm">AnalyzeTool preferences.</a></li>
-</ul>
-
-<p>By following these simple steps you can start using AnalyzeTool:</p>
-<ol>
-	<li><a href="../tasks/build.htm">Build the project with AnalyzeTool</a>.</li>
-	<li><a href="../tasks/capture.htm#capture_external">Capture data in the monitored external or external data gathering mode</a>.<p>If you cannot use the tracing utility connection to the target hardware, you can use the <a href="../tasks/capture.htm#capture_s60_file">monitored internal data gathering mode</a>.</p></li>
-	<li><a href="../tasks/viewmemoryleaks.htm">View memory leaks</a>.</li>
-	<li><a href="../tasks/viewactivitygraph.htm">View memory activity graph</a>.</li>
-</ol>
-
-<div id="footer">Copyright &copy; 2010 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
-License: <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.</div>
-</body>
-</html>
\ No newline at end of file
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 1.0 Transitional//EN">
+<html>
+<head>
+  <meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
+  <title>AnalyzeTool Basic walk-through</title>
+  <link href="../../book.css" type="text/css" rel="StyleSheet">
+</head>
+
+<body>
+<h2>Basic walk-through</h2>
+
+<p>This section guides you with three easy steps for using AnalyzeTool to
+perform memory leak tests for a simple application.</p>
+
+<p>You can launch the AnalyzeTool Carbide.c++ Extension by selecting
+<b>AnalyzeTool</b> in the <b>Carbide</b> menu, or from <b>Window &gt; Show View
+&gt; Other... &gt; Carbide Extensions &gt; AnalyzeTool</b>.</p>
+
+<h5>Before you start</h5>
+<ul>
+  <li>Check the <a href="../gettingstarted/prerequisites.htm">Prerequisites</a>
+    for AnalyzeTool.</li>
+  <li>Check the <a href="../concepts/preferences.htm">AnalyzeTool
+    preferences.</a></li>
+</ul>
+
+<p>By following these simple steps you can start using AnalyzeTool:</p>
+<ol>
+  <li><a href="../tasks/build.htm">Build the project with AnalyzeTool</a>.</li>
+  <li><a href="../tasks/capture.htm#capture_external">Capture data in output to
+    trace mode</a>.
+    <p>If you cannot use the tracing utility connection to the target hardware,
+    you can use the <a href="../tasks/capture.htm#capture_s60_file">output to
+    file system mode</a>.</p>
+  </li>
+  <li><a href="../tasks/viewmemoryleaks.htm">View memory leaks</a>.</li>
+  <li><a href="../tasks/viewactivitygraph.htm">View memory activity
+  graph</a>.</li>
+</ol>
+
+<div id="footer">
+Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies). All rights
+reserved. License: <a
+href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.</div>
+</body>
+</html>
--- a/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool.help/html/gettingstarted/prerequisites.htm	Tue Aug 24 12:10:03 2010 +0300
+++ b/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool.help/html/gettingstarted/prerequisites.htm	Tue Aug 24 12:16:27 2010 +0300
@@ -1,38 +1,74 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-<head>
-<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
-<title>AnalyzeTool Prerequisites</title>
-<link href="../../book.css" type="text/css" rel="stylesheet">
-</head>
-<body>
-
-<h2>Prerequisites</h2>
-<p>For fully functioning, AnalyzeTool requires the following components:</p>
-<ul>
-	<li>AnalyzeTool command line tool (atool.exe).</li>
-	<li>Symbian component of AnalyzeTool extracted in build environment.</li>
-	<li>AnalyzeTool for target hardware (through SIS or ROM build).</li>
-	<li>TraceViewer Carbide.c++ Extension (any connection method to target hardware that can pass information through RDebug).</li>
-</ul>
-<p><b>Note!</b> If you have taken AnalyzeTool into use through the Nokia internal SymSEE Installer, the required components have been automatically installed to your PC.</p>
-
-<h5>AnalyzeTool for target hardware</h5>
-<p>To run analysis in the target hardware, AnalyzeTool needs to be installed. You can either choose to install AnalyzeTool through an installation package, or add AnalyzeTool to a phone image. You can find the needed files from the <b>c:\apps\atool</b> directory, if you have acquired AnalyzeTool through the Nokia internal SymSEE environment. If you want to install AnalyzeTool from a SIS package, unzip the <i>AnalyzeToolPhone.zip</i> which contains the binaries of the release and debug versions for the supported platforms. In case of ROM image inclusion, <i>AnalyzeTool.iby</i> needs to be included. In case of 5.x release, it is automatically included.</p>
-
-<h5>Additions to build environment</h5>
-<p>S60 version 5.0, 5.0.1, and 5.1 platforms and MCL releases include AnalyzeTool so if you are using one of those you do not need to take any actions. If you are using a platform which does not include AnalyzeTool, you have to add some AnalyzeTool files to the platform to be able to build with AnalyzeTool. If you have installed AnalyzeTool through the Nokia internal SymSEE environment, these files can be found from <b>c:\apps\atool</b>. The file name is <i>S60_environment_changes_xx.zip</i> where <i>xx</i> specifies the S60 platform version number. To install these files, unzip the file to the directory which contains the <i>epoc32</i> directory. The zip file includes the necessary directory structure.</p>
-<p><b>Note!</b> Errors about missing AnalyzeTool files are displayed in the problems view if your build environment is missing any necessary AnalyzeTool files.</p>
-
-<h5>Checking the AnalyzeTool Carbide.c++ Extension installation</h5>
-<p>If you intend to use <a href="../tasks/capture.htm#capture_external">External data gathering mode</a>, check that TraceViewer Carbide.c++ Extension is configured correctly. Check the TraceViewer settings from <b>Window > Preferences > Carbide Extensions > TraceViewer > Connection</b>. For more information, see the <a href="../../../com.nokia.traceviewer.help/html/toc.htm">TraceViewer Help.</a></p>
-
-<h5>Related concepts</h5>
-<ul>
-	<li><a href="../gettingstarted/basic.htm">Basic walk-through</a></li>
-</ul>
-
-<div id="footer">Copyright &copy; 2010 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
-License: <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.</div>
-</body>
-</html>
\ No newline at end of file
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+  <meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
+  <title>AnalyzeTool Prerequisites</title>
+  <link href="../../book.css" type="text/css" rel="stylesheet">
+</head>
+
+<body>
+<h2>Prerequisites</h2>
+
+<p>For fully functioning, AnalyzeTool requires the following components:</p>
+<ul>
+  <li>AnalyzeTool command line tool (atool.exe).</li>
+  <li>Symbian component of AnalyzeTool extracted in build environment.</li>
+  <li>AnalyzeTool for target hardware (through SIS or ROM build).</li>
+  <li>TraceViewer Carbide.c++ Extension (any connection method to target
+    hardware that can pass information through RDebug).</li>
+</ul>
+
+<p><b>Note!</b> If you have taken AnalyzeTool into use through the Nokia
+internal SymSEE Installer, the required components have been automatically
+installed to your PC.</p>
+
+<h5>AnalyzeTool for target hardware</h5>
+
+<p>To run analysis in the target hardware, AnalyzeTool needs to be installed.
+You can either choose to install AnalyzeTool through an installation package,
+or add AnalyzeTool to a phone image. You can find the needed files from the
+<b>c:\apps\atool</b> directory, if you have acquired AnalyzeTool through the
+Nokia internal SymSEE environment. If you want to install AnalyzeTool from a
+SIS package, unzip the <i>AnalyzeToolPhone.zip</i> which contains the binaries
+of the release and debug versions for the supported platforms. In case of ROM
+image inclusion, <i>AnalyzeTool.iby</i> needs to be included. In case of 5.x
+release, it is automatically included.</p>
+
+<h5>Additions to build environment</h5>
+
+<p>S60 version 5.0, 5.0.1, and 5.1 platforms and MCL releases include
+AnalyzeTool so if you are using one of those you do not need to take any
+actions. If you are using a platform which does not include AnalyzeTool, you
+have to add some AnalyzeTool files to the platform to be able to build with
+AnalyzeTool. If you have installed AnalyzeTool through the Nokia internal
+SymSEE environment, these files can be found from <b>c:\apps\atool</b>. The
+file name is <i>S60_environment_changes_xx.zip</i> where <i>xx</i> specifies
+the S60 platform version number. To install these files, unzip the file to the
+directory which contains the <i>epoc32</i> directory. The zip file includes the
+necessary directory structure.</p>
+
+<p><b>Note!</b> Errors about missing AnalyzeTool files are displayed in the
+problems view if your build environment is missing any necessary AnalyzeTool
+files.</p>
+
+<h5>Checking the AnalyzeTool Carbide.c++ Extension installation</h5>
+
+<p>If you intend to use <a href="../tasks/capture.htm#capture_external">output
+to trace mode</a>, check that TraceViewer Carbide.c++ Extension is configured
+correctly. Check the TraceViewer settings from <b>Window &gt; Preferences &gt;
+Carbide Extensions &gt; TraceViewer &gt; Connection</b>. For more information,
+see the <a
+href="../../../com.nokia.traceviewer.help/html/gettingstarted/gs_index.htm">TraceViewer
+Help.</a></p>
+
+<h5>Related concepts</h5>
+<ul>
+  <li><a href="../gettingstarted/basic.htm">Basic walk-through</a></li>
+</ul>
+
+<div id="footer">
+Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies). All rights
+reserved. License: <a
+href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.</div>
+</body>
+</html>
Binary file sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool.help/html/images/AT_preferences.png has changed
Binary file sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool.help/html/images/btn_output_trace.png has changed
Binary file sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool.help/html/images/btn_preferences.png has changed
Binary file sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool.help/html/images/graph_settings_dialog.png has changed
Binary file sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool.help/html/images/graph_view.png has changed
Binary file sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool.help/html/images/graph_view_threshold.png has changed
Binary file sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool.help/html/images/icon_graph_settings.png has changed
Binary file sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool.help/html/images/importdatfile_step3.png has changed
Binary file sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool.help/html/images/linkto_help.png has changed
Binary file sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool.help/html/images/properties.png has changed
Binary file sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool.help/html/images/properties_view.png has changed
Binary file sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool.help/html/images/sample_graph.png has changed
Binary file sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool.help/html/images/toolbar.PNG has changed
--- a/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool.help/html/reference/toolbar.htm	Tue Aug 24 12:10:03 2010 +0300
+++ b/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool.help/html/reference/toolbar.htm	Tue Aug 24 12:16:27 2010 +0300
@@ -1,80 +1,144 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 1.0 Transitional//EN">
-<html>
-<head>
-<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
-<meta http-equiv="content-style-type" content="text/css">
-<title>AnalyzeTool Toolbar</title>
-<link href="../../book.css" type="text/css" rel="StyleSheet">
-</head>
-<body>
-
-<h2>Toolbar</h2>
-<p>The toolbar in the AnalyzeTool view contains the following icons:</p>
-<img src="../images/toolbar.PNG" alt="toolbar">
-<p></p>
-<table width="615" border="1" cellspacing="1" cellpadding="2">
-<colgroup>
-<col width="149*">
-<col width="456*"></colgroup>
-<tbody>
-<tr>
-<th align="center">Button</th>
-<th align="center">Description</th>
-</tr>
-<tr>
-<td><img src="../images/btn_computer.png" alt="Compurer"><p></p>
-<img src="../images/btn_cellular.png" alt="Phone"><p></p>
-<img src="../images/btn_ask.png" alt="Ask"></td>
-<td>Toggles between data gathering modes. Monitored external and external modes to get data using tracing utility connection, monitored internal mode to use device data file and asking from user which mode to use.
-</td>
-</tr>
-<tr>
-<td><img src="../images/btn_build_active.png" alt="build"><p></p>
-<img src="../images/btn_build_passive.png" alt="build"></td>
-<td>Toggles between activating and deactivating project build with AnalyzeTool.</td>
-</tr>
-<tr>
-<td><img src="../images/btn_record.png" alt="Record data"><img src="../images/btn_terminate.png" alt="Stop data capture"></td>
-<td>Starts and stops data capture from external mode.</td>
-</tr>
-<tr>
-<td><img src="../images/btn_start_subtest.png" alt="Start subtest"></td>
-<td>Starts subtest.</td>
-</tr>
-<tr>
-<td><img src="../images/btn_stop_subtest.png" alt="Stop subtest"></td>
-<td>Stops subtest.</td>
-</tr>
-<tr>
-<td><img src="../images/btn_details_all.png" alt="Change report detail level: All"><p></p>
-<img src="../images/btn_details_known.png" alt="Change report detail level: Known"><p></p>
-<img src="../images/btn_details_topmost.png" alt="Change report detail level: Topmost"><p></p></td>
-<td>Change memory leak analysis call stack detail level (<b>Known</b>, <b>Topmost</b>, <b>All</b>).</td>
-</tr>
-<tr>
-<td><img src="../images/btn_open.png" alt="Open xml file"></td>
-<td>Open user selected test run data file or memory leak results file. File can be also selected from recently opened files list. After file open automatically generates memory leak analysis based on the selected file.</td>
-</tr>
-<tr>
-<td><img src="../images/btn_save.png" alt="Save report file"></td>
-<td>Saves raw data file or memory leak results.<p> For more information, see <a href="../concepts/datafile.htm">AnalyzeTool files</a>.</p></td>
-</tr>
-<tr>
-<td><img src="../images/btn_clear.png" alt="Clear AnalyzeTool made changes"></td>
-<td>Clears AnalyzeTool made changes and deletes unsaved analysis data.</td>
-</tr>
-</tbody>
-</table>
-
-<h5>Related tasks</h5>
-<ul>
-	<li><a href="../tasks/build.htm">Building the project with AnalyzeTool</a></li>
-	<li><a href="../tasks/capture.htm">Capturing trace data</a></li>
-	<li><a href="../tasks/subtest.htm">Running subtests</a></li>
-	<li><a href="../tasks/viewmemoryleaks.htm">Viewing memory leaks</a></li>
-</ul>
-
-<div id="footer">Copyright &copy; 2010 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
-License: <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.</div>
-</body>
-</html>
\ No newline at end of file
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 1.0 Transitional//EN">
+<html>
+<head>
+  <meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
+  <meta http-equiv="content-style-type" content="text/css">
+  <title>AnalyzeTool Toolbar</title>
+  <link href="../../book.css" type="text/css" rel="StyleSheet">
+</head>
+
+<body>
+<h2>Toolbar</h2>
+
+<p>The toolbar in the AnalyzeTool view contains the following icons:</p>
+<img src="../images/toolbar.PNG" alt="toolbar"> 
+
+<p></p>
+
+<table width="615" border="1" cellspacing="1" cellpadding="2">
+  <colgroup><col width="149*">
+    <col width="456*">
+  </colgroup>
+  <tbody>
+    <tr>
+      <th align="center">Button</th>
+      <th align="center">Description</th>
+    </tr>
+    <tr>
+      <td><img src="../images/btn_output_trace.png" alt="Computer"> <br>
+        <img src="../images/btn_cellular.png" alt="Phone"> <br>
+        <img src="../images/btn_ask.png" alt="Ask"></td>
+      <td>Toggles between data output modes. 
+        <ul>
+          <li><strong>Output to trace</strong> gets data using tracing utility
+            connection, </li>
+          <li><strong>Output to file system</strong> uses device data file, and
+          </li>
+          <li><strong>Ask always</strong> asks which mode to use for each
+            build. </li>
+        </ul>
+      </td>
+    </tr>
+    <tr>
+      <td><img src="../images/btn_build_active.png" alt="build"> <br>
+        <img src="../images/btn_build_passive.png" alt="build"></td>
+      <td>Toggles between activating and deactivating project build with
+        AnalyzeTool.</td>
+    </tr>
+    <tr>
+      <td><img src="../images/btn_record.png" alt="Record data"> <br>
+        <img src="../images/btn_terminate.png" alt="Stop data capture"></td>
+      <td>Starts and stops data capture.</td>
+    </tr>
+    <tr>
+      <td><img src="../images/btn_start_subtest.png" alt="Start subtest"></td>
+      <td>Starts subtest.</td>
+    </tr>
+    <tr>
+      <td><img src="../images/btn_stop_subtest.png" alt="Stop subtest"></td>
+      <td>Stops subtest.</td>
+    </tr>
+    <tr>
+      <td><img src="../images/btn_details_all.png"
+        alt="Change report detail level: All"> <br>
+        <img src="../images/btn_details_known.png"
+        alt="Change report detail level: Known"> <br>
+        <img src="../images/btn_details_topmost.png"
+        alt="Change report detail level: Topmost"> <br>
+      </td>
+      <td>Change memory leak analysis call stack detail level (<b>Known</b>,
+        <b>Topmost</b>, <b>All</b>).</td>
+    </tr>
+    <tr>
+      <td><img src="../images/btn_open.png" alt="Open xml file"></td>
+      <td>Opens user selected test run data file or memory leak results file.
+        File can be also selected from recently opened files list. After file
+        open automatically generates memory leak analysis based on the selected
+        file.</td>
+    </tr>
+    <tr>
+      <td><img src="../images/btn_save.png" alt="Save report file"></td>
+      <td>Saves raw data file or memory leak results. 
+
+        <p>For more information, see <a
+        href="../concepts/datafile.htm">AnalyzeTool files</a>.</p>
+      </td>
+    </tr>
+    <tr>
+      <td><img src="../images/btn_clear.png"
+        alt="Clear AnalyzeTool made changes"></td>
+      <td>Clears AnalyzeTool made changes and deletes unsaved analysis
+      data.</td>
+    </tr>
+    <tr>
+      <td><img alt="preferences" src="../images/btn_preferences.png" width="16"
+        height="16"></td>
+      <td>Opens the AnalyzeTool Preferences page.</td>
+    </tr>
+  </tbody>
+</table>
+
+<p>In addition to the above, there are these icons available on the AnalyzeTool
+Graphs tab:</p>
+
+<table width="615" border="1" cellspacing="1" cellpadding="2">
+  <colgroup><col width="149*">
+    <col width="456*">
+  </colgroup>
+  <tbody>
+    <tr>
+      <th align="center">Button</th>
+      <th align="center">Description</th>
+    </tr>
+    <tr>
+      <td><img src="../images/icon_graph_settings.png"></td>
+      <td>Starts and stops data capture from external mode.</td>
+    </tr>
+    <tr>
+      <td><img src="../images/properties.png"></td>
+      <td>Opens the Eclipse Properties view.</td>
+    </tr>
+    <tr>
+      <td><img src="../images/linkto_help.png"></td>
+      <td>Opens the AnalyzeTool Help.</td>
+    </tr>
+  </tbody>
+</table>
+
+<p></p>
+
+<h5>Related tasks</h5>
+<ul>
+  <li><a href="../tasks/build.htm">Building the project with
+  AnalyzeTool</a></li>
+  <li><a href="../tasks/capture.htm">Capturing trace data</a></li>
+  <li><a href="../tasks/subtest.htm">Running subtests</a></li>
+  <li><a href="../tasks/viewmemoryleaks.htm">Viewing memory leaks</a></li>
+</ul>
+
+<div id="footer">
+Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies). All rights
+reserved. License: <a
+href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.</div>
+</body>
+</html>
--- a/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool.help/html/reference/troubleshooting.htm	Tue Aug 24 12:10:03 2010 +0300
+++ b/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool.help/html/reference/troubleshooting.htm	Tue Aug 24 12:16:27 2010 +0300
@@ -1,131 +1,324 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 1.0 Transitional//EN">
-<html>
-<head>
-<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
-<meta http-equiv="content-style-type" content="text/css">
-<title>AnalyzeTool Troubleshooting</title>
-<link href="../../book.css" type="text/css" rel="StyleSheet">
-</head>
-<body>
-
-<h2>Troubleshooting</h2>
-<p>The following table lists AnalyzeTool error messages:</p>
-
-<table width="615" border="1" cellspacing="1" cellpadding="2">
-<colgroup>
-<col width="250*">
-<col width="356*"></colgroup>
-<tbody>
-<tr>
-<th>Message</th>
-<th align="center">Description</th>
-</tr>
-<tr>
-<td>No project selected. Please select project.</td>
-<td>You tried to use Carbide.c++ Extension actions but you have not selected a project first. Select a project from the <b>Project Explorer</b> window, and run action again.</td>
-</tr>
-<tr>
-<td>Could not find mmp file for current project.</td>
-<td>AnalyzeTool Carbide.c++ Extension could not load the mmp file info. Ensure that project's <i>bld.inf</i> file contains mmp files.</td>
-</tr>
-<tr>
-<td>TraceViewer connection reserved for another plug-in.</td>
-<td>Another Carbide.c++ Extension uses TraceViewer. First close the other TraceViewer Carbide.c++ Extension connection, and then try again.</td>
-</tr>
-<tr>
-<td>Invalid TraceViewer connection settings.</td>
-<td>The TraceViewer has invalid connection settings and could not connect to target hardware. Check the TraceViewer options from <b>Window &gt; Preferences... &gt; Carbide Extensions &gt; TraceViewer &gt; Connection</b>.</td>
-</tr>
-<tr>
-<td>General TraceViewer error.</td>
-<td>The TraceViewer cannot connect to target hardware and the AnalyzeTool Carbide.c++ Extension could not resolve the problem. Check the TraceViewer options from <b>Window &gt; Preferences... &gt; Carbide Extensions &gt; TraceViewer &gt; Connection</b>.</td>
-</tr>
-<tr>
-<td>Invalid name. Do you want to specify a valid name?</td>
-<td>You have entered an invalid subtest name, for example the name is empty or starts with an illegal parameter.</td>
-</tr>
-<tr>
-<td>No process started, could not start a subtest.</td>
-<td>The trace is active but no processes started in the target hardware which are built with the external data gathering mode of AnalyzeTool.</td>
-</tr>
-<tr>
-<td>The given subtest is already started for the active process.</td>
-<td>You have already started the subtest with same name for selected process.
-</td>
-</tr>
-<tr>
-<td>Cannot find AnalyzeTool libraries from current SDK. Install libraries first.</td>
-<td>This message is displayed in the <b>Console</b> view if AnalyzeTool is not included in SDK.</td>
-</tr>
-</tbody>
-</table>
-
-<p>The following table lists possible known problematic situations related to AnalyzeTool:</p>
-
-<table width="615" border="1" cellspacing="1" cellpadding="2">
-<colgroup>
-<col width="250*">
-<col width="356*"></colgroup>
-<tbody>
-<tr>
-<th>Problem</th>
-<th align="center">Possible cause</th>
-</tr>
-<tr>
-<td>Compiling with AnalyzeTool gives an error related to header files.</td>
-<td>Mixing header files from different AnalyzeTool versions might be the cause. From version 1.5.0 onwards, AnalyzeTool uses a different folder structure compared to previous versions. Therefore it is essential that you check that there are no header files in the folder <i>\epoc32\include\applications\analyzetool</i> or <i>\epoc32\include\analyzetool</i>.</td>
-</tr>
-<tr>
-<td>Compiling with AnalyzeTool gives an error related to AnalyzeTool library files.</td>
-<td>Build environment is missing AnalyzeTool files. Install the AnalyzeTool to build environment by unzipping environment changes from AnalyzeTool installation folder.</i>.</td>
-</tr>
-<tr>
-<td>Software compiled with AnalyzeTool does not run.</td>
-<td>Mixing header files from different AnalyzeTool versions might be the cause. From version 1.5.0 onwards, AnalyzeTool uses a different folder structure compared to previous versions. Therefore it is essential that you check that there are no header files in the folder <i>\epoc32\include\applications\analyzetool</i> or <i>\epoc32\include\analyzetool</i>.</td>
-</tr>
-<tr>
-<td>Software compiled with AnalyzeTool does not run.</td>
-<td>AnalyzeTool core components are missing from the target HW/emulator environment.</td>
-</tr>
-<tr>
-<td>Software compiled with AnalyzeTool does not run.</td>
-<td>The AnalyzeTool core components in the target HW/emulator environment are old (incompatible) versions.</td>
-</tr>
-</tbody>
-</table>
-
-<p>The following ones are Command line engine related errors. These errors are displayed in the Carbide.c++ <b>Console</b> view.</p>
-
-<table>
-<colgroup>
-<col width="250*">
-<col width="356*"></colgroup>
-<tbody>
-<tr>
-<th>Error</th>
-<th align="center">Possible cause</th>
-</tr>
-<tr>
-<td>Mmp file: &lt;mmp file name> is read only. Compile aborted.</td>
-<td>The project's mmp file is read only. Remove the write protection from the mmp file.</td>
-</tr>
-<tr>
-<td>AnalyzeTool build failed in module: &lt;mmp file name&gt;.</td>
-<td>Project contains build errors. Details can be found from <b>Console</b> view.</td>
-</tr>
-<tr>
-<td>Can not find AnalyzeTool libraries from current SDK</td>
-<td>Your build environment is missing the necessary files for building with AnalyzeTool. These files can be found from the AnalyzeTool installation folder from files S60_environment_changes31.zip, S60_environment_changes32.zip or S60_environment_changes50.zip. Unzip one of these to the desired Symbian OS root directory. The zip-package itself includes the necessary subfolder structure.</td>
-</tr>
-<tr>
-<td>AnalyzeTool : Errors :<br>
-Missing symbol file: <symbol file name></td>
-<td>You are using GCCE release build which does not produce needed symbol files. Symbol files are needed to pinpoint memory leaks. To correct this user needs to add "<i>-debug</i>" to project's build configuration arguments. To do this open project's <b>properties</b>, select <b>Carbide.c++ &gt; Build Configurations &gt; Arguments</b> while the GCCE release build configuration is selected and write the <i>-debug</i> to arguments field.</td>
-</tr>
-</tbody>
-</table>
-
-<div id="footer">Copyright &copy; 2010 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
-License: <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.</div>
-</body>
-</html>
\ No newline at end of file
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 1.0 Transitional//EN">
+<html>
+<head>
+  <meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
+  <meta http-equiv="content-style-type" content="text/css">
+  <title>AnalyzeTool Troubleshooting</title>
+  <link href="../../book.css" type="text/css" rel="StyleSheet">
+</head>
+
+<body>
+<h2>Troubleshooting</h2>
+
+<p>The following table lists AnalyzeTool error messages:</p>
+
+<table width="615" border="1" cellspacing="1" cellpadding="2">
+  <colgroup><col width="250*">
+    <col width="356*">
+  </colgroup>
+  <tbody>
+    <tr>
+      <th>Message</th>
+      <th align="center">Description</th>
+    </tr>
+    <tr>
+      <td>Cannot find AnalyzeTool libraries from current SDK. Install libraries
+        first.</td>
+      <td>This message is displayed in the <b>Console</b> view if AnalyzeTool
+        is not included in SDK.</td>
+    </tr>
+    <tr>
+      <td>Can not find AnalyzeTool library files from current SDK: 
+
+        <p>&lt;list of libraries that are missing&gt;</p>
+
+        <p>You can build AnalyzeTool from sources or contact AnalyzeTool
+        development team to get AnalyzeTool binaries.</p>
+      </td>
+      <td>This message appears during compiling if there are some SDK library
+        files missing. 
+
+        <p>To resolve the problem, build AnalyzeTool from sources or contact
+        AnalyzeTool development team for AnalyzeTool binaries.</p>
+      </td>
+    </tr>
+    <tr>
+      <td>Could not find mmp file for current project.</td>
+      <td>AnalyzeTool Carbide.c++ Extension could not load the mmp file info.
+        Ensure that project's <i>bld.inf</i> file contains mmp files.</td>
+    </tr>
+    <tr>
+      <td>Command Line Engine older than x.x.x.</td>
+      <td>This message is displayed in the Preferences window if the version of
+        the selected command line engine is earlier than the version of the
+        Carbide extension (for example 1.10.0). 
+
+        <p>To resolve the problem, unless you already have the version listed
+        in the error message available, you must update the command line engine
+        to the listed version, When you have the correct version available,
+        select/browse to that version in the preferences page. </p>
+      </td>
+    </tr>
+    <tr>
+      <td>Command Line Engine not available</td>
+      <td>This message appears, when the Preferences page is opened, if the
+        command line engine is not available in the selected path location. 
+
+        <p>To resolve the problem, set the correct location for the command
+        line engine in the AnalyzeTool Engine section of the Preferences page.
+        Or, if there is no AnalyzeTool Engine available, you must install
+        one.</p>
+      </td>
+    </tr>
+    <tr>
+      <td>General TraceViewer error.</td>
+      <td>The TraceViewer cannot connect to target hardware and the AnalyzeTool
+        Carbide.c++ Extension could not resolve the problem. Check the
+        TraceViewer options from <b>Window &gt; Preferences... &gt; Carbide
+        Extensions &gt; TraceViewer &gt; Connection</b>.</td>
+    </tr>
+    <tr>
+      <td>Invalid name. Do you want to specify a valid name?</td>
+      <td>You have entered an invalid subtest name, for example the name is
+        empty or starts with an illegal parameter.</td>
+    </tr>
+    <tr>
+      <td>Invalid TraceViewer connection settings.</td>
+      <td>The TraceViewer has invalid connection settings and could not connect
+        to target hardware. Check the TraceViewer options from <b>Window &gt;
+        Preferences... &gt; Carbide Extensions &gt; TraceViewer &gt;
+        Connection</b>.</td>
+    </tr>
+    <tr>
+      <td>No process started, could not start a subtest.</td>
+      <td>The trace is active but no processes started in the target hardware
+        which are built with the output to trace mode of AnalyzeTool.</td>
+    </tr>
+    <tr>
+      <td>No project selected. Please select project.</td>
+      <td>You tried to use Carbide.c++ Extension actions but you have not
+        selected a project first. Select a project from the <b>Project
+        Explorer</b> window, and run action again.</td>
+    </tr>
+    <tr>
+      <td>The given subtest is already started for the active process.</td>
+      <td>You have already started the subtest with same name for selected
+        process. </td>
+    </tr>
+    <tr>
+      <td>TraceViewer connection reserved for another plug-in.</td>
+      <td>Another Carbide.c++ Extension uses TraceViewer. First close the other
+        TraceViewer Carbide.c++ Extension connection, and then try again.</td>
+    </tr>
+    <tr>
+      <td>Unknown tag 
+
+        <p>Trace contains unknown xxx tag. AnalyzeTool Carbide extension might
+        not be up to date.</p>
+      </td>
+      <td>This warning is shown during online tracing or when you open a data
+        file that contains trace data with unknown tags. 
+
+        <p>The warning is shown again for each unknown tag encountered. You you
+        do not wish to see the warning again, you can check the <strong>Don't
+        show again</strong> checkbox.</p>
+
+        <p>To resolve the problem, you should update AnalyzeTool Carbide
+        extension to the latest available version.</p>
+      </td>
+    </tr>
+    <tr>
+      <td>Unsupported format 
+
+        <p>Carbide extension is older than Symbian components. Please see Help
+        for more information.</p>
+      </td>
+      <td>This message appears during online tracing or when you try to open a
+        data file that includes traces in a format that is not supported by the
+        version of AnalyzeTool extension you are using. 
+
+        <p>To resolve the problem, you should update AnalyzeTool Carbide
+        extension to the latest available version. </p>
+      </td>
+    </tr>
+    <tr>
+      <td>Unsupported format 
+
+        <p>Symbian components are not up to date. Please see Help for more
+        information.</p>
+      </td>
+      <td>This message appears during online tracing or when you try to open a
+        log file that includes traces in old trace format. From version 1.10.0
+        onwards, the AnalyzeTool Carbide.c++ extension supports the new trace
+        format, so the S60 component running on the device must be version
+        1.10.0 or higher. 
+
+        <p>To resolve the problem, you should update the AnalyzeTool Symbian
+        component on your device to the latest available version.</p>
+      </td>
+    </tr>
+    <tr>
+      <td>Version mismatch 
+
+        <p>Command Line engine not available. Check AnalyzeTool preferences.</p>
+      </td>
+      <td>This message appears, when starting a build, if the command line
+        engine is not available in the path location selected in the
+        AnalyzeTool preferences. 
+
+        <p>To resolve the problem:</p>
+        <ol>
+          <li>Open AnalyzeTool Preferences by clicking <img alt="icon"
+            src="../images/btn_preferences.png" width="16"
+          height="16">icon.</li>
+          <li>In the Analyze Tool Engine section, select / browse to the
+            correct version of the command line engine, or</li>
+          <li>If you do not have the correct version of the command line
+            engine, you must install it.</li>
+        </ol>
+      </td>
+    </tr>
+    <tr>
+      <td>Version mismatch 
+
+        <p>Command Line engine older than x.x.x. Check AnalyzeTool
+        preferences.</p>
+      </td>
+      <td>This message is displayed when starting a build, if the version of
+        the command line engine selected in the Preference page is earlier than
+        the version of the Carbide extension (for example 1.10.0). 
+
+        <p>To resolve the problem:</p>
+        <ol>
+          <li>Open AnalyzeTool Preferences by clicking <img alt="icon"
+            src="../images/btn_preferences.png" width="16"
+          height="16">icon.</li>
+          <li>In the Analyze Tool Engine section, select / browse to the
+            correct version of the command line engine, or</li>
+          <li>If you do not have the correct version of the command line
+            engine, you must install it.</li>
+        </ol>
+      </td>
+    </tr>
+    <tr>
+      <td>Version Mismatch 
+
+        <p>Version mismatch between the AnalyzeTool binaries (version x.y.z) in
+        the device and AnalyzeTool headers in the SDK (x.y.z).</p>
+
+        <p>Please make surethat those match otherwise results may be
+        unknown.</p>
+      </td>
+      <td>This warning message can appear during online tracing, or when
+        opening data file, if the versions of the Carbide extension and S60
+        application do not match. 
+
+        <p>To avoid problems, use the same version on Carbide extension and S60
+        component, otherwise results may be inaccurate.</p>
+      </td>
+    </tr>
+  </tbody>
+</table>
+
+<p>The following table lists possible known problematic situations related to
+AnalyzeTool:</p>
+
+<table width="615" border="1" cellspacing="1" cellpadding="2">
+  <colgroup><col width="250*">
+    <col width="356*">
+  </colgroup>
+  <tbody>
+    <tr>
+      <th>Problem</th>
+      <th align="center">Possible cause</th>
+    </tr>
+    <tr>
+      <td>Compiling with AnalyzeTool gives an error related to header
+      files.</td>
+      <td>Mixing header files from different AnalyzeTool versions might be the
+        cause. From version 1.5.0 onwards, AnalyzeTool uses a different folder
+        structure compared to previous versions. Therefore it is essential that
+        you check that there are no header files in the folder
+        <i>\epoc32\include\applications\analyzetool</i> or
+        <i>\epoc32\include\analyzetool</i>.</td>
+    </tr>
+    <tr>
+      <td>Compiling with AnalyzeTool gives an error related to AnalyzeTool
+        library files.</td>
+      <td>Build environment is missing AnalyzeTool files. Install the
+        AnalyzeTool to build environment by unzipping environment changes from
+        AnalyzeTool installation folder..</td>
+    </tr>
+    <tr>
+      <td>Software compiled with AnalyzeTool does not run.</td>
+      <td>Mixing header files from different AnalyzeTool versions might be the
+        cause. From version 1.5.0 onwards, AnalyzeTool uses a different folder
+        structure compared to previous versions. Therefore it is essential that
+        you check that there are no header files in the folder
+        <i>\epoc32\include\applications\analyzetool</i> or
+        <i>\epoc32\include\analyzetool</i>.</td>
+    </tr>
+    <tr>
+      <td>Software compiled with AnalyzeTool does not run.</td>
+      <td>AnalyzeTool core components are missing from the target HW/emulator
+        environment.</td>
+    </tr>
+    <tr>
+      <td>Software compiled with AnalyzeTool does not run.</td>
+      <td>The AnalyzeTool core components in the target HW/emulator environment
+        are old (incompatible) versions.</td>
+    </tr>
+  </tbody>
+</table>
+
+<p>The following ones are Command line engine related errors. These errors are
+displayed in the Carbide.c++ <b>Console</b> view.</p>
+
+<table>
+  <colgroup><col width="250*">
+    <col width="356*">
+  </colgroup>
+  <tbody>
+    <tr>
+      <th>Error</th>
+      <th align="center">Possible cause</th>
+    </tr>
+    <tr>
+      <td>Mmp file: &lt;mmp file name&gt; is read only. Compile aborted.</td>
+      <td>The project's mmp file is read only. Remove the write protection from
+        the mmp file.</td>
+    </tr>
+    <tr>
+      <td>AnalyzeTool build failed in module: &lt;mmp file name&gt;.</td>
+      <td>Project contains build errors. Details can be found from
+        <b>Console</b> view.</td>
+    </tr>
+    <tr>
+      <td>Can not find AnalyzeTool libraries from current SDK</td>
+      <td>Your build environment is missing the necessary files for building
+        with AnalyzeTool. These files can be found from the AnalyzeTool
+        installation folder from files S60_environment_changes31.zip,
+        S60_environment_changes32.zip or S60_environment_changes50.zip. Unzip
+        one of these to the desired Symbian OS root directory. The zip-package
+        itself includes the necessary sub-folder structure.</td>
+    </tr>
+    <tr>
+      <td>AnalyzeTool : Errors :<br>
+        Missing symbol file: &lt; symbol file name&gt;</td>
+      <td>You are using GCCE release build which does not produce needed symbol
+        files. Symbol files are needed to pinpoint memory leaks. To correct
+        this user needs to add "<i>-debug</i>" to project's build configuration
+        arguments. To do this open project's <b>properties</b>, select
+        <b>Carbide.c++ &gt; Build Configurations &gt; Arguments</b> while the
+        GCCE release build configuration is selected and write the
+        <i>-debug</i> to arguments field.</td>
+    </tr>
+  </tbody>
+</table>
+
+<div id="footer">
+Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies). All rights
+reserved. License: <a
+href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.</div>
+</body>
+</html>
--- a/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool.help/html/release_notes.htm	Tue Aug 24 12:10:03 2010 +0300
+++ b/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool.help/html/release_notes.htm	Tue Aug 24 12:16:27 2010 +0300
@@ -9,9 +9,9 @@
 <body>
 <h2>Release note</h2>
 
-<h4>AnalyzeTool Carbide.c++ Extension &ndash; Version 1.9.0</h4>
+<h4>AnalyzeTool Carbide.c++ Extension &ndash; Version 1.10.0</h4>
 
-<p>Released 21st April 2010</p>
+<p>Released 30th June 2010</p>
 <ul>
   <li><a href="#description">Product description</a></li>
   <li><a href="#features">Main features</a></li>
@@ -47,22 +47,24 @@
 
 <h3><a name="newfeatures"></a>What's new</h3>
 <ul>
-  <li>Feature: The version of the dbghelp.dll library provided by Windows is
-    checked when user starts tracing. If the version is not at least 6.3.0.0, a
-    confirmation dialog will appear with instructions on how to update a later
-    version. </li>
-  <li>Fix: Substantially reduced the graph memory usage in the callstack area.
-    This allowed removing the option for disabling the graph feature in the
-    Preferences page.</li>
-  <li>Fix: Cleaning dialog functionality has been fixed, the graph is no longer
-    cleaned if user selects <strong>No</strong>.</li>
-  <li>Fix: Warning "No project selected" is no longer mistakenly displayed if
-    the project is selected in Navigator.</li>
+  <li>Feature: Support added for new trace format.</li>
+  <li>Feature: New output formats added: Output to trace and Output to file
+    system.</li>
+  <li>Feature: Tread ID is shown in Properties for all allocations,
+    deallocations and leaks.</li>
+  <li>Feature: Added Graph settings dialog for setting thresholds for
+    allocations shown in the graph view.</li>
+  <li>Feature: Real-time tracing re-factoring.</li>
+  <li>Feature: Version checks and notification dialogs added for the following:
+    for the old trace format containing the old PCSS prefix; for supported
+    trace format version; for supported command line engine and command line
+    engine availability; for unknown tags in traces; for mismatch between
+    AnalyzeTool binaries in the device and AnalyzeTool headers in the SDK.</li>
 </ul>
 
-<h3><a name="installation"></a>Installation notes</h3>
+<h3><a name="installation" id="installation"></a>Installation notes</h3>
 <ul>
-  <li>N/A</li>
+  <li>Update details for version 1.10.0 here</li>
 </ul>
 
 <h3><a name="requirements"></a>System requirements</h3>
@@ -112,6 +114,21 @@
 
 <h3>Version history</h3>
 
+<h5>Version 1.9.0 - 21st April 2010</h5>
+<ul>
+  <li>Feature: The version of the dbghelp.dll library provided by Windows is
+    checked when user starts tracing. If the version is not at least 6.3.0.0, a
+    confirmation dialog will appear with instructions on how to update a later
+    version. </li>
+  <li>Fix: Substantially reduced the graph memory usage in the callstack area.
+    This allowed removing the option for disabling the graph feature in the
+    Preferences page.</li>
+  <li>Fix: Cleaning dialog functionality has been fixed, the graph is no longer
+    cleaned if user selects <strong>No</strong>.</li>
+  <li>Fix: Warning "No project selected" is no longer mistakenly displayed if
+    the project is selected in Navigator.</li>
+</ul>
+
 <h5>Version 1.8.1 - 14th January 2010</h5>
 <ul>
   <li>Feature: Add linefeeds to CLE generated XML report</li>
--- a/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool.help/html/tasks/build.htm	Tue Aug 24 12:10:03 2010 +0300
+++ b/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool.help/html/tasks/build.htm	Tue Aug 24 12:16:27 2010 +0300
@@ -1,39 +1,54 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 1.0 Transitional//EN">
-<html>
-<head>
-<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
-<meta http-equiv="content-style-type" content="text/css">
-<link href="../../book.css" type="text/css" rel="StyleSheet">
-<title>Build project</title>
-</head>
-<body>
-
-<h2>Building the project with AnalyzeTool</h2>
-<p>To be able to analyse memory leaks, you must build each project with AnalyzeTool.</p>
-<p>To build with AnalyzeTool:</p>
-<ol>
-<li>Choose any of the following options for the data gathering mode:<br>
-<ul>
-<li><b>Monitored external </b>or<b> External</b>: This option will send the memory analysis data through a tracing utility connection. For more information, see <a href="../tasks/capture.htm#capture_external">Capturing data in external data gathering mode</a>.</li>
-<li><b>Monitored internal</b>: This option will create a data file to the target device. The default data file name is the same as the target process name. If you select the <b>Name from the user</b> option, you must define a name for the data file. For more information, see <a href="../tasks/capture.htm#capture_s60_file">Capturing data in internal data gathering mode</a>.</li>
-<li><b>Ask always</b>: This option will ask from the user which data gathering mode to use.</li>
-</ul>
-<p>
-<b>Note!</b> There are some differences between a monitored and a not monitored external data gathering modes:
-<ul>
-<li>A process using the monitored mode  is visible from the AnalyzeTool configuration UI application on device.</li>
-<li>A hooked process executes faster in the external (not monitored) mode than in the monitored mode.</li>
-</ul>
-</p>
-</li>
-<li>Activate the AnalyzeTool build from the <b>AnalyzeTool</b> toolbar or from the <b>Project Explorer</b> view pop-up menu.
-<p><b>Note!</b> You can also deactivate the build from the <b>AnalyzeTool</b> toolbar or the <b>Project Explorer</b> view pop-up menu.</p></li>
-<li>Build the project.</li>
-<li><p>Check if the build completed successfully.</p>
-<p>Information about the build process is displayed in the <b>Console view</b>. The last row of the <b>Console view</b> indicates if the build was successful or not.</p> <p>For more information on error messages, see <a href="../reference/troubleshooting.htm">Troubleshooting</a>.</p></li>
-</ol>
-
-<div id="footer">Copyright &copy; 2010 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
-License: <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.</div>
-</body>
-</html>
\ No newline at end of file
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 1.0 Transitional//EN">
+<html>
+<head>
+  <meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
+  <meta http-equiv="content-style-type" content="text/css">
+  <link href="../../book.css" type="text/css" rel="StyleSheet">
+  <title>Build project</title>
+</head>
+
+<body>
+<h2>Building the project with AnalyzeTool</h2>
+
+<p>To be able to analyse memory leaks, you must build each project with
+AnalyzeTool.</p>
+
+<p>To build with AnalyzeTool:</p>
+<ol>
+  <li>Choose any of the following options for the output mode:<br>
+
+    <ul>
+      <li><b>Output to trace</b>: This option will send the memory analysis
+        data through a tracing utility connection. For more information, see <a
+        href="../tasks/capture.htm#capture_external">Capturing data in output
+        to trace mode</a>.</li>
+      <li><b>Output to file system</b>: This option will create a data file to
+        the target device. You must define a name and location for the data
+        file. For more information, see <a         href="../tasks/capture.htm#capture_s60_file">Capturing data in output
+        to file system mode</a>.</li>
+      <li><b>Ask always</b>: This option will ask from the user which data
+        gathering mode to use for each build.</li>
+    </ul>
+  </li>
+  <li>Activate the AnalyzeTool build from the <b>AnalyzeTool</b> toolbar or
+    from the <b>Project Explorer</b> view pop-up menu. 
+    <p><b>Note!</b> You can also deactivate the build from the
+    <b>AnalyzeTool</b> toolbar or the <b>Project Explorer</b> view pop-up
+    menu.</p>
+  </li>
+  <li>Build the project.</li>
+  <li><p>Check if the build completed successfully.</p>
+    <p>Information about the build process is displayed in the <b>Console
+    view</b>. The last row of the <b>Console view</b> indicates if the build
+    was successful or not.</p>
+    <p>For more information on error messages, see <a
+    href="../reference/troubleshooting.htm">Troubleshooting</a>.</p>
+  </li>
+</ol>
+
+<div id="footer">
+Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies). All rights
+reserved. License: <a
+href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.</div>
+</body>
+</html>
--- a/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool.help/html/tasks/capture.htm	Tue Aug 24 12:10:03 2010 +0300
+++ b/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool.help/html/tasks/capture.htm	Tue Aug 24 12:16:27 2010 +0300
@@ -10,11 +10,10 @@
 <body>
 <h2>Capturing data</h2>
 
-<p>There are two alternative ways to capture data, depending on the data
-gathering mode.</p>
+<p>There are two alternative ways to capture data, depending on the output
+mode.</p>
 
-<h3 id="capture_external">Capturing data in monitored external or external data
-gathering mode</h3>
+<h3 id="capture_external">Capturing data in output to trace mode</h3>
 
 <p><b>Note!</b> AnalyzeTool decides which connection method to use by checking
 the project active build configuration settings. If the active build
@@ -36,10 +35,10 @@
     AnalyzeTool.</b></li>
   <li>Start capturing data by clicking <b>Start tracing</b> in the AnalyzeTool
     toolbar. 
-    <p><strong>Note</strong> that at this point the system checks the version
-    of the dbghelp.dll library provided by Windows. If the version is not at
-    least 6.3.0.0, a confirmation dialog will appear with instructions on how
-    to update a later version. </p>
+    <p class="note">NOTE that at this point the system checks the version of
+    the dbghelp.dll library provided by Windows. If the version is not at least
+    6.3.0.0, a confirmation dialog will appear with instructions on how to
+    update a later version. </p>
   </li>
   <li>Start the application built with AnalyzeTool, and run the desired test
     cases. Note that Carbide.c++ needs to be connected to the target
@@ -53,11 +52,10 @@
   </li>
 </ol>
 
-<h3 id="capture_s60_file">Capturing data in monitored internal data gathering
-mode</h3>
+<h3 id="capture_s60_file">Capturing data in output to file system mode</h3>
 
-<p>When you select the <b>monitored internal</b> data gathering mode in
-AnalyzeTool build, AnalyzeTool collects the test data into a file.</p>
+<p>When you select the <b>output to file system</b> mode in AnalyzeTool build,
+AnalyzeTool collects the test data into a file.</p>
 
 <p><b>Note!</b> If you are analyzing an application in the target hardware, the
 file must be transferred to a PC after the test run is completed.</p>
@@ -71,11 +69,12 @@
   <li>Start the application built with AnalyzeTool in the target hardware, and
     run the desired test cases.</li>
   <li>At the end of a test run, close the tested application (process). This
-    will write the test data to a file. In the target hardware the file is
-    saved in <i>e:\analyzetool\</i> or <i>c:\data\analyzetool\</i> depending if
-    the memory card is used or not. In the emulator environment the file is
-    saved in <i>\epoc32\winscw\c\logs\analyzetool\</i>. 
-    <p><b>Note!</b> The data file name was specified before the build.</p>
+    will write the test data to a file. 
+    <p class="note">NOTE The name of the file and the location where the file
+    is saved in the target hardware are defined in the AnalyzeTool
+    preferences.</p>
+    <p>In the emulator environment the file is saved in
+    <i>\epoc32\winscw\c\logs\analyzetool\</i>. </p>
   </li>
   <li>While the tested software project is active in the <b>Project
     Explorer</b>, open the data file by clicking <b>Open and analyze data
--- a/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool.help/html/tasks/viewactivitygraph.htm	Tue Aug 24 12:10:03 2010 +0300
+++ b/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool.help/html/tasks/viewactivitygraph.htm	Tue Aug 24 12:16:27 2010 +0300
@@ -1,52 +1,151 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 1.0 Transitional//EN">
-<html>
-<head>
-<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
-<title>Viewing AnalyzeTool memory activity graphs</title>
-<link href="../../book.css" type="text/css" rel="StyleSheet">
-</head>
-<body>
-
-<h2>Viewing memory activity graph</h2>
-<p>Memory activity graphs are generated automatically after the data capturing is stopped. Alternatively, an existing trace file can be opened to view memory activity graphs. For more information, see <a href="..\concepts\datafile.htm">AnalyzeTool files</a>.</p>
-<p>There are two options for opening a memory analysis data file:</p>
-<ul>
-<li>From the <b>Project pop-up</b> menu, select <b>AnalyzeTool</b> > <b>Open and analyze data file</b>.</li>
-<li>In the <b>AnalyzeTool</b> view, click the <b>Open and analyze data file</b> button.</li>
-</ul>
-<p>Memory activity graphs are displayed in the <b>AnalyzeTool</b> window on the <b>Graph</b> tab. After the data has loaded, select a process in the <b>Process</b> drop down box to view its memory activity. </p>
-<p><img src="../images/sample_graph.png" alt="AnalyzeTool graph tab"></p>
-
-<h3>Description of graph</h3>
-<p>The graph shows the cumulative memory of the given process over time. 
-Each memory operation is marked with a dot on the graph as follows:
-<ul>
-<li><font color="blue">Alloc</font>: A memory allocation is marked in blue if it is freed during the lifetime of the process.</li>
-<li><font color="red">Leak</font>: A memory allocation is marked in red with a vertical line going down if it is not freed during the lifetime of the process (also known as <em>leak</em>).</li>
-<li><font color="green">Free</font>: A memory free is marked in green.</li>
-</ul>
-<p>Hovering the mouse over a memory operation shows a tooltip with relevant information. 
-A memory operation can also be selected with a mouse click. This will highlight the memory operation on the graph, and 
-more detailed information is shown in the Eclipse Properties view. The Eclipse Properties view may include callstack information if available.
-<p><b>Tip</b>: Use the <b>arrow left</b> and <b>arrow right</b> keys to move to the next or previous memory operation.</p> 
-<p>When a memory operation is selected, related memory operations are highlighted on the graph. For example, when an alloc is selected, its associated free memory is marked on the graph with a green line going down.</p>
-
-<h3>Navigating the graph</h3>
-<ul>
-<li><b>Zoom in:</b> Select a region in the graph with your mouse (click the left edge and drag to the right edge of the region to be zoomed in).</li>
-<li><b>Zoom out:</b> Right-click with the mouse.</li>
-<li><b>Scroll:</b> Use the scroll bar. Alternatively, select a memory operation with your mouse and use the <b>arrow right</b> or <b>arrow left</b> keys to bring the next or previous into view.</li>
-</ul>
-
-<h3>The Eclipse Properties View</h3>
-<p>When a single memory allocation is selected on the graph, the Eclipse Properties view shows detailed information about the memory operation.
-If the Eclipse Properties view is not already open, it can be opened by selecting <b>Windows</b> > <b>Show View</b> > <b>Properties</b>.
-</p>
-<img src="../images/properties_view.png" alt="AnalyzeTool Properties View">
-<p>Double-clicking an item in the callstack opens the appropriate source code file to that code line, provided the source code file can be found in the selected project in Carbide.c++.</p>
-
-
-<div id="footer">Copyright &copy; 2010 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
-License: <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.</div>
-</body>
-</html>
\ No newline at end of file
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 1.0 Transitional//EN">
+<html>
+<head>
+  <meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
+  <title>Viewing AnalyzeTool memory activity graphs</title>
+  <link href="../../book.css" type="text/css" rel="StyleSheet">
+</head>
+
+<body>
+<h2>Viewing memory activity graph</h2>
+
+<p>This section describe the AnalyzeTool Graph tab and gives instructions on
+using it. The following subsections are included:</p>
+<ul>
+  <li><a href="#Descriptio">Description of graph</a></li>
+  <li><a href="#Setting">Setting thresholds for displayed allocations</a></li>
+  <li><a href="#Navigating">Navigating the graph</a></li>
+  <li><a href="#Eclipse">The Eclipse Properties View</a></li>
+</ul>
+
+<p>Memory activity graphs are generated automatically after the data capturing
+is stopped. Alternatively, an existing trace file can be opened to view memory
+activity graphs. For more information, see <a
+href="..\concepts\datafile.htm">AnalyzeTool files</a>.</p>
+
+<p>There are two options for opening a memory analysis data file:</p>
+<ul>
+  <li>From the <b>Project pop-up</b> menu, select <b>AnalyzeTool</b> &gt;
+    <b>Open and analyze data file</b>.</li>
+  <li>In the <b>AnalyzeTool</b> view, click the <b>Open and analyze data
+    file</b> button.</li>
+</ul>
+
+<p>Memory activity graphs are displayed in the <b>AnalyzeTool</b> window on the
+<b>Graph</b> tab. After the data has loaded, select a process in the
+<b>Process</b> drop down box to view its memory activity. </p>
+
+<p><img src="../images/graph_view.png" alt="AnalyzeTool graph tab"></p>
+
+<p class="figure"
+style="text-align:left;margin-left:0;margin-right:auto;">Figure 1. Example
+graph</p>
+
+<h3 id="Descriptio">Description of graph</h3>
+
+<p>The graph shows the cumulative memory of the given process over time. Each
+memory operation is marked with a dot on the graph as follows: </p>
+<ul>
+  <li><font color="blue">Alloc</font>: A memory allocation is marked in blue if
+    it is freed during the lifetime of the process.</li>
+  <li><font color="red">Leak</font>: A memory allocation is marked in red with
+    a vertical line going down if it is not freed during the lifetime of the
+    process (also known as <em>leak</em>).</li>
+  <li><font color="green">Free</font>: A memory free is marked in green.</li>
+</ul>
+
+<p>Hovering the mouse over a memory operation shows a tooltip with relevant
+information. A memory operation can also be selected with a mouse click. This
+will highlight the memory operation on the graph, and more detailed information
+is shown in the Eclipse Properties view. The Eclipse Properties view may
+include callstack information if available. </p>
+
+<p><b>Tip</b>: Use the <b>arrow left</b> and <b>arrow right</b> keys to move to
+the next or previous memory operation.</p>
+
+<p>When a memory operation is selected, related memory operations are
+highlighted on the graph. For example, when an alloc is selected, its
+associated free memory is marked on the graph with a green line going down.</p>
+
+<h3 id="Setting">Setting thresholds for displayed allocations</h3>
+
+<p>You can set a threshold for the minimum or maximum size of allocation
+displayed in the graph. To do this, click the <img
+src="../images/icon_graph_settings.png"> on the toolbar to open open the graph
+settings dialog. </p>
+
+<p><strong>Note</strong> that this option is not available in the optimized
+drawing mode, where only leaks are shown due to high number of memory
+operations.</p>
+
+<p><img src="../images/graph_settings_dialog.png"></p>
+
+<p class="figure"
+style="text-align:left;margin-left:0;margin-right:auto;">Figure 2. Graph
+Settings dialog</p>
+<ol>
+  <li>Choose one of the radio buttons:</li>
+</ol>
+<ul>
+  <li><strong>above or equals the threshold</strong> to display memory
+    allocations which size is equal or above the set threshold, or </li>
+  <li><strong>below or equals the threshold</strong> to display memory
+    allocations which size is equal of below the set threshold. </li>
+</ul>
+<ul>
+  <li>Type in the threshold. You can give the threshold in bytes, kilobytes or
+    megabytes (B, kB, MB).</li>
+  <li>Click Ok. The Graph will now display only the memory allocations within
+    the set threshold. </li>
+</ul>
+
+<p>The figure below shows the same graph as in Figure 1. above, but now with
+threshold setting of 4kB.</p>
+
+<p><img src="../images/graph_view_threshold.png"
+alt="AnalyzeTool graph with threshold"></p>
+
+<p class="figure"
+style="text-align:left;margin-left:0;margin-right:auto;">Figure 3. Example
+graph with threshold set at 4 kB</p>
+
+<p>As you can see in Figure 3 above, memory leaks are always show on the graph,
+regardless of the threshold settings.</p>
+
+<p>The threshold setting is data file specific. So, if you choose another date
+file, there will be no thresholds applied to it by default, but you need to set
+them in the <strong>Graph Settings</strong> dialog.</p>
+
+<h3 id="Navigating">Navigating the graph</h3>
+<ul>
+  <li><b>Zoom in:</b> Select a region in the graph with your mouse (click the
+    left edge and drag to the right edge of the region to be zoomed in).</li>
+  <li><b>Zoom out:</b> Right-click with the mouse.</li>
+  <li><b>Scroll:</b> Use the scroll bar. Alternatively, select a memory
+    operation with your mouse and use the <b>arrow right</b> or <b>arrow
+    left</b> keys to bring the next or previous into view.</li>
+</ul>
+
+<h3 id="Eclipse">The Eclipse Properties View</h3>
+
+<p>When a single memory allocation is selected on the graph, the Eclipse
+Properties view shows detailed information about the memory operation. If the
+Eclipse Properties view is not already open, it can be opened by clicking the
+<img src="../images/properties.png"> icon on the Graph tab, or by selecting
+<b>Windows</b> &gt; <b>Show View</b> &gt; <b>Properties</b>. </p>
+<img src="../images/properties_view.png" alt="AnalyzeTool Properties View"> 
+
+<p class="figure"
+style="text-align:left;margin-left:0;margin-right:auto;">Figure 4. Properties
+view</p>
+
+<p>Double-clicking an item in the callstack opens the appropriate source code
+file to that code line, provided the source code file can be found in the
+selected project in Carbide.c++.</p>
+
+<div id="footer">
+Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies). All rights
+reserved. License: <a
+href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.</div>
+</body>
+</html>
--- a/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool.help/html/tool.htm	Tue Aug 24 12:10:03 2010 +0300
+++ b/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool.help/html/tool.htm	Tue Aug 24 12:16:27 2010 +0300
@@ -1,32 +1,45 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-
-<html>
-<head>
-	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-	<title>Carbide.c++ User Guide</title>
-    <link href="../book.css" rel="stylesheet" type="text/css">
-	<style>
-		table, td, th { border: 0px none #FFF; }
-    </style>
-</head>
-
-<body background="images/background_carbide.jpg" >
-<p>&nbsp;</p>
-<table width="530" border="0" align="center" cellpadding="0" cellspacing="5" bgcolor="#FFFFFF" >
-  <tr>
-    <td width="215"><img src="images/about_cpp.png" width="225" height="200"></td>
-    <td width="294" valign="bottom"><p align="right"><b><img src="images/brandmark_cpp.gif" width="106" height="52"></b></p>
-        <p>&nbsp;</p>
-        <p>&nbsp;</p>
-        <p>&nbsp;</p>
-        <p class="titleSmall">Copyright &copy; 2010 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. <br>
-        License: <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a></p>
-    </td>
-  </tr>
-  <tr>
-    <td colspan="2"><h1 align="center">AnalyzeTool User Guide </h1>
-      <p align="center" class="titleSmall">Version 1.9.0; April, 2010</p></td>
-  </tr>
-</table>
-</body>
-</html>
\ No newline at end of file
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+  <meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
+  <title>Carbide.c++ User Guide</title>
+  <link href="../book.css" rel="stylesheet" type="text/css">
+  <style>
+                table, td, th { border: 0px none #FFF; }
+  </style>
+</head>
+
+<body background="images/background_carbide.jpg">
+<p> </p>
+
+<table width="530" border="0" align="center" cellpadding="0" cellspacing="5"
+bgcolor="#FFFFFF">
+  <tbody>
+    <tr>
+      <td width="215"><img src="images/about_cpp.png" width="225"
+      height="200"></td>
+      <td width="294" valign="bottom"><p align="right"><b><img
+        src="images/brandmark_cpp.gif" width="106" height="52"></b></p>
+
+        <p> </p>
+
+        <p> </p>
+
+        <p> </p>
+
+        <p class="titleSmall">Copyright © 2010 Nokia Corporation and/or its
+        subsidiary(-ies). All rights reserved. <br>
+        License: <a
+        href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a></p>
+      </td>
+    </tr>
+    <tr>
+      <td colspan="2"><h1 align="center">AnalyzeTool User Guide </h1>
+
+        <p align="center" class="titleSmall">Version 1.10.0; June, 2010</p>
+      </td>
+    </tr>
+  </tbody>
+</table>
+</body>
+</html>
--- a/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool.help/html/toolTOC.xml	Tue Aug 24 12:10:03 2010 +0300
+++ b/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool.help/html/toolTOC.xml	Tue Aug 24 12:16:27 2010 +0300
@@ -28,7 +28,7 @@
 
 		<topic label="Tasks" href="html/tasks/tasks.htm">
 			<topic label="Building the project with AnalyzeTool" href="html/tasks/build.htm" />
-			<topic label="Capturing trace data" href="html/tasks/capture.htm" />
+			<topic label="Capturing data" href="html/tasks/capture.htm" />
 			<topic label="Running subtests" href="html/tasks/subtest.htm" />
 			<topic label="Viewing memory leaks" href="html/tasks/viewmemoryleaks.htm" />
 			<topic label="Viewing memory activity graph" href="html/tasks/viewactivitygraph.htm" />
--- a/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/META-INF/MANIFEST.MF	Tue Aug 24 12:10:03 2010 +0300
+++ b/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/META-INF/MANIFEST.MF	Tue Aug 24 12:16:27 2010 +0300
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: Carbide.c++ Extensions - AnalyzeTool
 Bundle-SymbolicName: com.nokia.s60tools.analyzetool;singleton:=true
-Bundle-Version: 1.9.0
+Bundle-Version: 1.10.0
 Bundle-Activator: com.nokia.s60tools.analyzetool.Activator
 Bundle-Vendor: Nokia
 Require-Bundle: org.eclipse.ui,
Binary file sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/icons/graph_settings.png has changed
--- a/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/ActivateTrace.java	Tue Aug 24 12:10:03 2010 +0300
+++ b/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/ActivateTrace.java	Tue Aug 24 12:16:27 2010 +0300
@@ -1,20 +1,19 @@
 /*
-* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Definitions for the class ActivateTrace
+ * Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
  *
-*/
-
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:  Definitions for the class ActivateTrace
+ *
+ */
 
 package com.nokia.s60tools.analyzetool;
 
@@ -24,60 +23,60 @@
 import com.nokia.s60tools.analyzetool.ui.MainView;
 
 /**
- * Checks at plugin startup is trace plugin available
- * and sets MainView trace actions state
+ * Checks at plugin startup is trace plugin available and sets MainView trace
+ * actions state
+ * 
  * @author kihe
- *
+ * 
  */
 public class ActivateTrace implements IStartup {
 
 	/**
-	 * Check is AnalyzeTool trace plugin registered.
-	 *
+	 * Check is AnalyzeTool trace plug-in registered.
+	 * 
 	 * If not registered disables AnalyzeTool trace buttons.
-	 *
+	 * 
 	 * @see org.eclipse.ui.IStartup#earlyStartup()
 	 */
 	public final void earlyStartup() {
 
-		//get action listener
+		// get action listener
 		final IActionListener listener = Activator.getActionListener();
 
-		//get extension registry
+		// get extension registry
 		IExtensionRegistry registry = RegistryFactory.getRegistry();
-		if( registry == null ) {
+		if (registry == null) {
 			MainView.enableTrace = false;
-			if(listener != null) {
+			if (listener != null) {
 				listener.disableTraceActions(false);
 			}
 			return;
 		}
 
-		//get analyzetool extension
-		final IExtensionPoint extensionPoint = registry.getExtensionPoint("com.nokia.s60tools.analyzetool.AnalyzeTool");
+		// get analyzetool extension
+		final IExtensionPoint extensionPoint = registry
+				.getExtensionPoint("com.nokia.s60tools.analyzetool.AnalyzeTool");
 
-		//try find analyzetool trace extension
+		// try find analyzetool trace extension
 		IExtension extension = null;
-		if( extensionPoint != null ) {
-			extension = extensionPoint.getExtension("com.nokia.s60tools.analyzetool.trace.ActivateTrace");
+		if (extensionPoint != null) {
+			extension = extensionPoint
+					.getExtension("com.nokia.s60tools.analyzetool.trace.ActivateTrace");
 		}
 
-
-
-		//if trace extension found => enable trace buttons in the MainView
-		if(extension != null && extension.isValid()) {
+		// if trace extension found => enable trace buttons in the MainView
+		if (extension != null && extension.isValid()) {
 			MainView.enableTrace = true;
-			if(listener != null) {
+			if (listener != null) {
 				listener.disableTraceActions(true);
 			}
 		}
-		//no trace extension found => disable trace buttons
+		// no trace extension found => disable trace buttons
 		else {
 			MainView.enableTrace = false;
-			if(listener != null) {
+			if (listener != null) {
 				listener.disableTraceActions(false);
 			}
 		}
-
 	}
 }
--- a/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/Activator.java	Tue Aug 24 12:10:03 2010 +0300
+++ b/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/Activator.java	Tue Aug 24 12:16:27 2010 +0300
@@ -38,11 +38,12 @@
 
 /**
  * The activator class controls the plug-in life cycle
- * @author kihe 
+ * 
+ * @author kihe
  */
 public class Activator extends AbstractUIPlugin {
 
-    /** The plug-in ID. */
+	/** The plug-in ID. */
 	public static final String PLUGIN_ID = Constants.PLUGINID;
 
 	/** The shared instance. */
@@ -63,8 +64,10 @@
 
 	/*
 	 * (non-Javadoc)
-	 *
-	 * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+	 * 
+	 * @see
+	 * org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext
+	 * )
 	 */
 	@Override
 	public final void start(final BundleContext context) {
@@ -74,13 +77,14 @@
 		} catch (Exception e) {
 			e.printStackTrace();
 		}
-
 	}
 
 	/*
 	 * (non-Javadoc)
-	 *
-	 * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+	 * 
+	 * @see
+	 * org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext
+	 * )
 	 */
 	@Override
 	public final void stop(final BundleContext context) {
@@ -90,12 +94,11 @@
 		} catch (Exception e) {
 			e.printStackTrace();
 		}
-
 	}
 
 	/**
 	 * Returns the shared instance.
-	 *
+	 * 
 	 * @return the shared instance
 	 */
 	public static Activator getDefault() {
@@ -103,9 +106,9 @@
 	}
 
 	/**
-	 * Returns an image descriptor for the image file at the given
-	 * plug-in relative path.
-	 *
+	 * Returns an image descriptor for the image file at the given plug-in
+	 * relative path.
+	 * 
 	 * @param path
 	 *            the path
 	 * @return the image descriptor
@@ -116,7 +119,7 @@
 
 	/**
 	 * Returns AnalyzeTool used preference store.
-	 *
+	 * 
 	 * @return Preference store
 	 */
 	public static IPreferenceStore getPreferences() {
@@ -125,13 +128,12 @@
 		if (preferenceStore == null) {
 			preferenceStore = getDefault().getPreferenceStore();
 		}
-
 		return preferenceStore;
 	}
 
 	/**
 	 * Add action listener class.
-	 *
+	 * 
 	 * @param listener
 	 *            Action listener
 	 */
@@ -141,7 +143,7 @@
 
 	/**
 	 * Gets action listener.
-	 *
+	 * 
 	 * @return ActionListener Action listener
 	 */
 	public static IActionListener getActionListener() {
@@ -150,16 +152,18 @@
 
 	/**
 	 * Returns a File corresponding to the given bundle relative path.
-	 * @param path the bundle relative path to resource to locate
+	 * 
+	 * @param path
+	 *            the bundle relative path to resource to locate
 	 * @return the File corresponding to the given bundle relative path, or null
 	 * @throws IOException
 	 */
 	public File locateFileInBundle(final String path) throws IOException {
-		Bundle myBundle= getDefault().getBundle();
-		IPath ppath= new Path(path);
-		ppath= ppath.makeRelative();
-		URL[] urls= FileLocator.findEntries(myBundle, ppath);
-		if(urls.length != 1) {
+		Bundle myBundle = getDefault().getBundle();
+		IPath ppath = new Path(path);
+		ppath = ppath.makeRelative();
+		URL[] urls = FileLocator.findEntries(myBundle, ppath);
+		if (urls.length != 1) {
 			return null;
 		}
 		return new File(FileLocator.toFileURL(urls[0]).getFile());
@@ -167,46 +171,53 @@
 
 	/**
 	 * Logs information to the eclipse .log file
-	 * @param severity Message severity
-	 * @param code Message code
-	 * @param message Message content
+	 * 
+	 * @param severity
+	 *            Message severity
+	 * @param code
+	 *            Message code
+	 * @param message
+	 *            Message content
 	 */
 	public void logInfo(int severity, int code, String message) {
-		IStatus status = new Status(severity, PLUGIN_ID, code, message, (Throwable) null);
+		IStatus status = new Status(severity, PLUGIN_ID, code, message,
+				(Throwable) null);
 		getDefault().getLog().log(status);
 	}
+
 	/**
 	 * Logs the given message with the given severity and the given exception to
 	 * this plug-in's log.
+	 * 
 	 * @param aSeverity
 	 *            the severity; one of the <strong>IStatus</strong> severity
 	 *            constants: OK, ERROR, INFO, WARNING, or CANCEL
 	 * @param aMessage
-	 *            a human-readable message, localised to the current locale
+	 *            a human-readable message, localized to the current locale
 	 * @param aException
 	 *            a low-level exception, or null if not applicable
 	 */
 	public void log(final int aSeverity, final String aMessage,
-			        final Exception aException)
-	{
-		getLog().log(new Status(aSeverity, PLUGIN_ID, IStatus.OK, aMessage, aException));
+			final Exception aException) {
+		getLog().log(
+				new Status(aSeverity, PLUGIN_ID, IStatus.OK, aMessage,
+						aException));
 	}
-	
+
 	/**
 	 * Creates and returns an Image for the file at the given plug-in relative
 	 * path. The Image is cached in the #ImageRegistry.
-	 * @param aPath the plug-in relative path to the image file
+	 * 
+	 * @param aPath
+	 *            the plug-in relative path to the image file
 	 * @return the requested Image
 	 */
-	public Image getImage(final String aPath)
-	{
+	public Image getImage(final String aPath) {
 		Image cachedImage = getImageRegistry().get(aPath);
-		if (null == cachedImage)
-		{
+		if (null == cachedImage) {
 			cachedImage = getImageDescriptor(aPath).createImage();
 			getImageRegistry().put(aPath, cachedImage);
 		}
 		return cachedImage;
 	}
-	
 }
--- a/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/AnalyzeToolHelpContextIDs.java	Tue Aug 24 12:10:03 2010 +0300
+++ b/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/AnalyzeToolHelpContextIDs.java	Tue Aug 24 12:16:27 2010 +0300
@@ -1,49 +1,55 @@
 /*
-* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Definitions for the class AnalyzeToolHelpContextIDs
-*
-*/
+ * Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:  Definitions for the class AnalyzeToolHelpContextIDs
+ *
+ */
 
 package com.nokia.s60tools.analyzetool;
 
 /**
  * IDs for context sensitive help.
+ * 
  * @author kihe
  */
 public class AnalyzeToolHelpContextIDs {
 
-   /**
-     * The AnalyzeTool help plug-in ID.
-     */
-    private static final String ANALYZE_TOOL_HELP_PROJECT_PLUGIN_ID =
-                                        "com.nokia.s60tools.analyzetool.help"; //$NON-NLS-1$
+	/**
+	 * The AnalyzeTool help plug-in ID.
+	 */
+	private static final String ANALYZE_TOOL_HELP_PROJECT_PLUGIN_ID = "com.nokia.s60tools.analyzetool.help"; //$NON-NLS-1$
 
-    /**
-     * AnalyzeTool view memory leaks page ID
-     */
-    public static final String ANALYZE_TOOL_VIEW_MEM_LEAKS=
-    	ANALYZE_TOOL_HELP_PROJECT_PLUGIN_ID +".ANALYZETOOL_VIEW_MEM_LEAKS";
+	/**
+	 * AnalyzeTool view memory leaks page ID
+	 */
+	public static final String ANALYZE_TOOL_VIEW_MEM_LEAKS = ANALYZE_TOOL_HELP_PROJECT_PLUGIN_ID
+			+ ".ANALYZETOOL_VIEW_MEM_LEAKS";
 
-    /**
-     * AnalyzeTool main page ID
-     */
-    public static final String ANALYZE_MAIN=
-    	ANALYZE_TOOL_HELP_PROJECT_PLUGIN_ID +".ANALYZETOOL_MAIN";
-    /**
-     * AnalyzeTool graph page ID
-     */
-    public static final String ANALYZE_GRAPH=
-    	ANALYZE_TOOL_HELP_PROJECT_PLUGIN_ID +".ANALYZETOOL_GRAPH";
+	/**
+	 * AnalyzeTool main page ID
+	 */
+	public static final String ANALYZE_MAIN = ANALYZE_TOOL_HELP_PROJECT_PLUGIN_ID
+			+ ".ANALYZETOOL_MAIN";
 
+	/**
+	 * AnalyzeTool graph page ID
+	 */
+	public static final String ANALYZE_GRAPH = ANALYZE_TOOL_HELP_PROJECT_PLUGIN_ID
+			+ ".ANALYZETOOL_GRAPH";
+
+	/**
+	 * AnalyzeTool troubleshooting page ID
+	 */
+	public static final String ANALYZE_TROUBLESHOOTING = ANALYZE_TOOL_HELP_PROJECT_PLUGIN_ID
+			+ ".ANALYZETOOL_TROUBLESHOOTING";
 }
--- a/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/builder/AnalyzeToolBuilder.java	Tue Aug 24 12:10:03 2010 +0300
+++ b/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/builder/AnalyzeToolBuilder.java	Tue Aug 24 12:16:27 2010 +0300
@@ -17,6 +17,7 @@
 
 package com.nokia.s60tools.analyzetool.builder;
 
+import java.text.MessageFormat;
 import java.util.AbstractList;
 import java.util.ArrayList;
 import java.util.Iterator;
@@ -33,28 +34,27 @@
 import org.eclipse.core.runtime.Status;
 import org.eclipse.core.runtime.jobs.Job;
 import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.ui.PlatformUI;
+import org.eclipse.swt.SWT;
 
+import com.nokia.carbide.cdt.builder.BuildArgumentsInfo;
 import com.nokia.carbide.cdt.builder.CarbideBuilderPlugin;
 import com.nokia.carbide.cdt.builder.builder.CarbideCPPBuilder;
 import com.nokia.carbide.cdt.builder.builder.CarbideCommandLauncher;
 import com.nokia.carbide.cdt.builder.project.ICarbideBuildConfiguration;
 import com.nokia.carbide.cdt.builder.project.ICarbideProjectInfo;
-import com.nokia.carbide.cdt.builder.BuildArgumentsInfo;
 import com.nokia.s60tools.analyzetool.Activator;
 import com.nokia.s60tools.analyzetool.global.Constants;
 import com.nokia.s60tools.analyzetool.global.Util;
-import com.nokia.s60tools.analyzetool.ui.CustomInputDialog;
 
 /**
  * Base class for AnalyzeTool builders.
- *
+ * 
  * This class modifies Carbide builder settings during the AnalyzeTool build.
  * This class can be used to built whole project or selected components with
  * AnalyzeTool
- *
+ * 
  * @author kihe
- *
+ * 
  */
 public class AnalyzeToolBuilder extends CarbideCPPBuilder {
 
@@ -72,7 +72,7 @@
 
 	/**
 	 * Gets shared instance of CarbideCommandLauncher.
-	 *
+	 * 
 	 * @return CarbideCommandLauncher reference
 	 */
 	protected static CarbideCommandLauncher getCarbideCommandLauncher() {
@@ -81,7 +81,7 @@
 
 	/**
 	 * Checks is SBS v2 build activated for the project.
-	 *
+	 * 
 	 * @param cpi
 	 *            ICarbideProjectInfo
 	 * @return True if SBS v2 build is activated otherwise False
@@ -104,7 +104,6 @@
 					Boolean obj = (Boolean) oneMethod.invoke(
 							CarbideBuilderPlugin.getBuildManager(), objs);
 					return obj.booleanValue();
-
 				}
 			}
 		} catch (ClassNotFoundException cnfe) {
@@ -127,83 +126,14 @@
 	}
 
 	/**
-	 * Ask data file name from the user and after that executes atool.exe.
-	 *
-	 * @param monitor
-	 *            {@link IProgressMonitor} reference
-	 * @param cpi
-	 *            {@link ICarbideProjectInfo} reference
-	 * @param files
-	 *            Used mmp files
-	 *
-	 * @return COMMAND_LINE_ERROR_CODE.OK if no errors, otherwise error code
-	 */
-	private int askFileNameAndBuild(final IProgressMonitor monitor,
-			final ICarbideProjectInfo cpi, final List<IFile> files) {
-		// ask for the user data file name
-		CustomInputDialog dialog = new CustomInputDialog(
-				Constants.ANALYZE_TOOL_TITLE,
-				Constants.DIALOG_INPUT_DATA_FILE_NAME, "");
-		dialog.open();
-
-		//get data file name
-		String dataFileName = dialog.getUserInput();
-		int errorCode = Constants.COMMAND_LINE_ERROR_CODE.OK.getCode();
-		// user press "Cancel"
-		if (dataFileName == null || ("").equals(dataFileName)) {
-			buildCancelled(monitor, true);
-		} else { // if user specify data file name
-			errorCode = executeAtool(dataFileName, Constants.ATOOL_INST,
-					Constants.LOGGING_S60, files, cpi, monitor);
-		}
-		return errorCode;
-	}
-
-	/**
-	 * Ask logging mode from the user.
-	 *
-	 * @return User selected logging mode
-	 */
-	private String askLoggingMode() {
-
-		IPreferenceStore store = Activator.getPreferences();
-
-		// logging modes
-		AbstractList<String> modes = new ArrayList<String>();
-		modes.add(Constants.PREFS_EXT);
-
-		// if fast data gathering mode is enabled => add to selection list
-		if( store.getBoolean(Constants.LOGGING_FAST_ENABLED ) ) {
-			modes.add(Constants.PREFS_EXT_FAST);
-		}
-		modes.add(Constants.PREFS_S60);
-
-		// open selection dialog
-		String userSelection = Util.openSelectionDialog(
-				Constants.DIALOG_SELECT_LOGGING_MODE, null, modes);
-
-		// get used logging mode for the atool.exe
-		// user selected logging mode can not be used straight because it is
-		// different in the UI and which atool.exe uses
-		String modeSelection = "";
-		if (userSelection == Constants.PREFS_EXT) {
-			modeSelection = Constants.LOGGING_EXT;
-		} else if (userSelection == Constants.PREFS_S60) {
-			modeSelection = Constants.LOGGING_S60;
-		} else if( userSelection == Constants.PREFS_EXT_FAST) {
-			modeSelection = Constants.LOGGING_EXT_FAST;
-		}
-		return modeSelection;
-	}
-
-	/**
 	 * Cancels AnalyzeTool build.
-	 *
+	 * 
 	 * @param monitor
 	 *            Currently running progress monitor
 	 * @param continueBuild
-	 *            False stops the whole build chain (including Carbide and other builders)
-	 *            otherwise other than AnalyzeTool builds are executed normally.
+	 *            False stops the whole build chain (including Carbide and other
+	 *            builders) otherwise other than AnalyzeTool builds are executed
+	 *            normally.
 	 */
 	public final void buildCancelled(final IProgressMonitor monitor,
 			final boolean continueBuild) {
@@ -221,7 +151,6 @@
 			// update monitor state
 			monitor.setCanceled(true);
 			monitor.done();
-
 		}
 
 		boolean promptMPPChange = store.getBoolean(Constants.PREFS_PROMPT_MMP);
@@ -250,9 +179,9 @@
 
 	/**
 	 * Builds user selected components.
-	 *
+	 * 
 	 * Normally this method is called from the CompileSymbianComponent
-	 *
+	 * 
 	 * @param selectedFiles
 	 *            User selected files
 	 */
@@ -278,8 +207,9 @@
 
 					// run pre steps for the build
 					if (!runPreSteps(cmdLauncher, monitor, cpi)) {
-						return new Status(IStatus.OK, Constants.ANALYZE_TOOL_TITLE,
-								IStatus.OK, Constants.CANCELLED, null);
+						return new Status(IStatus.OK,
+								Constants.ANALYZE_TOOL_TITLE, IStatus.OK,
+								Constants.CANCELLED, null);
 					}
 
 					// build selected components
@@ -288,7 +218,7 @@
 					// run post steps
 					runPostSteps(cpi);
 
-					//after the build is finished => open the console view
+					// after the build is finished => open the console view
 					Util.openConsoleView();
 				} finally {
 					monitor.done();
@@ -304,15 +234,16 @@
 
 	/**
 	 * Checks that platform is ARMV5, GCEE or WINSCW
-	 *
+	 * 
 	 * @param cpi
 	 *            ICarbideProjectInfo
 	 * @return True if platform is set to ARMV5, GCCE or WINSCW otherwise False
 	 */
 	public final boolean checkPlatform(final ICarbideProjectInfo cpi) {
 		String platform = cpi.getDefaultConfiguration().getPlatformString();
-		if ( platform.equals(Constants.BUILD_TARGET_ARMV5) || platform.equals(Constants.BUILD_TARGET_WINSCW)
-				|| platform.equals(Constants.BUILD_TARGET_GCEE) ) {
+		if (platform.equals(Constants.BUILD_TARGET_ARMV5)
+				|| platform.equals(Constants.BUILD_TARGET_WINSCW)
+				|| platform.equals(Constants.BUILD_TARGET_GCEE)) {
 			return true;
 		}
 		return false;
@@ -320,9 +251,11 @@
 
 	/**
 	 * Executes atool.exe with options.
-	 *
-	 * @param dataFileName
-	 *            Used data file name
+	 * 
+	 * @param path
+	 *            log path
+	 * @param fileName
+	 *            log file name
 	 * @param type
 	 *            Type of execution. Possible types ATOOL_INST or ATOOL_UNINST
 	 * @param loggingModeCommand
@@ -333,40 +266,41 @@
 	 *            ICarbideProjectInfo reference
 	 * @param monitor
 	 *            Progress monitor reference
-	 *
+	 * 
 	 * @return COMMAND_LINE_ERROR_CODE.OK if no errors, otherwise error code
 	 */
-	protected final int executeAtool(final String dataFileName,
+	protected final int executeAtool(final String path, final String fileName,
 			final String type, final String loggingModeCommand,
 			final List<IFile> userSelectedMmpFiles,
 			final ICarbideProjectInfo cpi, final IProgressMonitor monitor) {
 
 		// get used platform
-		String platform = cpi.getDefaultConfiguration().getPlatformString().toLowerCase(Locale.US);
+		String platform = cpi.getDefaultConfiguration().getPlatformString()
+				.toLowerCase(Locale.US);
 
 		// get build target
-		String buildTarget = cpi.getDefaultConfiguration().getTargetString().toLowerCase(Locale.US);
+		String buildTarget = cpi.getDefaultConfiguration().getTargetString()
+				.toLowerCase(Locale.US);
 
 		// used arguments to atool.exe
 		AbstractList<String> usedArguments = new ArrayList<String>();
 
 		// which logging mode is used
-		if( loggingModeCommand.equalsIgnoreCase(Constants.LOGGING_EXT) )
-		{
-			usedArguments.add(Constants.ATOOL_INST_E);
-		}
-		else if( loggingModeCommand.equalsIgnoreCase(Constants.LOGGING_EXT_FAST)) {
+		if (loggingModeCommand.equalsIgnoreCase(Constants.LOGGING_EXT_FAST)) {
 			usedArguments.add(Constants.ATOOL_INST_EF);
-		}
-		else
-		{
+		} else {
 			usedArguments.add(Constants.ATOOL_INST_I);
-		}
+			// if path is set
+			if (path != null && !("").equals(path)) {
+				usedArguments.add("-fp");
+				usedArguments.add(path);
+			}
 
-		// if data file is set
-		if (dataFileName != null && !("").equals(dataFileName)) {
-			usedArguments.add("-f");
-			usedArguments.add(dataFileName);
+			// if file name is set
+			if (fileName != null && !("").equals(fileName)) {
+				usedArguments.add("-f");
+				usedArguments.add(fileName);
+			}
 		}
 
 		// if "verbose atool.exe output" is enabled
@@ -376,13 +310,13 @@
 
 		// get callstack size
 		IPreferenceStore store = Activator.getPreferences();
-		if( store.getBoolean(Constants.USE_CALLSTACK_SIZE) ) {
+		if (store.getBoolean(Constants.USE_CALLSTACK_SIZE)) {
 			int callstackSize = store.getInt(Constants.CALLSTACK_SIZE);
 			usedArguments.add(Constants.CALLSTACK_SIZE_OPTION);
 			usedArguments.add(Integer.toString(callstackSize));
 		}
 
-		//add build command
+		// add build command
 		// if project using SBSv2 build system
 		boolean sbsBuild = isSBSBuildActivated(cpi);
 		if (sbsBuild) {
@@ -393,8 +327,7 @@
 			buildCommand.append('_');
 			buildCommand.append(buildTarget);
 			usedArguments.add(buildCommand.toString());
-		}
-		else //use abld 
+		} else // use abld
 		{
 			usedArguments.add("abld");
 			usedArguments.add("build");
@@ -407,14 +340,14 @@
 		// this means that call is come from CompileSymbianComponent class
 		if (userSelectedMmpFiles != null && !userSelectedMmpFiles.isEmpty()) {
 
-			//get atool.exe command
+			// get atool.exe command
 			Iterator<IFile> files = userSelectedMmpFiles.iterator();
-			while(files.hasNext()) {
+			while (files.hasNext()) {
 				IFile file = files.next();
 				IPath location = file.getLocation();
 
 				String mmpFileName = getMMPFileName(location, true);
-				if( mmpFileName == null || ("").equals(mmpFileName)) {
+				if (mmpFileName == null || ("").equals(mmpFileName)) {
 					continue;
 				}
 
@@ -423,18 +356,17 @@
 				usedArguments.add(mmpFileName);
 			}
 
-			//now the command is ready
-			//execute command
+			// now the command is ready
+			// execute command
 			// execute atool.exe via CommandLauncher class
 			cmdLauncher.showCommand(true);
 			String[] arguments = new String[usedArguments.size()];
-		    usedArguments.toArray(arguments);
-		    errorCode = cmdLauncher.executeCommand(new Path(Util
-					.getAtoolInstallFolder()), arguments,
-					CarbideCPPBuilder.getResolvedEnvVars(cpi
-							.getDefaultConfiguration()), cpi
-							.getINFWorkingDirectory());
+			usedArguments.toArray(arguments);
 
+			errorCode = cmdLauncher.executeCommand(new Path(Util
+					.getAtoolInstallFolder()), arguments, CarbideCPPBuilder
+					.getResolvedEnvVars(cpi.getDefaultConfiguration()), cpi
+					.getINFWorkingDirectory());
 
 			// if user press "Cancel"
 			if (monitor.isCanceled()) {
@@ -472,25 +404,23 @@
 			// now remove AnalyzeTool made modifications
 			// if project contains build erros => only uninstrument mmp
 			// file
-			if (CarbideCPPBuilder.projectHasBuildErrors(cpi
-					.getProject())) {
+			if (CarbideCPPBuilder.projectHasBuildErrors(cpi.getProject())) {
 				usedArguments.set(0, Constants.ATOOL_UNINST_FAILED);
 			}
 
 			// project succesfully build => uninstrumet project
 			runUninstrument(Constants.ATOOL_UNINST, cpi, monitor);
-
 		}
 		// if build from bld.inf file
 		else if (cpi.isBuildingFromInf()) {
 			cmdLauncher.showCommand(true);
+
 			String[] arguments = new String[usedArguments.size()];
-		    usedArguments.toArray(arguments);
-		    errorCode = cmdLauncher.executeCommand(new Path(Util.getAtoolInstallFolder()),
-					arguments,
-					CarbideCPPBuilder.getResolvedEnvVars(cpi
-							.getDefaultConfiguration()), cpi
-							.getINFWorkingDirectory());
+			usedArguments.toArray(arguments);
+			errorCode = cmdLauncher.executeCommand(new Path(Util
+					.getAtoolInstallFolder()), arguments, CarbideCPPBuilder
+					.getResolvedEnvVars(cpi.getDefaultConfiguration()), cpi
+					.getINFWorkingDirectory());
 
 			if (mmpFiles != null) {
 				mmpFiles.clear();
@@ -511,13 +441,13 @@
 				usedArguments.add(mmpFiles.get(i));
 			}
 			cmdLauncher.showCommand(true);
+
 			String[] arguments = new String[usedArguments.size()];
-		    usedArguments.toArray(arguments);
-		    errorCode = cmdLauncher.executeCommand(new Path(Util
-					.getAtoolInstallFolder()), arguments,
-					CarbideCPPBuilder.getResolvedEnvVars(cpi
-							.getDefaultConfiguration()), cpi
-							.getINFWorkingDirectory());
+			usedArguments.toArray(arguments);
+			errorCode = cmdLauncher.executeCommand(new Path(Util
+					.getAtoolInstallFolder()), arguments, CarbideCPPBuilder
+					.getResolvedEnvVars(cpi.getDefaultConfiguration()), cpi
+					.getINFWorkingDirectory());
 
 			// if user press "Cancel"
 			if (monitor.isCanceled()) {
@@ -530,13 +460,15 @@
 
 	/**
 	 * Parses mmp file from the entered path
-	 * @param fileLocation MMP file location with path.
-	 * @param sbsBuild Is sbsv2 build system activated
-	 * @return MMP file name without path. If SBSv2 is not activated the MMP 
-	 * 		 file is returned without file extension.
+	 * 
+	 * @param fileLocation
+	 *            MMP file location with path.
+	 * @param sbsBuild
+	 *            Is sbsv2 build system activated
+	 * @return MMP file name without path. If SBSv2 is not activated the MMP
+	 *         file is returned without file extension.
 	 */
-	public String getMMPFileName(IPath fileLocation, boolean sbsBuild)
-	{
+	public String getMMPFileName(IPath fileLocation, boolean sbsBuild) {
 		// because mmp file contains project related path
 		// we need to parse mmp file name
 		int index = Util.getLastSlashIndex(fileLocation.toString());
@@ -547,20 +479,20 @@
 		}
 
 		// parse mmp file name
-		mmpFileName = fileLocation.toString().substring(
-				index + 1, fileLocation.toString().length());
+		mmpFileName = fileLocation.toString().substring(index + 1,
+				fileLocation.toString().length());
 
-		//if not using the SBS2 builds => needs to remove mmp file name extension
-		if( !sbsBuild && mmpFileName.endsWith(".mmp")) {
-			mmpFileName = mmpFileName.substring(0, mmpFileName.length()-4);
+		// if not using the SBS2 builds => needs to remove mmp file name
+		// extension
+		if (!sbsBuild && mmpFileName.endsWith(".mmp")) {
+			mmpFileName = mmpFileName.substring(0, mmpFileName.length() - 4);
 		}
 		return mmpFileName;
 	}
 
-
 	/**
 	 * Runs AnalyzeTool build.
-	 *
+	 * 
 	 * @param type
 	 *            Type of execution. Possible types ATOOL_INST or ATOOL_UNINST
 	 * @param monitor
@@ -575,20 +507,12 @@
 			final IProgressMonitor monitor, final ICarbideProjectInfo cpi,
 			final List<IFile> files) {
 
-		// check AnalyzeTool libraries if the AnalyzeTool libraries missing =>
-		// creates error marker for the project and cancels build
-		if( !Util.checkAtoolLibs(cpi) )
-		{
-			buildCancelled(monitor, false);
-			return false;
-		}
-
 		// get preference store
 		IPreferenceStore store = Activator.getPreferences();
 
 		// get active logging mode
 		String loggingMode = store.getString(Constants.LOGGING_MODE);
-		String s60FileNameMode = store.getString(Constants.S60_LOG_FILE_MODE);
+
 		verbose = store.getBoolean(Constants.ATOOL_VERBOSE);
 
 		// possible error code from command line engine
@@ -597,45 +521,51 @@
 		// if logging mode is set to "ask always"
 		// ask for user used logging mode
 		if (Constants.LOGGING_ASK_ALLWAYS.equals(loggingMode)) {
-			String modeSelection = askLoggingMode();
+
+			String[] outputMode = Util.openOutputModeDialog();
 
 			// user press "Cancel"
-			if (modeSelection == null || ("").equals(modeSelection)) {
+			if (outputMode == null) {
 				buildCancelled(monitor, true);
 				return false;
 			}
 			// if user selects S60 log file and mode
 			// and data file must ask for user
-			else if (Constants.LOGGING_S60.equals(modeSelection)
-					&& Constants.LOGGING_S60_USER_SPECIFIED
-							.equals(s60FileNameMode)) {
-				errorCode = askFileNameAndBuild(monitor, cpi, files);
+			else if (Constants.LOGGING_S60.equals(outputMode[0])) {
+				String logPath = outputMode[1];
+				String logFileName = outputMode[2];
+
+				errorCode = executeAtool(logPath, logFileName, type,
+						outputMode[0], files, cpi, monitor);
 			} else { // no need to ask data file for the user => just build
-						// with
+				// with
 				// user selected logging mode
-				errorCode = executeAtool(null, type, modeSelection, files, cpi, monitor);
+				errorCode = executeAtool(null, null, type, outputMode[0],
+						files, cpi, monitor);
 			}
-
 		}
 		// if used logging mode is s60
 		// and data file name must ask for the user
-		else if (Constants.LOGGING_S60.equals(loggingMode)
-				&& Constants.LOGGING_S60_USER_SPECIFIED.equals(s60FileNameMode)) {
-			errorCode = askFileNameAndBuild(monitor, cpi, files);
+		else if (Constants.LOGGING_S60.equals(loggingMode)) {
+			String path = store.getString(Constants.DEVICE_LOG_FILE_PATH);
+			String fileName = store.getString(Constants.DEVICE_LOG_FILE_NAME);
+
+			errorCode = executeAtool(path, fileName, type, loggingMode, files,
+					cpi, monitor);
 		}
 		// build with selected mode
 		else {
-			errorCode = executeAtool(null, type, loggingMode, files, cpi, monitor);
+			errorCode = executeAtool(null, null, type, loggingMode, files, cpi,
+					monitor);
 		}
 
-
 		// no errors from command line engine
-		if( errorCode == Constants.COMMAND_LINE_ERROR_CODE.OK.getCode() ) {
+		if (errorCode == Constants.COMMAND_LINE_ERROR_CODE.OK.getCode()) {
 			return true;
 		}
 
-		// if some error code is returned from command line engine display it to user
-		// and cancel build
+		// if some error code is returned from command line engine display it to
+		// user and cancel build
 		Constants.COMMAND_LINE_ERROR_CODE error = Util.getErrorCode(errorCode);
 		Util.displayCommandLineError(error);
 		buildCancelled(monitor, false);
@@ -644,7 +574,9 @@
 
 	/**
 	 * After the built is finished set preferences back to normal.
-	 * @param cpi ICarbideProjectInfo refernece
+	 * 
+	 * @param cpi
+	 *            ICarbideProjectInfo refernece
 	 */
 	public final void runPostSteps(ICarbideProjectInfo cpi) {
 
@@ -656,21 +588,21 @@
 
 		// try to load ProjectUIPlugin class
 		try {
-			Class.forName("com.nokia.carbide.cpp.project.ui.utils.ProjectUIUtils");
+			Class
+					.forName("com.nokia.carbide.cpp.project.ui.utils.ProjectUIUtils");
 
 			// no need to keep project files in sync
 			// this should fix the mmp selection dialog prompt
 			com.nokia.carbide.cpp.project.ui.utils.ProjectUIUtils
 					.setKeepProjectsInSync(keepFilesSync);
 		} catch (ClassNotFoundException cnte) {
-			//Do nothing by design
+			// Do nothing by design
 		}
 
 		// set builder preference to not prompt mmp file change dialog
 		IPreferenceStore cStore = CarbideBuilderPlugin.getDefault()
 				.getPreferenceStore();
 
-
 		// add existing/default values of Carbide builder settings
 		cStore
 				.setValue(
@@ -685,53 +617,55 @@
 						com.nokia.carbide.cdt.builder.BuilderPreferenceConstants.PREF_USE_CONCURRENT_BUILDING,
 						useConcBuild);
 
-
 		// try to remove -debug parameter from the build arguments list
 		try {
-			//get build configuration
+			// get build configuration
 			ICarbideBuildConfiguration config = cpi.getDefaultConfiguration();
 
-			//get build arguments info
+			// get build arguments info
 			BuildArgumentsInfo info = config.getBuildArgumentsInfoCopy();
 
-			//get used platform
+			// get used platform
 			String platform = config.getPlatformString();
 
 			String debug = "-debug";
 			String abldArgs = info.abldBuildArgs;
 
-			//if platform is set to ARMV5 or GCCE
-			if ( platform.contains(Constants.BUILD_TARGET_ARMV5) || platform.contains(Constants.BUILD_TARGET_GCEE)) {
+			// if platform is set to ARMV5 or GCCE
+			if (platform.contains(Constants.BUILD_TARGET_ARMV5)
+					|| platform.contains(Constants.BUILD_TARGET_GCEE)) {
 
-				//get "-debug" string index
+				// get "-debug" string index
 				int index = abldArgs.indexOf(debug);
 
-				//if abld build arguments contains only "-debug" parameter
-				if( abldArgs.equals(debug) ) {
+				// if abld build arguments contains only "-debug" parameter
+				if (abldArgs.equals(debug)) {
 					info.abldBuildArgs = "";
 					config.setBuildArgumentsInfo(info);
 				}
-				//remove just "-debug" word
-				else if( abldArgs.contains(debug) && index != -1 ) {
-					info.abldBuildArgs = abldArgs.substring(0,index) + abldArgs.substring(index+debug.length(), abldArgs.length());
+				// remove just "-debug" word
+				else if (abldArgs.contains(debug) && index != -1) {
+					info.abldBuildArgs = abldArgs.substring(0, index)
+							+ abldArgs.substring(index + debug.length(),
+									abldArgs.length());
 					config.setBuildArgumentsInfo(info);
 				}
 			}
 
-		}catch( java.lang.NoSuchMethodError nsme ) {
-			//Do nothing by design
-			//user might run AT with too old Carbide version
-		}catch( Exception e ) {
+		} catch (java.lang.NoSuchMethodError nsme) {
+			// Do nothing by design
+			// user might run AT with too old Carbide version
+		} catch (Exception e) {
 			e.printStackTrace();
 		}
 
-		//after the build is finished => open the console view
+		// after the build is finished => open the console view
 		Util.openConsoleView();
 	}
 
 	/**
 	 * Checks is atool.exe available and modifies Carbide preferences.
-	 *
+	 * 
 	 * @param launcher
 	 *            Command launcher
 	 * @param monitor
@@ -743,7 +677,6 @@
 	protected final boolean runPreSteps(final CarbideCommandLauncher launcher,
 			final IProgressMonitor monitor, final ICarbideProjectInfo cpi) {
 
-
 		// set command launchers
 		cmdLauncher = launcher;
 
@@ -751,43 +684,48 @@
 		if (!Util.isAtoolAvailable()) {
 			launcher.writeToConsole(Constants.INFO_ATOOL_NOT_AVAILABLE);
 			buildCancelled(monitor, false);
-			Util.showErrorMessage(Constants.ERROR_ATOOL_NOT_AVAILABLE);
+			Util.showMessageDialog(Constants.CLE_VERSION_MISMATCH,
+					Constants.ERROR_ATOOL_NOT_AVAILABLE, SWT.ICON_ERROR);
+
 			return false;
 		}
-		
-		// check AnalyzeTool version, 1.6.0 and forward versions is supported
-		String atoolVersion = Util.getAtoolVersionNumber(Util.getAtoolInstallFolder());
-		int compared = Util.compareVersionNumber(atoolVersion, Constants.MIN_VERSION);
-		if( compared == Constants.VERSION_NUMBERS_SECOND || compared == Constants.VERSION_NUMBERS_INVALID ) {
+
+		// check supported AnalyzeTool version
+		String atoolVersion = Util.getAtoolVersionNumber(Util
+				.getAtoolInstallFolder());
+		int compared = Util.compareVersionNumber(atoolVersion,
+				Constants.MIN_CLE_SUPPORTED);
+		if (compared == Constants.VERSION_NUMBERS_SECOND
+				|| compared == Constants.VERSION_NUMBERS_INVALID) {
+			launcher.writeToConsole(MessageFormat.format(
+					Constants.CLE_OLDER_THAN_MIN, Constants.MIN_CLE_SUPPORTED));
 			buildCancelled(monitor, false);
-			Util.showMessage(Constants.TOO_OLD_ENGINE);
+			Util.showMessageDialog(Constants.CLE_VERSION_MISMATCH,
+					MessageFormat.format(Constants.CLE_OLDER_THAN_MIN,
+							Constants.MIN_CLE_SUPPORTED), SWT.ICON_ERROR);
 			return false;
 		}
 
 		/**
-		 *
-		 * Below is code a sample which are related to the AT-682,
-		 * but it is decided to let out from current release.
-		String coreVersion = Util.getAtoolCoreVersion(cpi.getProject());
-		compared = Util.compareVersionNumber(coreVersion, atoolVersion);
-		if( compared != Constants.VERSION_NUMBERS_EQUALS ) 
-		{
-			boolean retValue = Util.openConfirmationDialog("AnalyzeTool command line engine and AnalyzeTool core version mismatch.\n" +
-					"This usually leads to problems.\n\nDo you want to continue?");
-			if( !retValue ) {
-				buildCancelled(monitor, false);
-				return false;	
-			}
-		}
-		*/
+		 * 
+		 * Below is code a sample which are related to the AT-682, but it is
+		 * decided to let out from current release. String coreVersion =
+		 * Util.getAtoolCoreVersion(cpi.getProject()); compared =
+		 * Util.compareVersionNumber(coreVersion, atoolVersion); if( compared !=
+		 * Constants.VERSION_NUMBERS_EQUALS ) { boolean retValue =
+		 * Util.openConfirmationDialog(
+		 * "AnalyzeTool command line engine and AnalyzeTool core version mismatch.\n"
+		 * + "This usually leads to problems.\n\nDo you want to continue?"); if(
+		 * !retValue ) { buildCancelled(monitor, false); return false; } }
+		 */
 		// remove existing error markers
 		try {
 			CarbideCPPBuilder.removeAllMarkers(cpi.getProject());
-		}catch (CoreException ce) {
+		} catch (CoreException ce) {
 			ce.printStackTrace();
 			return false;
 		}
-		
+
 		// check used platform
 		if (!checkPlatform(cpi)) {
 			buildCancelled(monitor, Util
@@ -795,16 +733,11 @@
 			return false;
 		}
 
-		// check AnalyzeTool libraries if the AnalyzeTool libraries missing =>
-		// creates error marker for the project and cancels build
-		if( !Util.checkAtoolLibs(cpi) )
-		{
-			PlatformUI.getWorkbench().getDisplay().syncExec( new Runnable() {
-				public void run() {
-					// show error message for the user
-					Util.showMessage(Constants.CAN_NOT_FIND_LIBRARIES);
-				}
-			});
+		// check AnalyzeTool libraries
+		final String libsCheck = Util.checkAtoolLibs(cpi);
+		if (!libsCheck.equals(Constants.ATOOL_LIBS_OK)) {
+			Util.showMessageDialog(Constants.DIALOG_TITLE, libsCheck,
+					SWT.ICON_ERROR);
 			buildCancelled(monitor, false);
 			return false;
 		}
@@ -831,7 +764,7 @@
 			com.nokia.carbide.cpp.project.ui.utils.ProjectUIUtils
 					.setKeepProjectsInSync(false);
 		} catch (ClassNotFoundException cnfe) {
-			//Do nothing by design
+			// Do nothing by design
 		}
 
 		// set builder preference to not prompt mmp file change dialog
@@ -846,7 +779,7 @@
 		boolean useConcBuild = cStore
 				.getBoolean(com.nokia.carbide.cdt.builder.BuilderPreferenceConstants.PREF_USE_CONCURRENT_BUILDING);
 
-		//store existing values
+		// store existing values
 		store.setValue(Constants.PREFS_PROMPT_MMP, promptMPPChange);
 		store.setValue(Constants.PREFS_MANAGE_DEPS, manageDeps);
 		store.setValue(Constants.PREFS_CONC_BUILD, useConcBuild);
@@ -863,57 +796,63 @@
 				.setValue(
 						com.nokia.carbide.cdt.builder.BuilderPreferenceConstants.PREF_USE_CONCURRENT_BUILDING,
 						false);
-		
+
 		// try to add -debug parameter to the build arguments list
 		try {
-			//get selected build configuration
+			// get selected build configuration
 			ICarbideBuildConfiguration config = cpi.getDefaultConfiguration();
 
-			//get build arguments info
+			// get build arguments info
 			BuildArgumentsInfo info = config.getBuildArgumentsInfoCopy();
 
-			//get selected platform
+			// get selected platform
 			String platform = cpi.getDefaultConfiguration().getPlatformString();
 
-			//if platform is ARMV5 or GCCE and the "-debug" parameter is not set => we need set the parameter
-			if ( (platform.contains(Constants.BUILD_TARGET_ARMV5) || platform.contains(Constants.BUILD_TARGET_GCEE)) && !info.abldBuildArgs.contains("-debug") ) {
-				if( info.abldBuildArgs.length() > 0 && !info.abldBuildArgs.endsWith(" ") ) {
+			// if platform is ARMV5 or GCCE and the "-debug" parameter is not
+			// set => we need set the parameter
+			if ((platform.contains(Constants.BUILD_TARGET_ARMV5) || platform
+					.contains(Constants.BUILD_TARGET_GCEE))
+					&& !info.abldBuildArgs.contains("-debug")) {
+				if (info.abldBuildArgs.length() > 0
+						&& !info.abldBuildArgs.endsWith(" ")) {
 					info.abldBuildArgs += " ";
 				}
 				info.abldBuildArgs += "-debug";
 				config.setBuildArgumentsInfo(info);
 			}
-
 		}
-		//catch NoSuchMethodError because is it possible to use older versions where this method is not available
-		catch( java.lang.NoSuchMethodError nsme)
-		{
-			//Do nothing by design
+		// catch NoSuchMethodError because is it possible to use older versions
+		// where this method is not available
+		catch (java.lang.NoSuchMethodError nsme) {
+			// Do nothing by design
 		}
-
 		return true;
 	}
 
 	/**
 	 * Executes uninstrument for the project.
-	 * @param command Uninstrument command
-	 * @param cpi ICarbideProjectInfo reference
-	 * @param monitor IProgressMonitor reference
+	 * 
+	 * @param command
+	 *            Uninstrument command
+	 * @param cpi
+	 *            ICarbideProjectInfo reference
+	 * @param monitor
+	 *            IProgressMonitor reference
 	 */
-	public void runUninstrument(String command, ICarbideProjectInfo cpi, IProgressMonitor monitor)
-	{
+	public void runUninstrument(String command, ICarbideProjectInfo cpi,
+			IProgressMonitor monitor) {
 		cmdLauncher.showCommand(true);
 		String[] arguments = new String[1];
-	    arguments[0] = command;
+		arguments[0] = command;
 		int error = cmdLauncher.executeCommand(new Path(Util
-				.getAtoolInstallFolder()),arguments,
-				CarbideCPPBuilder.getResolvedEnvVars(cpi
-						.getDefaultConfiguration()), cpi
-					.getINFWorkingDirectory());
-		
+				.getAtoolInstallFolder()), arguments, CarbideCPPBuilder
+				.getResolvedEnvVars(cpi.getDefaultConfiguration()), cpi
+				.getINFWorkingDirectory());
+
 		// if some occurs => display it to user
-		if( error != Constants.COMMAND_LINE_ERROR_CODE.OK.getCode() ) {
-			Constants.COMMAND_LINE_ERROR_CODE errorCode = Util.getErrorCode(error);
+		if (error != Constants.COMMAND_LINE_ERROR_CODE.OK.getCode()) {
+			Constants.COMMAND_LINE_ERROR_CODE errorCode = Util
+					.getErrorCode(error);
 			Util.displayCommandLineError(errorCode);
 		}
 	}
--- a/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/builder/BuilderUtil.java	Tue Aug 24 12:10:03 2010 +0300
+++ b/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/builder/BuilderUtil.java	Tue Aug 24 12:16:27 2010 +0300
@@ -23,9 +23,9 @@
 
 /**
  * Add and removes AnalyzeTool build natures to project natures.
- *
+ * 
  * @author kihe
- *
+ * 
  */
 public class BuilderUtil {
 
@@ -39,7 +39,7 @@
 
 	/**
 	 * Adds AnalyzeTool build natures.
-	 *
+	 * 
 	 * @param project
 	 *            Project reference
 	 * @return True no errors otherwise False
@@ -56,46 +56,52 @@
 			// create array for the new natures
 			String[] newNatures = new String[natures.length + 2];
 
-
-			//if QT nature found we must adjust pre- and post natures to correct place
-			if( description.hasNature(com.trolltech.qtcppproject.QtNature.QT_NATURE_ID) ) {
+			// if QT nature found we must adjust pre- and post natures to
+			// correct place
+			if (description
+					.hasNature(com.trolltech.qtcppproject.QtNature.QT_NATURE_ID)) {
 
-				//find QT nature location
+				// find QT nature location
 				int qtNatureIndex = 0;
-				for( int i=0; i<natures.length; i++ ) {
-					if( natures[i].equals(com.trolltech.qtcppproject.QtNature.QT_NATURE_ID ) ) {
+				for (int i = 0; i < natures.length; i++) {
+					if (natures[i]
+							.equals(com.trolltech.qtcppproject.QtNature.QT_NATURE_ID)) {
 						qtNatureIndex = i;
 						break;
 					}
 				}
 
-				//QT nature id found and it is first nature=> now start to copy existing id and add AT id
-				if( qtNatureIndex == 0 ) {
-					//add natures
+				// QT nature id found and it is first nature=> now start to copy
+				// existing id and add AT id
+				if (qtNatureIndex == 0) {
+					// add natures
 					newNatures[0] = natures[0];
 					newNatures[1] = PreNature.NATURE_ID;
 
-					//copy rest of the existing natures
-					System.arraycopy(natures, 1, newNatures, 2, natures.length-1);
+					// copy rest of the existing natures
+					System.arraycopy(natures, 1, newNatures, 2,
+							natures.length - 1);
 
 					// add post-builder nature
 					newNatures[natures.length + 1] = PostNature.NATURE_ID;
 				}
-				//QT nature id found but there are some other natures
-				//before QT nature
+				// QT nature id found but there are some other natures
+				// before QT nature
 				else {
-					//copy existing natures
-					System.arraycopy(natures, 0, newNatures, 0, qtNatureIndex+1);
-					newNatures[qtNatureIndex+1] = PreNature.NATURE_ID;
+					// copy existing natures
+					System.arraycopy(natures, 0, newNatures, 0,
+							qtNatureIndex + 1);
+					newNatures[qtNatureIndex + 1] = PreNature.NATURE_ID;
 
-					//copy rest of the existing natures
-					System.arraycopy(natures, qtNatureIndex+1, newNatures, qtNatureIndex+2, natures.length-qtNatureIndex);
+					// copy rest of the existing natures
+					System.arraycopy(natures, qtNatureIndex + 1, newNatures,
+							qtNatureIndex + 2, natures.length - qtNatureIndex);
 
 					// add post-builder nature
 					newNatures[natures.length + 1] = PostNature.NATURE_ID;
 				}
 			}
-			//no QT nature found just add pre nature first and post nature last
+			// no QT nature found just add pre nature first and post nature last
 			else {
 
 				// set pre-builder nature
@@ -119,11 +125,9 @@
 		}
 	}
 
-
-
 	/**
 	 * Disable AnalyzeTool build natures.
-	 *
+	 * 
 	 * @param project
 	 *            Project reference
 	 */
@@ -141,21 +145,19 @@
 				boolean foundPostNature = description
 						.hasNature(PostNature.NATURE_ID);
 
-				//either pre- or post builder nature found => remove it
+				// either pre- or post builder nature found => remove it
 				if (foundPreNature || foundPostNature) {
 					removeNature(project, 1);
 				}
-
 			}
 		} catch (CoreException ce) {
 			ce.printStackTrace();
 		}
-
 	}
 
 	/**
 	 * Add AnalyzeTool custom builder nature to project builder natures.
-	 *
+	 * 
 	 * @param project
 	 *            Project reference
 	 * @return True if natures are added otherwise False
@@ -163,15 +165,14 @@
 	public final boolean enableNatures(final IProject project) {
 		try {
 			// check is nature enable
-			if( isNatureEnabled(project)) {
+			if (isNatureEnabled(project)) {
 				return true;
 			}
 			// get project description
 			IProjectDescription description = project.getDescription();
 
 			// find natures
-			boolean foundPreNature = description
-					.hasNature(PreNature.NATURE_ID);
+			boolean foundPreNature = description.hasNature(PreNature.NATURE_ID);
 			boolean foundPostNature = description
 					.hasNature(PostNature.NATURE_ID);
 
@@ -191,7 +192,7 @@
 
 	/**
 	 * Checks is AnalyzeTool custom nature enabled.
-	 *
+	 * 
 	 * @param projRef
 	 *            Project reference
 	 * @return True both pre or post nature enabled otherwise False
@@ -200,7 +201,7 @@
 		boolean preNatureFound = false;
 		boolean postNatureFound = false;
 
-		//check project validity
+		// check project validity
 		if (projRef == null || !projRef.isOpen()) {
 			return false;
 		}
@@ -216,12 +217,11 @@
 			return true;
 		}
 		return false;
-
 	}
 
 	/**
 	 * Removes AnalyzeTool custom builder natures.
-	 *
+	 * 
 	 * @param project
 	 *            Project reference
 	 * @param count
@@ -235,8 +235,8 @@
 
 			int index = 0;
 
-			//thru natures
-			//if pre- or post nature found skip it
+			// thru natures
+			// if pre- or post nature found skip it
 			for (int i = 0; i < natures.length; i++) {
 				if (!natures[i].equals(PreNature.NATURE_ID)
 						&& !natures[i].equals(PostNature.NATURE_ID)) {
@@ -250,6 +250,5 @@
 		} catch (CoreException ce) {
 			ce.printStackTrace();
 		}
-
 	}
 }
--- a/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/builder/CustomPostBuilder.java	Tue Aug 24 12:10:03 2010 +0300
+++ b/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/builder/CustomPostBuilder.java	Tue Aug 24 12:16:27 2010 +0300
@@ -23,19 +23,17 @@
 
 //import com.nokia.carbide.cdt.builder.BuildArgumentsInfo;
 import com.nokia.carbide.cdt.builder.CarbideBuilderPlugin;
-import com.nokia.carbide.cdt.builder.builder.CarbideCPPBuilder;
-//import com.nokia.carbide.cdt.builder.project.ICarbideBuildConfiguration;
+import com.nokia.carbide.cdt.builder.builder.CarbideCPPBuilder; //import com.nokia.carbide.cdt.builder.project.ICarbideBuildConfiguration;
 import com.nokia.carbide.cdt.builder.project.ICarbideProjectInfo;
 import com.nokia.s60tools.analyzetool.Activator;
 import com.nokia.s60tools.analyzetool.global.Constants;
 import com.nokia.s60tools.analyzetool.global.Util;
 
-
 /**
  * Class to execute custom post-build actions.
- *
+ * 
  * @author kihe
- *
+ * 
  */
 public class CustomPostBuilder extends AnalyzeToolBuilder {
 
@@ -44,8 +42,8 @@
 
 	/**
 	 * Executes AnalyzeTool post actions when user builds projects.
-	 *
-	 *
+	 * 
+	 * 
 	 * @see com.nokia.carbide.cdt.builder.builder.CarbideCPPBuilder#build(int,
 	 *      java.util.Map, org.eclipse.core.runtime.IProgressMonitor)
 	 */
@@ -61,9 +59,9 @@
 		ICarbideProjectInfo cpi = CarbideBuilderPlugin.getBuildManager()
 				.getProjectInfo(project);
 
-
 		IPreferenceStore store = Activator.getPreferences();
-		boolean buildCanceled = store.getBoolean(Constants.PREFS_BUILD_CANCELLED);
+		boolean buildCanceled = store
+				.getBoolean(Constants.PREFS_BUILD_CANCELLED);
 		// if the AnalyzeTool is canceled
 		if (buildCanceled) {
 			getCarbideCommandLauncher().writeToConsole(
@@ -79,25 +77,20 @@
 			return null;
 		}
 
-
-		//execute atool.exe
+		// execute atool.exe
 		if (CarbideCPPBuilder.projectHasBuildErrors(cpi.getProject())) {
-			runUninstrument(Constants.ATOOL_UNINST_FAILED,cpi, monitor);
+			runUninstrument(Constants.ATOOL_UNINST_FAILED, cpi, monitor);
 		} else {
-			runUninstrument(Constants.ATOOL_UNINST,cpi, monitor);
+			runUninstrument(Constants.ATOOL_UNINST, cpi, monitor);
 		}
-
-
 		monitor.worked(1);
-
 		runPostSteps(cpi);
 
 		return new IProject[0];
 	}
 
-
 	@Override
-	protected void clean(final IProgressMonitor arg0){
+	protected void clean(final IProgressMonitor arg0) {
 		// DO nothing by design
 	}
 }
--- a/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/builder/CustomPreBuilder.java	Tue Aug 24 12:10:03 2010 +0300
+++ b/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/builder/CustomPreBuilder.java	Tue Aug 24 12:16:27 2010 +0300
@@ -29,19 +29,19 @@
 
 /**
  * Class to execute AnalyzeTool custom pre-build actions.
- *
+ * 
  * This class holds many static variables because {@link CustomPostBuilder}
  * class need to know what variables is used when calling CustomPreBuilder
  * without creating a new object of this class
- *
+ * 
  * @author kihe
- *
+ * 
  */
 public class CustomPreBuilder extends AnalyzeToolBuilder {
 
 	/**
 	 * Executes AnalyzeTool post actions when user builds projects.
-	 *
+	 * 
 	 * @see com.nokia.carbide.cdt.builder.builder.CarbideCPPBuilder#build(int,
 	 *      java.util.Map, org.eclipse.core.runtime.IProgressMonitor)
 	 */
@@ -63,8 +63,9 @@
 		final ICarbideProjectInfo cpi = CarbideBuilderPlugin.getBuildManager()
 				.getProjectInfo(project);
 
-		final CarbideCommandLauncher launcher = new CarbideCommandLauncher(project,
-				monitor, Constants.atoolParserIds, cpi.getINFWorkingDirectory());
+		final CarbideCommandLauncher launcher = new CarbideCommandLauncher(
+				project, monitor, Constants.atoolParserIds, cpi
+						.getINFWorkingDirectory());
 		launcher.showCommand(true);
 
 		if (!runPreSteps(launcher, monitor, cpi)) {
@@ -77,8 +78,7 @@
 	}
 
 	@Override
-	protected void clean(final IProgressMonitor arg0){
+	protected void clean(final IProgressMonitor arg0) {
 		// DO nothing by design
 	}
-
 }
--- a/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/builder/PostNature.java	Tue Aug 24 12:10:03 2010 +0300
+++ b/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/builder/PostNature.java	Tue Aug 24 12:16:27 2010 +0300
@@ -101,5 +101,4 @@
 	public void setProject(IProject projectRef) {
 		this.project = projectRef;
 	}
-
 }
--- a/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/engine/CallstackDataParser.java	Tue Aug 24 12:10:03 2010 +0300
+++ b/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/engine/CallstackDataParser.java	Tue Aug 24 12:16:27 2010 +0300
@@ -11,7 +11,7 @@
  *
  * Contributors:
  *
- * Description:  Definitions for the class ParseAnalyzeData
+ * Description:  Definitions for the class CallstackDataParser
  *
  */
 package com.nokia.s60tools.analyzetool.engine;
@@ -27,160 +27,194 @@
 import com.nokia.s60tools.analyzetool.engine.statistic.FreeInfo;
 import com.nokia.s60tools.analyzetool.engine.statistic.ProcessInfo;
 import com.nokia.s60tools.analyzetool.global.Constants;
+import com.nokia.s60tools.analyzetool.global.Util;
 import com.nokia.s60tools.analyzetool.global.Constants.Operation;
 
 /**
- * This class parses line of .dat file format and extracts
- * callstack data. For now this is a separate class but could
- * eventually be moved into ParseAnalyzeData after some refactoring. 
- *
+ * This class parses line of .dat file format and extracts callstack data. For
+ * now this is a separate class but could eventually be moved into
+ * ParseAnalyzeData after some re-factoring.
  */
 public class CallstackDataParser {
-	/** true if callstack reading for this BaseInfo is now complete*/
+
+	/** True, if callstack reading for this BaseInfo is now complete. */
 	boolean complete = false;
-	/** resulting callstack */
+
+	/** Resulting callstack. */
 	private List<AllocCallstack> callstack;
+
 	/** BaseInfo for the current alloc or free */
 	private BaseInfo baseInfo;
+
 	/** ProcessInfo for the current alloc or free */
 	private ProcessInfo process;
-	/** number of remaining callstack elements expected to be processed with ALLOCF or FREEF */
+
+	/**
+	 * Number of remaining callstack elements expected to be processed with ALF
+	 * or FRF.
+	 */
 	private int remainingSize;
-	
-	/** Cache for callstack items. Used when allocation fragment is parsed in the wrong order. */
-	private HashMap<Integer, List<AllocCallstack>> callstackCache = null;
-	
+
 	/**
-	 * Constructor
-	 * @param baseInfo BaseInfo for the current alloc or free
-	 * @param p ProcessInfo for the current alloc or free
+	 * Cache for callstack items. Used when allocation fragment is parsed in the
+	 * wrong order.
 	 */
-	public CallstackDataParser(BaseInfo baseInfo, ProcessInfo p) {
-		if (p == null || baseInfo == null || p.getProcessID() != baseInfo.getProcessID()){
-			throw new IllegalArgumentException("BaseInfo and ProcessInfo are mandatory and must not be null; and the process id of both must match."); //$NON-NLS-1$
+	private HashMap<Integer, List<AllocCallstack>> callstackCache = null;
+
+	/**
+	 * Constructor.
+	 * 
+	 * @param baseInfo
+	 *            BaseInfo for the current alloc or free
+	 * @param processInfo
+	 *            ProcessInfo for the current alloc or free
+	 */
+	public CallstackDataParser(BaseInfo baseInfo, ProcessInfo processInfo) {
+		if (processInfo == null || baseInfo == null
+				|| processInfo.getProcessID() != baseInfo.getProcessID()) {
+			throw new IllegalArgumentException(
+					"BaseInfo and ProcessInfo are mandatory and must not be null; and the process ID of both must match."); //$NON-NLS-1$
 		}
 		this.baseInfo = baseInfo;
-		this.process = p;
+		this.process = processInfo;
 		callstack = new ArrayList<AllocCallstack>();
 	}
 
 	/**
-	 * Parses one line of PCSS statement
+	 * Parses one line of &ltAT&gt statement.
+	 * 
 	 * @param aLine
 	 * @return true, if this callstack is now complete (all parts are available)
 	 */
 	public final boolean parseLine(final String aLine) {
-			
-		if (aLine.indexOf(Constants.PREFIX) == -1){
-			//not a PCSS statement
+
+		if (aLine.indexOf(Constants.PREFIX) == -1) {
+			// not a <AT> statement
 			return false;
 		}
-		
-		String[] lineFragments = getLineFragments(aLine);
-		if (lineFragments.length < 5){
-			//not a valid PCSS statment for callstack processing
+
+		// String[] lineFragments = getLineFragments(aLine);
+
+		int index = aLine.indexOf(Constants.PREFIX);
+
+		String time = aLine.substring(0, index).trim();
+
+		// // get logging time of line in microseconds
+		// long logTime = Util.getLogTime(time);
+
+		long logTime = Long.parseLong(time, 16);
+
+		String usedString = aLine.substring(index, aLine.length());
+
+		String[] lineFragments = usedString.split(" ");
+
+		if (lineFragments.length < 5) {
+			// not a valid <AT> statement for callstack processing
 			return false;
 		}
 		int processID = Integer.parseInt(lineFragments[1], 16);
-		if (baseInfo.getProcessID() != processID || process.getProcessID() != processID){
-			//statement is not for current process id
+		if (baseInfo.getProcessID() != processID
+				|| process.getProcessID() != processID) {
+			// statement is not for current process id
 			return false;
 		}
-		
-		//the operation must match
-		Constants.Operation op = Constants.Operation.toOperation(lineFragments[2]);
-		if (!verifyOperation(op, baseInfo)){
-			return false;
-		}
-		
-		//the memory address must match
-		long memoryAddress = Long.parseLong(lineFragments[3],16);
-		if (baseInfo.getMemoryAddress() != memoryAddress){
+
+		// the operation must match
+		Constants.Operation op = Constants.Operation
+				.toOperation(lineFragments[2]);
+		if (!verifyOperation(op, baseInfo)) {
 			return false;
 		}
-		
-		
+
+		// the memory address must match
+		long memoryAddress = Long.parseLong(lineFragments[3], 16);
+		if (baseInfo.getMemoryAddress() != memoryAddress) {
+			return false;
+		}
+
 		boolean ret = false;
-		
+
 		switch (op) {
-		case ALLOC:
-			ret = parseAlloc(lineFragments);
-			break;
-		case ALLOCH:
+		case ALH:
 			ret = parseHeader(lineFragments, 6);
 			break;
-		case FREEH:
-			int traceFileVersion = process.getTraceDataVersion();
-			ret = parseHeader(lineFragments, traceFileVersion > 1 ? 5 : 4);
+		case FRH:
+			ret = parseHeader(lineFragments, 5);
 			break;
-		case ALLOCF:
-			//fall through
-		case FREEF:
-			ret = parseFragment(lineFragments);				
+		case ALF:
+			// fall through
+		case FRF:
+			ret = parseFragment(lineFragments, logTime);
 			break;
 		default:
 			// ignore this line
 			break;
 		}
-		
 		return ret;
 	}
-	
+
 	private static boolean verifyOperation(Operation op, BaseInfo aBaseInfo) {
-		return ((aBaseInfo instanceof AllocInfo && (op == Constants.Operation.ALLOC
-				|| op == Constants.Operation.ALLOCH || op == Constants.Operation.ALLOCF)) 
-				|| (aBaseInfo instanceof FreeInfo && (op == Constants.Operation.FREEH 
-				|| op == Constants.Operation.FREEF)));
+		return ((aBaseInfo instanceof AllocInfo && (op == Constants.Operation.ALH || op == Constants.Operation.ALF)) || (aBaseInfo instanceof FreeInfo && (op == Constants.Operation.FRH || op == Constants.Operation.FRF)));
 	}
 
+	// /**
+	// * Returns the line fragments of the AT statement
+	// *
+	// * @param aLine
+	// * the AT statement
+	// * @return the line fragments separated by space
+	// */
+	// private String[] getLineFragments(final String aLine) {
+	// int index = aLine.indexOf(Constants.PREFIX); // lines should be preceded
+	//
+	// if (index == -1) {
+	// return new String[0];
+	// }
+	//
+	// String usedString = (index == 0) ? aLine : aLine.substring(index, aLine
+	// .length());
+	//		return usedString.split(" "); //$NON-NLS-1$
+	// }
+
+	// /**
+	// * Parses an ALC statement. This statement contains a complete callstack.
+	// *
+	// * @param fragments
+	// * the line fragments of the statement to process
+	// * @return true if statement is complete (this method will always return
+	// * true)
+	// */
+	// private boolean parseAlloc(String[] fragments) {
+	//
+	// if (fragments.length > 5) {
+	// createCallstack(fragments, process, callstack, 6);
+	// }
+	//
+	// complete = true;
+	// return true; // we are done; there are no fragments for this alloc
+	// }
+
 	/**
-	 * Returns the line fragments of the PCSS statement
-	 * @param aLine the PCSS statement
-	 * @return the line fragments separated by space
-	 */
-	private String[] getLineFragments(final String aLine){
-		int index = aLine.indexOf(Constants.PREFIX); // lines should be preceded
-		
-		if (index == -1){
-			return new String[0];
-		}
-		
-		String usedString = (index == 0) ? aLine : aLine.substring(index, aLine.length());
-		return usedString.split(" "); //$NON-NLS-1$
-	}
-	
-	/**
-	 * Parses an ALLOC statement. This statement contains a complete callstack.
-	 * @param fragments the line fragments of the statement to process
-	 * @return true if statement is complete (this method will always return true)
-	 */
-	private boolean parseAlloc(String[] fragments) {
-		
-		if (fragments.length > 5) {
-			createCallstack(fragments, process, callstack, 6);
-		}
-		
-		complete = true;
-		return true; //we are done; there are no fragments for this alloc
-	}
-	
-	/**
-	 * Parses an ALLOCH or FREEH statement
-	 * @param fragments the line fragments of the statement to process
-	 * @param startIndex index at which the callstack size is to be found
-	 * @return true if callstack is complete, false if callstack fragment is expected
+	 * Parses an ALH or FRH statement
+	 * 
+	 * @param fragments
+	 *            the line fragments of the statement to process
+	 * @param startIndex
+	 *            index at which the callstack size is to be found
+	 * @return true if callstack is complete, false if callstack fragment is
+	 *         expected
 	 */
 	private boolean parseHeader(String[] fragments, int startIndex) {
-		
+
 		if (callstack.size() > 0 || remainingSize > 0) {
 			throw new IllegalStateException(
-					"Callstack list should still be empty when starting to process ALLOCH"); //$NON-NLS-1$
+					"Callstack list should still be empty when starting to process ALH or FRH"); //$NON-NLS-1$
 		}
 
 		if (fragments.length > startIndex) {
 
 			int callstackSize = Integer.parseInt(fragments[startIndex], 16);
-			startIndex ++;
+			startIndex++;
 
 			createCallstack(fragments, process, callstack, startIndex);
 
@@ -192,34 +226,37 @@
 				complete = true;
 			}
 		} else {
-			complete = true; // this header doesn't have callstacks - a bit strange
+			complete = true; // this header doesn't have callstacks - a bit
+			// strange
 		}
 		return complete;
 	}
-	
+
 	/**
-	 * Parses an ALLOCF or FREEF callstack fragment
-	 * @param fragments the line fragments of the statement to process
+	 * Parses an ALF or FRF callstack fragment
+	 * 
+	 * @param fragments
+	 *            the line fragments of the statement to process
 	 * @return true if callstack is now complete; false otherwise
 	 */
-	private boolean parseFragment(String[] fragments) {
-		long time = Long.parseLong(fragments[4],16);
-		int packetNumber = Integer.parseInt(fragments[5], 16);
-	
+	private boolean parseFragment(String[] fragments, long logTime) {
+		long time = process.getStartTime() + (logTime - process.getLogTime());
+		int packetNumber = Integer.parseInt(fragments[4], 16);
+
 		if (baseInfo.getTime() == time) {
 			List<AllocCallstack> tmpCallstack = new ArrayList<AllocCallstack>();
-			createCallstack(fragments, process, tmpCallstack, 6);
+			createCallstack(fragments, process, tmpCallstack, 5);
 			updateFragment(tmpCallstack, packetNumber);
-			
+
 			remainingSize -= tmpCallstack.size();
-			if (remainingSize <= 0){
+			if (remainingSize <= 0) {
 				complete = true;
 				finaliseCallstack();
 			}
 		}
 		return complete;
 	}
-	
+
 	private DllLoad getDllForAddress(ProcessInfo p, Long memoryAddress,
 			long time) {
 		for (DllLoad oneLoad : p.getDllLoads()) {
@@ -233,22 +270,26 @@
 		}
 		return null;
 	}
-	private void createCallstack(String[] fragments, ProcessInfo p, List<AllocCallstack> callstack, int startIndex) {
+
+	private void createCallstack(String[] fragments, ProcessInfo p,
+			List<AllocCallstack> callstack, int startIndex) {
 		for (int i = startIndex; i < fragments.length; i++) {
 			AllocCallstack callstackElem = new AllocCallstack(fragments[i]);
 
 			// find matching dll
-			DllLoad dllLoad = getDllForAddress(process, callstackElem.getMemoryAddress(), baseInfo.getTime());
+			DllLoad dllLoad = getDllForAddress(process, callstackElem
+					.getMemoryAddress(), baseInfo.getTime());
 			if (dllLoad != null) {
 				callstackElem.setDllLoad(dllLoad);
 			}
 			callstack.add(callstackElem);
 		}
 	}
+
 	/**
 	 * Updates allocation fragment. Means that given callstack is addition to
 	 * previous added alloc
-	 *
+	 * 
 	 * @param callstack
 	 *            Addition tmpcallstack items
 	 * @param packetNumber
@@ -256,69 +297,74 @@
 	 */
 	private void updateFragment(List<AllocCallstack> tmpcallstack,
 			int packetNumber) {
-		if (packetNumber == 1){
-			//special case; this can be added to the end of the list straight away
+		if (packetNumber == 1) {
+			// special case; this can be added to the end of the list straight
+			// away
 			callstack.addAll(tmpcallstack);
 		} else {
-			//packages may come out of order; this is managed in the callstackCache
-			if (callstackCache == null){
-				callstackCache = new HashMap<Integer, List<AllocCallstack>>();			
+			// packages may come out of order; this is managed in the
+			// callstackCache
+			if (callstackCache == null) {
+				callstackCache = new HashMap<Integer, List<AllocCallstack>>();
 			}
-			callstackCache.put(packetNumber, tmpcallstack);			
+			callstackCache.put(packetNumber, tmpcallstack);
 		}
 	}
+
 	/**
-	 * Optimises internal callstack data structures.
-	 * Should only be called after all data for this memory operation
-	 * has been loaded (i.e. all fragments)
+	 * Optimises internal callstack data structures. Should only be called after
+	 * all data for this memory operation has been loaded (i.e. all fragments)
 	 */
-	public void finaliseCallstack(){
-		if (callstackCache == null){
-			//nothing to do
+	public void finaliseCallstack() {
+		if (callstackCache == null) {
+			// nothing to do
 			return;
 		}
-		
-		if (!complete){
-			throw new IllegalStateException("callstack processing is not yet complete."); //$NON-NLS-1$
+
+		if (!complete) {
+			throw new IllegalStateException(
+					"callstack processing is not yet complete."); //$NON-NLS-1$
 		}
-			
-		if (callstack == null && callstackCache != null){
-			throw new IllegalStateException(); //first set of callstacks should always be in callstacks
+
+		if (callstack == null && callstackCache != null) {
+			throw new IllegalStateException(); // first set of callstacks should
+			// always be in callstacks
 		}
-		
-		if (callstackCache != null){
+
+		if (callstackCache != null) {
 			int size = callstackCache.size();
 			int i = 2;
-			while(size != 0){
+			while (size != 0) {
 				List<AllocCallstack> nextCallStacks = callstackCache.get(i);
-				if (nextCallStacks != null){
-					size --;
+				if (nextCallStacks != null) {
+					size--;
 					callstack.addAll(nextCallStacks);
-				} //TODO else: missing callstack: shall we report it or log it?
+				} // TODO else: missing callstack: shall we report it or log it?
 				i++;
 			}
 			callstackCache = null;
 		}
 	}
-	
+
 	/**
 	 * @return the completed callstack.
 	 */
-	public List<AllocCallstack> getCallstack(){
-		if (!complete){
-			throw new IllegalStateException("Callstack has not been completely processed."); //$NON-NLS-1$
+	public List<AllocCallstack> getCallstack() {
+		if (!complete) {
+			throw new IllegalStateException(
+					"Callstack has not been completely processed."); //$NON-NLS-1$
 		}
-		
+
 		finaliseCallstack();
 		return callstack;
 	}
-	
+
 	/**
-	 * Forces the callstack state to be set to complete. This should only be used when the end of file is encountered.
+	 * Forces the callstack state to be set to complete. This should only be
+	 * used when the end of file is encountered.
 	 */
-	public void forceComplete(){
+	public void forceComplete() {
 		complete = true;
 		finaliseCallstack();
 	}
-	
 }
--- a/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/engine/CallstackItem.java	Tue Aug 24 12:10:03 2010 +0300
+++ b/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/engine/CallstackItem.java	Tue Aug 24 12:16:27 2010 +0300
@@ -21,9 +21,9 @@
  * Contains information of one memory leak item. Information is parsed from
  * atool.exe generated XML file so we can assume that all the information is
  * valid and no other checking is needed.
- *
+ * 
  * @author kihe
- *
+ * 
  */
 public class CallstackItem extends BaseItem {
 
@@ -39,10 +39,9 @@
 	/** Flag to inform that is results created for urel builds. */
 	private boolean urelBuild = false;
 
-
 	/**
 	 * Gets file name.
-	 *
+	 * 
 	 * @return File name
 	 */
 	public final String getFileName() {
@@ -51,7 +50,7 @@
 
 	/**
 	 * Gets function name.
-	 *
+	 * 
 	 * @return Function name
 	 */
 	public final String getFunctionName() {
@@ -60,7 +59,7 @@
 
 	/**
 	 * Gets leak line number.
-	 *
+	 * 
 	 * @return Leak line number
 	 */
 	public final int getLeakLineNumber() {
@@ -69,7 +68,7 @@
 
 	/**
 	 * Is results created for the urel build.
-	 *
+	 * 
 	 * @return True if results are created for the urel build otherwise false
 	 */
 	public final boolean isUrelBuild() {
@@ -78,7 +77,7 @@
 
 	/**
 	 * Sets cpp file name which contains memory leaks.
-	 *
+	 * 
 	 * @param newFileName
 	 *            File name
 	 */
@@ -88,7 +87,7 @@
 
 	/**
 	 * Sets function name.
-	 *
+	 * 
 	 * @param newFunctionName
 	 *            Function name
 	 */
@@ -98,7 +97,7 @@
 
 	/**
 	 * Sets leak line number.
-	 *
+	 * 
 	 * @param newLeakLineNumber
 	 *            Leak line number
 	 */
@@ -108,7 +107,7 @@
 
 	/**
 	 * Sets urel build flag.
-	 *
+	 * 
 	 * @param build
 	 *            Is project built with urel command
 	 */
@@ -118,13 +117,13 @@
 
 	/**
 	 * Checks that at least one needed information is available
-	 *
-	 * @return False if at least one needed information is available(not empty) otherwise
-	 *         True
+	 * 
+	 * @return False if at least one needed information is available(not empty)
+	 *         otherwise True
 	 */
 	public boolean isEmpty() {
-		if ( !checkData() && (fileName == null || ("").equals(fileName))
-				&& (functionName == null || ("").equals(functionName) ) ) {
+		if (!checkData() && (fileName == null || ("").equals(fileName))
+				&& (functionName == null || ("").equals(functionName))) {
 			return true;
 		}
 		return false;
--- a/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/engine/DeferredCallstackManager.java	Tue Aug 24 12:10:03 2010 +0300
+++ b/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/engine/DeferredCallstackManager.java	Tue Aug 24 12:16:27 2010 +0300
@@ -30,105 +30,122 @@
 import com.nokia.s60tools.analyzetool.engine.statistic.ProcessInfo;
 
 /**
- * CallstackManager for reading of callstacks on demand by accessing the .dat file
- * after the initial parsing of the file has completed.
- *
+ * CallstackManager for reading of callstacks on demand by accessing the .dat
+ * file after the initial parsing of the file has completed.
+ * 
  */
-public class DeferredCallstackManager implements ICallstackManager{
-	/** max number of lines to parse before giving up and forcing the callstack as complete
-	 * This helps to deal with corrupt files */
+public class DeferredCallstackManager implements ICallstackManager {
+
+	/**
+	 * Max number of lines to parse before giving up and forcing the callstack
+	 * as complete. This helps to deal with corrupt files.
+	 */
 	private static final int BAIL_OUT_LIMIT = 100;
-	
+
 	/** Location of the .dat file */
 	String fileLocation;
-	/** list of processes for this file; this has to contain all DllLoads for each process */
+
+	/**
+	 * list of processes for this file; this has to contain all DllLoads for
+	 * each process
+	 */
 	private Map<Integer, ProcessInfo> processMap;
 
 	/**
-	 * Contructor
-	 * @param fileLocation full path of the file to read callstacks from
+	 * Constructor
+	 * 
+	 * @param fileLocation
+	 *            full path of the file to read callstacks from
 	 */
 	public DeferredCallstackManager(String fileLocation) {
 		this.fileLocation = fileLocation;
 	}
-	
+
 	/**
 	 * Setter for all processes valid for this data file. This has to contain
 	 * all DllInfo information for each of the processes
-	 * @param processes List of processes for the file
+	 * 
+	 * @param processes
+	 *            List of processes for the file
 	 */
-	public void setProcesses(AbstractList<ProcessInfo> processes){
-		//make a copy
+	public void setProcesses(AbstractList<ProcessInfo> processes) {
+		// make a copy
 		if (processMap == null) {
 			processMap = new HashMap<Integer, ProcessInfo>();
 			for (ProcessInfo processInfo : processes) {
 				processMap.put(processInfo.getProcessID(), processInfo);
 			}
 		}
-	}	
-	
-	/* (non-Javadoc)
-	 * @see com.nokia.s60tools.analyzetool.engine.statistic.ICallstackManager#readCallstack(com.nokia.s60tools.analyzetool.engine.statistic.BaseInfo)
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @seecom.nokia.s60tools.analyzetool.engine.statistic.ICallstackManager#
+	 * readCallstack(com.nokia.s60tools.analyzetool.engine.statistic.BaseInfo)
 	 */
-	public List<AllocCallstack> readCallstack(BaseInfo baseInfo) throws IOException{
-		//Returns a fully resolved callstack file in .dat format.
-		//The baseInfo's file position points to the beginning of a record where the callstack information starts
-		
-		if (!hasCallstack(baseInfo)){
+	public List<AllocCallstack> readCallstack(BaseInfo baseInfo)
+			throws IOException {
+		// Returns a fully resolved callstack file in .dat format.
+		// The baseInfo's file position points to the beginning of a record
+		// where the callstack information starts
+
+		if (!hasCallstack(baseInfo)) {
 			return null;
 		}
 
 		ProcessInfo p = processMap.get(baseInfo.getProcessID());
-		
-		if (p == null){
-			//no matching process found
+
+		if (p == null) {
+			// no matching process found
 			return new ArrayList<AllocCallstack>();
 		}
-		
-		
+
 		RandomAccessFile fileReader = null;
 		List<AllocCallstack> ret = null;
-		
-		
+
 		try {
 			// Open .dat file for reading
-			fileReader = new RandomAccessFile(new File(fileLocation), "r");  //$NON-NLS-1$
+			fileReader = new RandomAccessFile(new File(fileLocation), "r"); //$NON-NLS-1$
 
-			// Parsing the ELF header to read the Program Header Offset 'e_phoff' value
+			// Parsing the ELF header to read the Program Header Offset
+			// 'e_phoff' value
 			fileReader.seek(baseInfo.getFilePos());
-			
+
 			CallstackDataParser parser = new CallstackDataParser(baseInfo, p);
-			int lineCnt = 0; 
+			int lineCnt = 0;
 			String line;
-			while((line = fileReader.readLine()) != null){
-				if (parser.parseLine(line)){
+			while ((line = fileReader.readLine()) != null) {
+				if (parser.parseLine(line)) {
 					parser.finaliseCallstack();
 					ret = parser.getCallstack();
 					break;
 				}
-				
-				//let's count the lines we parse and bail out after <n> lines in case the file is corrupt
-				lineCnt ++;
-				if (lineCnt == BAIL_OUT_LIMIT){
+
+				// let's count the lines we parse and bail out after <n> lines
+				// in case the file is corrupt
+				lineCnt++;
+				if (lineCnt == BAIL_OUT_LIMIT) {
 					parser.forceComplete();
 					ret = parser.getCallstack();
 					break;
 				}
 			}
 		} finally {
-			if (fileReader != null){
+			if (fileReader != null) {
 				fileReader.close();
 			}
 		}
-		
 		return ret == null ? new ArrayList<AllocCallstack>() : ret;
 	}
 
-	/* (non-Javadoc)
-	 * @see com.nokia.s60tools.analyzetool.engine.statistic.ICallstackManager#hasCallstack(com.nokia.s60tools.analyzetool.engine.statistic.BaseInfo)
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @seecom.nokia.s60tools.analyzetool.engine.statistic.ICallstackManager#
+	 * hasCallstack(com.nokia.s60tools.analyzetool.engine.statistic.BaseInfo)
 	 */
 	public boolean hasCallstack(BaseInfo baseInfo) {
 		return baseInfo.getFilePos() > -1;
 	}
-	
 }
--- a/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/engine/EpocReader.java	Tue Aug 24 12:10:03 2010 +0300
+++ b/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/engine/EpocReader.java	Tue Aug 24 12:16:27 2010 +0300
@@ -34,78 +34,82 @@
 
 /**
  * Creates new job for polling epocwind.out file
+ * 
  * @author kihe
- *
+ * 
  */
-public class EpocReader extends Job{
+public class EpocReader extends Job {
 
-	/** Epocwind.out file location*/
+	/** Epocwind.out file location */
 	private final String emulatorFileLocation;
 
-	/**Is file listening active*/
+	/** Is file listening active */
 	boolean alreadyStarted = false;
 
-	/**Interval to read file contents*/
+	/** Interval to read file contents */
 	static final int POLL_INTERVAL = 1000; // 1 second
 
-	/**Epocwind.out file size*/
+	/** Epocwind.out file size */
 	long fileSize = -1;
 
 	/**
-	 * How many characters we have read
-	 * We can assume that long is big enough to store character count
-	 * because max size of long is 9223372036854775807l
+	 * How many characters we have read We can assume that long is big enough to
+	 * store character count because max size of long is 9223372036854775807l
 	 */
 	long readCharacters = 0;
 
-	/**Project reference*/
+	/** Project reference */
 	IProject project;
 
-	/**Parent class reference*/
+	/** Parent class reference */
 	MainView main;
 
-	/**Flag to determinate do we still need to read changes from epocwind.out file*/
+	/**
+	 * Flag to determinate do we still need to read changes from epocwind.out
+	 * file
+	 */
 	boolean stillRun = true;
 
 	/**
 	 * Constructor
-	 * @param projectRef Project reference
-	 * @param parentClass Parent class reference
+	 * 
+	 * @param projectRef
+	 *            Project reference
+	 * @param parentClass
+	 *            Parent class reference
 	 */
-	public EpocReader(IProject projectRef, MainView parentClass)
-	{
+	public EpocReader(IProject projectRef, MainView parentClass) {
 		super(Constants.OUTPUT_READER_TITLE);
-		emulatorFileLocation = System.getenv("TEMP") + File.separator+ "epocwind.out";
+		emulatorFileLocation = System.getenv("TEMP") + File.separator
+				+ "epocwind.out";
 		project = projectRef;
 		main = parentClass;
-
 	}
 
 	/**
 	 * Starts epocwind.out file reading
 	 */
-	public void start(){
+	public void start() {
 
-		//if we are already listening epocwindout file => no need create new job
-		if( alreadyStarted ) {
+		// if we are already listening epocwind.out file => no need create new
+		// job
+		if (alreadyStarted) {
 			return;
 		}
 
 		setPriority(Job.LONG);
 		setUser(false);
 
-		//start as soon as possible
+		// start as soon as possible
 		schedule();
 
-		//update listening flag
+		// update listening flag
 		alreadyStarted = true;
 
-		//open streams
-		main.parser.openStreams(Util.getBldInfFolder(
-				project, true));
+		// open streams
+		main.parser.openStreams(Util.getBldInfFolder(project, true));
 	}
 
-
 	/**
 	 * Stops listening emulator
 	 */
@@ -115,27 +119,25 @@
 		readCharacters = 0;
 		stillRun = false;
 		cancel();
-
 	}
 
-
 	/**
 	 * Reads the epocwind.out file if it has been changed since last time
 	 */
 	@Override
 	protected IStatus run(IProgressMonitor arg0) {
 
-		//stream which are used to read file content
+		// stream which are used to read file content
 		FileInputStream fis = null;
 		BufferedReader br = null;
 
-		//run while user stops the data capturing
-		while(stillRun) {
+		// run while user stops the data capturing
+		while (stillRun) {
 			try {
-				//create new file
+				// create new file
 				File epocFile = new File(emulatorFileLocation);
 
-				//if file exists
+				// if file exists
 				if (epocFile.exists()) {
 
 					// emulator output is not read
@@ -144,90 +146,98 @@
 					if (fileSize == -1) {
 						fileSize = epocFile.length();
 
-						//open epocwind.out file
+						// open epocwind.out file
 						fis = new FileInputStream(epocFile);
-						br = new BufferedReader(new InputStreamReader(fis, "UTF-8"));
+						br = new BufferedReader(new InputStreamReader(fis,
+								"UTF-8"));
 
-						//skip lines what we have already read
+						// skip lines what we have already read
 						br.skip(readCharacters);
 
 						String line = "";
 						// read all new lines of epocwind.out file
 						while ((line = br.readLine()) != null) {
-							//update read count
-							readCharacters+=line.length()+2; //<== line feed character
+							// update read count
+							readCharacters += line.length() + 2; // <== line
+							// feed
+							// character
 						}
-					// emulator output contains new/more information than what we are read
+						// emulator output contains new/more information than
+						// what we are read
 					} else if (epocFile.length() > fileSize) {
 
-						//open epocwind.out file
+						// open epocwind.out file
 						fis = new FileInputStream(epocFile);
-						br = new BufferedReader(new InputStreamReader(fis, "UTF-8"));
+						br = new BufferedReader(new InputStreamReader(fis,
+								"UTF-8"));
 
-						//skip lines what we have already read
+						// skip lines what we have already read
 						br.skip(readCharacters);
 
 						String line = "";
 						// read all new lines in epocwind.out
 						while ((line = br.readLine()) != null) {
-							//update read count
-							readCharacters+=line.length()+2; //<== line feed character
-
-							//transfer line to parser
-							main.parser.parse(line);
-
+							// update read count
+							readCharacters += line.length() + 2; // <== line
+							// feed
+							// character
+							// transfer line to parser
+							boolean success = main.parser.parse(line);
+							if (!success) {
+								main.stop(false);
+								return Status.OK_STATUS;
+							}
 						}
 
-						//update size
+						// update size
 						fileSize = epocFile.length();
 
-						//tell AT UI to update online allocation count value
+						// tell AT UI to update online allocation count value
 						main.updateAllocNumber();
-					}else if (epocFile.length() < fileSize){
+					} else if (epocFile.length() < fileSize) {
 						fileSize = 0;
 						readCharacters = 0;
 					}
 				}
-				if( br != null ) {
+				if (br != null) {
 					br.close();
 					br = null;
 				}
 
-				if( fis != null ) {
+				if (fis != null) {
 					fis.close();
 					fis = null;
 				}
 
-				//sleep this thread
+				// sleep this thread
 				Thread.sleep(POLL_INTERVAL);
 			} catch (InterruptedException ie) {
-				//we can shallow the exception
-				//because when this exception is raised we can exit
+				// we can shallow the exception
+				// because when this exception is raised we can exit
 				cancel();
 			} catch (Exception e) {
 				e.printStackTrace();
 				cancel();
-			}
-			finally{
-				try{
-					if(br != null ) {
+			} finally {
+				try {
+					if (br != null) {
 						br.close();
 					}
-				}catch(IOException ioe ) {
+				} catch (IOException ioe) {
 					ioe.printStackTrace();
 				}
 
-				try{
-					if(fis != null ) {
+				try {
+					if (fis != null) {
 						fis.close();
 					}
-				}catch(IOException ioe ) {
+				} catch (IOException ioe) {
 					ioe.printStackTrace();
 				}
 			}
 		}
 
-		//parsing is finished
+		// parsing is finished
 		return Status.OK_STATUS;
 	}
 }
--- a/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/engine/ICallstackManager.java	Tue Aug 24 12:10:03 2010 +0300
+++ b/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/engine/ICallstackManager.java	Tue Aug 24 12:16:27 2010 +0300
@@ -23,25 +23,31 @@
 import com.nokia.s60tools.analyzetool.engine.statistic.BaseInfo;
 
 /**
- * Interface for access to callstack. This allows the transparent use of either the old-style saving
- * of callstacks in BaseInfo, or the newer deferred reading of callstacks.
+ * Interface for access to callstack. This allows the transparent use of either
+ * the old-style saving of callstacks in BaseInfo, or the newer deferred reading
+ * of callstacks.
  */
 public interface ICallstackManager {
-	
+
 	/**
-	 * Returns the callstack for the given BaseInfo. Note, this should not return null
-	 * if hasCallstack() returns true.
-	 * @param baseInfo  the BaseInfo to use
+	 * Returns the callstack for the given BaseInfo. Note, this should not
+	 * return null if hasCallstack() returns true.
+	 * 
+	 * @param baseInfo
+	 *            the BaseInfo to use
 	 * @return the callstack for the given BaseInfo
-	 * @throws IOException when problems accessing the .dat file for callstacks
+	 * @throws IOException
+	 *             when problems accessing the .dat file for callstacks
 	 */
-	public List<AllocCallstack> readCallstack(BaseInfo baseInfo) throws IOException;
+	public List<AllocCallstack> readCallstack(BaseInfo baseInfo)
+			throws IOException;
 
 	/**
 	 * Returns true if the given BaseInfo has a callstack, false otherwise
-	 * @param baseInfo the BaseInfo to use
+	 * 
+	 * @param baseInfo
+	 *            the BaseInfo to use
 	 * @return true if callstack present
 	 */
 	public boolean hasCallstack(BaseInfo baseInfo);
-
 }
--- a/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/engine/IMemoryActivityModel.java	Tue Aug 24 12:10:03 2010 +0300
+++ b/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/engine/IMemoryActivityModel.java	Tue Aug 24 12:16:27 2010 +0300
@@ -15,106 +15,121 @@
  *
  */
 package com.nokia.s60tools.analyzetool.engine;
+
 import java.util.AbstractList;
 
 import com.nokia.s60tools.analyzetool.engine.statistic.ProcessInfo;
 
-
 /**
  * Interface for the memory model of AnalyzeTool
  */
 public interface IMemoryActivityModel {
-	
+
 	/**
 	 * Sets the data to use. This will cause listeners to be notified.
-	 * @param processes The list of processes to set
+	 * 
+	 * @param processes
+	 *            The list of processes to set
 	 */
 	public void addProcesses(AbstractList<ProcessInfo> processes);
-	
+
 	/**
 	 * Sets the selected ProcessInfo
+	 * 
 	 * @param processInfo
 	 */
 	public void setSelectedProcess(ProcessInfo processInfo);
-	
+
 	/**
 	 * returns the last selected process
+	 * 
 	 * @return Selected process
 	 */
 	public ProcessInfo getSelectedProcess();
 
 	/**
 	 * Get the start time of the process that started first
+	 * 
 	 * @return time
 	 */
 	public Long getFirstProcessTime();
 
 	/**
 	 * Get end time of the process that ended last
+	 * 
 	 * @return Last process time
 	 */
 	public Long getLastProcessTime();
 
 	/**
 	 * Get time of the first memory operation
+	 * 
 	 * @return First memory operation time.
 	 */
 	public Long getFirstMemOpTime();
 
 	/**
 	 * Get last memory operation time from all processes
+	 * 
 	 * @return Last memory operation time.
 	 */
 	public Long getLastMemOpTime();
 
 	/**
 	 * get highest cumulated memory
+	 * 
 	 * @return size
 	 */
 	public int getHighestCumulatedMemoryAlloc();
 
 	/**
 	 * Get list of processes
+	 * 
 	 * @return processes list
 	 */
 	public AbstractList<ProcessInfo> getProcesses();
 
-	
 	/**
-	 * @param listener the listener to register
+	 * @param listener
+	 *            the listener to register
 	 */
 	void addListener(IMemoryActivityModelChangeListener listener);
-	
+
 	/**
-	 * @param listener the listener to remove
+	 * @param listener
+	 *            the listener to remove
 	 */
 	void removeListener(IMemoryActivityModelChangeListener listener);
-	
+
 	/**
 	 * Returns true if callstack reading from files is done on demand after the
 	 * initial parsing phase. This assumes file positions are available from
 	 * BaseInfo
+	 * 
 	 * @return true for deferred callstack reading, false otherwise
 	 */
 	public boolean isDeferredCallstackReading();
-	
+
 	/**
-	 * Indicates whether this model is reading callstacks on demand 
-	 * after the initial parsing phase has finished
+	 * Indicates whether this model is reading callstacks on demand after the
+	 * initial parsing phase has finished
+	 * 
 	 * @param value
 	 */
 	public void setDeferredCallstackReading(boolean value);
-	
+
 	/**
 	 * Setter for the ICallstackManager
-	 * @param callstackManager the CallstackManager to set
+	 * 
+	 * @param callstackManager
+	 *            the CallstackManager to set
 	 */
 	public void setCallstackManager(ICallstackManager callstackManager);
-	
+
 	/**
-	 * Getter for ICallstackManager. 
+	 * Getter for ICallstackManager.
+	 * 
 	 * @return CallstackManager
 	 */
 	public ICallstackManager getCallstackManager();
-		
 }
--- a/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/engine/IMemoryActivityModelChangeListener.java	Tue Aug 24 12:10:03 2010 +0300
+++ b/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/engine/IMemoryActivityModelChangeListener.java	Tue Aug 24 12:16:27 2010 +0300
@@ -23,17 +23,17 @@
  * A change listener for {@link IMemoryActivityModel}
  */
 public interface IMemoryActivityModelChangeListener {
-	
-	/** 
-	 * callback when data has been added to the model
-	 * and is ready to be used
+
+	/**
+	 * callback when data has been added to the model and is ready to be used
 	 */
 	public void onProcessesAdded();
-	
+
 	/**
 	 * callback when a process has been selected
-	 * @param processId The ProcessInfo of the newly selected process
+	 * 
+	 * @param processId
+	 *            The ProcessInfo of the newly selected process
 	 */
 	public void onProcessSelected(ProcessInfo processId);
-
 }
--- a/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/engine/ParseAnalyzeData.java	Tue Aug 24 12:10:03 2010 +0300
+++ b/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/engine/ParseAnalyzeData.java	Tue Aug 24 12:16:27 2010 +0300
@@ -21,8 +21,10 @@
 import java.io.FileNotFoundException;
 import java.io.FileOutputStream;
 import java.io.IOException;
+import java.text.MessageFormat;
 import java.util.AbstractList;
 import java.util.ArrayList;
+import java.util.Enumeration;
 import java.util.HashMap;
 import java.util.Hashtable;
 import java.util.Iterator;
@@ -30,6 +32,10 @@
 import java.util.Map.Entry;
 
 import org.eclipse.core.runtime.IStatus;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.PlatformUI;
 
 import com.nokia.s60tools.analyzetool.Activator;
 import com.nokia.s60tools.analyzetool.engine.statistic.AllocCallstack;
@@ -39,19 +45,20 @@
 import com.nokia.s60tools.analyzetool.engine.statistic.FreeInfo;
 import com.nokia.s60tools.analyzetool.engine.statistic.ProcessInfo;
 import com.nokia.s60tools.analyzetool.global.Constants;
+import com.nokia.s60tools.analyzetool.global.Util;
+import com.nokia.s60tools.analyzetool.ui.WarningDialogWithCheckbox;
 
 /**
- * Parses trace messages which comes thru TraceViewer.
- * If one message contains PCSS prefix the message will be saved to the data file. Data file will be saved
- * to the project [bld.inf location]\atool_temp folder.
- *
+ * Parses trace messages that come thru TraceViewer. If one message contains
+ * &ltAT&gt prefix, the message will be saved to the data file. Data file will
+ * be saved to the project [bld.inf location]\atool_temp folder.
+ * 
  * @author kihe
- *
+ * 
  */
 public class ParseAnalyzeData {
 
-	private static final String KEYWORD_ABNORMAL = "ABNORMAL";//$NON-NLS-1$
-	/** FileOutputStream . */
+	/** FileOutputStream. */
 	private FileOutputStream fis;
 
 	/** File. */
@@ -63,7 +70,6 @@
 	/** Contains information which processes are ended. */
 	private final AbstractList<Integer> processEnd;
 
-
 	/** Contains information of where to save trace data. */
 	private String usedFilePath;
 
@@ -71,69 +77,78 @@
 	public Hashtable<Integer, ProcessInfo> processes;
 
 	/**
-	 * Contains list of executed process. One process will begin in the
-	 * PROCESS_START and ends with the PROCESS_END tag
+	 * Contains list of executed process. One process begins with the PCS and
+	 * ends with the PCE tag.
 	 */
 	private final AbstractList<ProcessInfo> processList;
 
 	/**
-	 * Allocation cache
-	 * Used when one alloc info is separated to multiple lines.
+	 * Allocation cache used when one alloc info is separated to multiple lines.
 	 */
 	private Hashtable<Long, AllocInfo> allocCache = null;
-	
+
 	/**
-	 * For each memory operation, keeps count of how many 
-	 * callstacks are outstanding. This is used to clean up 
-	 * after all fragments have been processed.
-	 * 
-	 * Zero callstack counts should not be kept.
+	 * For each memory operation, keeps count of how many callstacks are
+	 * outstanding. This is used to clean up after all fragments have been
+	 * processed. Zero callstack counts should not be kept.
 	 */
 	private Map<BaseInfo, Integer> remainingCallstacksMap = null;
 
-
 	/**
-	 * Deallocation cache.
-	 * Used when one free info is separated to multiple lines.
+	 * Deallocation cache. Used when one free info is separated to multiple
+	 * lines.
 	 */
 	private Hashtable<Long, FreeInfo> freeCache = null;
-	
+
 	/**
-	 * Cache for dll loads.
-	 * We must find dll load item for every allocation callstack item.
-	 * This is heavy process and usually we must find more than thousand times.
-	 * So when using cache for found items => it makes finding process more rapid than without it.
+	 * Cache for dll loads. We must find dll load item for every allocation
+	 * callstack item. This is heavy process and usually we must find more than
+	 * thousand times. So when using cache for found items => it makes finding
+	 * process more rapid than without it.
 	 */
 	private Hashtable<Long, DllLoad> dllLoadCache = null;
 
-
 	/**
-	 * Flag to determinate need to save parsed data to file.
-	 * If this flag is set to "true" all the lines which contains PCSS are saved to the file.
+	 * Flag to determinate need to save parsed data to file. If this flag is set
+	 * to "true" all the lines which contains &ltAT&gt are saved to the file.
 	 * Otherwise just parse the file/trace content.
 	 */
 	boolean saveDataToFile;
 
 	boolean createGraphModel;
-	
-	/** When set to true, ignore any callstack information. Can be used decrease memory consumption of the model */
+
+	/**
+	 * When set to true, ignore any callstack information. Can be used decrease
+	 * memory consumption of the model
+	 */
 	boolean ignoreCallstacks;
-	
+
 	/** Callstacks will be read later on demand directly from file */
 	private boolean deferCallstacks;
-	/** file position showing current write position, this is saved in BaseInfo for deferred callstack reading */
+
+	/**
+	 * File position showing current write position, this is saved in BaseInfo
+	 * for deferred callstack reading
+	 */
 	private long filePos;
-	
-	long lastTime = 0;
+
 	private int lineBreakSize;
-	
-	
+
+	private int traceVersion = 0;
+
+	private boolean showUnknownTagDialog = true;
+	private boolean showAtoolBinariesVersionMismatchWarning = true;
+
+	private String deviceAtoolVersion = "";
+
+	long logTime;
+
 	/**
 	 * Constructor.
 	 * 
 	 * @param saveData
-	 *            if true, save PCSS statements to file. Typical use case is for
-	 *            TraceWrapper
+	 *            if true, save &ltAT&gt statements to file. Typical use case is
+	 *            for TraceWrapper
 	 * @param createModel
 	 *            boolean indicating whether to create a graph model. Used to
 	 *            improve performance.
@@ -142,17 +157,18 @@
 	 *            saving the file position during parse phase, so saveData must
 	 *            be true or use constructor with FileChannel.
 	 */
-	public ParseAnalyzeData(boolean saveData, boolean createModel, boolean deferCallstackReading) {
+	public ParseAnalyzeData(boolean saveData, boolean createModel,
+			boolean deferCallstackReading) {
 		this(saveData, createModel, deferCallstackReading, 0);
-	}	
-	
+	}
+
 	/**
-	 * Constructor. Use this constructor when working with deferred callstacks and not
-	 * saving an output file.
+	 * Constructor. Use this constructor when working with deferred callstacks
+	 * and not saving an output file.
 	 * 
 	 * @param saveData
-	 *            if true, save PCSS statements to file. Typical use case is for
-	 *            TraceWrapper
+	 *            if true, save &ltAT&gt statements to file. Typical use case is
+	 *            for TraceWrapper
 	 * @param createModel
 	 *            boolean indicating whether to create a graph model. Used to
 	 *            improve performance.
@@ -161,12 +177,15 @@
 	 *            saving the file position during parse phase, so saveData must
 	 *            be true or use constructor with FileChannel.
 	 * @param lineBreakSize
-	 *            Size of line break, usually 1 for device-side file, and 2 for host-side file
+	 *            Size of line break, usually 1 for device-side file, and 2 for
+	 *            host-side file
 	 */
-	public ParseAnalyzeData(boolean saveData, boolean createModel, boolean deferCallstackReading, int lineBreakSize) {
-		
-		if (deferCallstackReading && !saveData && lineBreakSize == 0){
-			throw new IllegalArgumentException("linebreak size must be specified when trying to use deferred callstack reading with a .dat input file ");
+	public ParseAnalyzeData(boolean saveData, boolean createModel,
+			boolean deferCallstackReading, int lineBreakSize) {
+
+		if (deferCallstackReading && !saveData && lineBreakSize == 0) {
+			throw new IllegalArgumentException(
+					"linebreak size must be specified when trying to use deferred callstack reading with a .dat input file ");
 		}
 
 		processStart = new Hashtable<String, Integer>();
@@ -174,28 +193,31 @@
 		processes = new Hashtable<Integer, ProcessInfo>();
 		processList = new ArrayList<ProcessInfo>();
 		saveDataToFile = saveData;
-		deferCallstacks = deferCallstackReading; //orig data input might be streamed through TraceWrapper
+		deferCallstacks = deferCallstackReading; // original data input might be
+		// streamed through
+		// TraceWrapper
 		createGraphModel = createModel;
-		ignoreCallstacks = !createGraphModel ; 
-		if (!ignoreCallstacks && !deferCallstacks){
+		ignoreCallstacks = !createGraphModel;
+		if (!ignoreCallstacks && !deferCallstacks) {
 			allocCache = new Hashtable<Long, AllocInfo>();
 			freeCache = new Hashtable<Long, FreeInfo>();
 			remainingCallstacksMap = new HashMap<BaseInfo, Integer>();
 			dllLoadCache = new Hashtable<Long, DllLoad>();
 		}
-		filePos = deferCallstacks ? 0 : -1;//set to beginning of file if applicable
+		filePos = deferCallstacks ? 0 : -1;// set to beginning of file if
+		// applicable
 		this.lineBreakSize = lineBreakSize;
 	}
-	
+
 	/**
 	 * Add one dllLoad object to process related list
-	 *
+	 * 
 	 * @param dllLoad
 	 *            One DllLoad
 	 */
 	private void addDllLoad(DllLoad dllLoad) {
-		// if one of the started process contains same process id what dll load
-		// has add dll load to list
+		// if one of the started process contains same process id what DLL load
+		// has add DLL load to list
 		if (processes.containsKey(dllLoad.getProcessID())) {
 			ProcessInfo tempProcessInfo = processes.get(dllLoad.getProcessID());
 			tempProcessInfo.addOneDllLoad(dllLoad);
@@ -204,39 +226,37 @@
 
 	/**
 	 * Add one memory allocation info to process related list
-	 *
+	 * 
 	 * @param info
 	 *            One memory allocation info
 	 */
 	private void addMemAddress(AllocInfo info) {
 		// if one of the started process contains same process id what memory
-		// allocation has add memory allocation info to list
+		// allocation has, add memory allocation info to list
 		if (processes.containsKey(info.getProcessID())) {
 			ProcessInfo tempProcessInfo = processes.get(info.getProcessID());
 			tempProcessInfo.addOneAlloc(info);
 		}
 	}
 
-
 	/**
-	 * Removes memory allocation from process related
-	 * memory allocations list.
-	 *
-	 * @param info Deallocation info
+	 * Removes memory allocation from process related memory allocations list.
+	 * 
+	 * @param info
+	 *            Deallocation info
 	 */
 	private void removeMemAddress(FreeInfo info) {
 		if (processes.containsKey(info.getProcessID())) {
 			ProcessInfo tempProcessInfo = processes.get(info.getProcessID());
 			tempProcessInfo.free(info);
 		}
+	}
 
-	}
 	/**
 	 * Closes the input stream if it is open.
 	 */
 	private final void closeStreams() {
 		try {
-
 			// if fis exists => close fis
 			if (fis != null) {
 				fis.close();
@@ -253,10 +273,9 @@
 
 	/**
 	 * Finish the writing.
-	 *
+	 * 
 	 */
 	public final void finish() {
-
 		try {
 			// if some data is not write to file yet => do it now
 			if (fis != null) {
@@ -265,7 +284,6 @@
 		} catch (IOException ioe) {
 			return;
 		} finally {
-
 			// close needed streams
 			closeStreams();
 		}
@@ -275,36 +293,37 @@
 		processes.clear();
 		processStart.clear();
 		processEnd.clear();
-		if (allocCache != null){
-			allocCache.clear();			
+		if (allocCache != null) {
+			allocCache.clear();
 		}
-		if (freeCache != null){
+		if (freeCache != null) {
 			freeCache.clear();
 		}
-		if (dllLoadCache != null){
-			dllLoadCache.clear();			
+		if (dllLoadCache != null) {
+			dllLoadCache.clear();
 		}
-		if (remainingCallstacksMap != null){
+		if (remainingCallstacksMap != null) {
 			remainingCallstacksMap.clear();
 		}
 	}
 
 	/**
 	 * Return memory allocation size for all started processes.
-	 *
+	 * 
 	 * @return Memory allocation size for all started processes
 	 */
 	public final int getAllocationsSize() {
 		int allocCnt = 0;
 		// get memory allocations count from ongoing processes
 		for (ProcessInfo p : processes.values()) {
-			//the current number of memory allocations is traced as potential memory leaks
+			// the current number of memory allocations is traced as potential
+			// memory leaks
 			allocCnt += p.getMemLeaksNumber();
 		}
-		
-		//get memory allocations count from already ended processes
+
+		// get memory allocations count from already ended processes
 		Iterator<ProcessInfo> iterPro = processList.iterator();
-		while( iterPro.hasNext() ) {
+		while (iterPro.hasNext()) {
 			ProcessInfo oneInfo = iterPro.next();
 			allocCnt += oneInfo.getMemLeaksNumber();
 		}
@@ -313,7 +332,7 @@
 
 	/**
 	 * Gets used data file name.
-	 *
+	 * 
 	 * @return Data file name
 	 */
 	public final String getDataFileName() {
@@ -323,7 +342,7 @@
 	/**
 	 * Checks given path if it is null set used path to point java temp
 	 * directory.
-	 *
+	 * 
 	 * @param path
 	 *            Given path
 	 * @return Data file location
@@ -341,7 +360,7 @@
 
 	/**
 	 * Gets started process info.
-	 *
+	 * 
 	 * @return Hashtable<String, String> Started processes info
 	 */
 	public final Hashtable<String, Integer> getStartedProcesses() {
@@ -353,7 +372,7 @@
 
 	/**
 	 * Returns stored statistic
-	 *
+	 * 
 	 * @return Stored statistic
 	 */
 	public AbstractList<ProcessInfo> getStatistic() {
@@ -362,10 +381,10 @@
 
 	/**
 	 * Opens the needed streams.
-	 *
+	 * 
 	 * @param filePath
 	 *            File name and path where to save trace data
-	 *
+	 * 
 	 * @return True if stream could be opened otherwise false
 	 */
 	public final boolean openStreams(final String filePath) {
@@ -396,75 +415,94 @@
 
 	/**
 	 * Executes parser.
-	 *
+	 * 
 	 * @param data
 	 *            File name to be used
 	 * @return true on success
 	 */
 	public final boolean parse(final String data) {
 
-		try{
+		try {
 			// if no data => leave
 			if (data == null) {
-				//although the data is null
-				//return true because false is returned only when
-				//some unexpected error occurs
+				// although the data is null
+				// return true because false is returned only when
+				// some error occurs
 				return true;
 			}
-			
-			
 
-			// if data must be saved to project group\atool_temp folder
-			if(saveDataToFile) {
-				// open needed streams
-				openStreams(usedFilePath);
+			if (data.contains(Constants.PREFIX_OLD)) {
+				Util.showMessageDialog(Constants.UNSUPPORTED_FORMAT_TITLE,
+						Constants.UNSUPPORTED_FORMAT_MESSAGE, SWT.ICON_ERROR);
+				return false;
 			}
 
-			// if data contains desired prefix => write data to file
-			boolean contains = data.contains(Constants.PREFIX);
+			// if data contains desired prefix
+			if (data.contains(Constants.PREFIX)) {
+
+				// parse line
+				parseLine(data);
+
+				if (!processStart.isEmpty()) {
+					if (traceVersion != 3) {
+						Util.showMessageDialog(
+								Constants.UNSUPPORTED_FORMAT_TITLE,
+								Constants.TRACE_FORMAT_VERSION_IS_HIGHER,
+								SWT.ICON_ERROR);
+						return false;
+					}
+				}
 
-			if (contains) {
-				writeDataToFile(data);
+				// if saveDataToFile flag is true => save data
+				if (saveDataToFile) {
+					if (fis == null) {
+
+						// streams not open => try to open
+						boolean returnValue = this.openStreams(usedFilePath);
+						if (!returnValue) {
+							return false;
+						}
+					}
+					// append line feed and write given data to file
+					String dataAndLineFeed = data + "\n";
+
+					// write data
+					fis.write(dataAndLineFeed.getBytes("UTF-8"));
+					filePos = deferCallstacks ? fis.getChannel().position()
+							: -1;
+				}
 			}
 
-			if (deferCallstacks && !saveDataToFile){
-				filePos += (data.length()+lineBreakSize);
+			if (deferCallstacks && !saveDataToFile) {
+				filePos += (data.length() + lineBreakSize);
 			}
 			return true;
-		}catch(OutOfMemoryError oome) {
+		} catch (OutOfMemoryError oome) {
 			return false;
-		}catch(Exception e) {
-			Activator.getDefault().log(IStatus.ERROR, "AnalyzeTool - parsing trace data", e);
+		} catch (Exception e) {
+			Activator.getDefault().log(IStatus.ERROR,
+					"AnalyzeTool - parsing trace data", e);
 			return false;
 		}
 	}
 
 	/**
-	 * Fills dll load item information. Check what data file version is used,
+	 * Fills DLL load item information. Check what data file version is used,
 	 * because data file format is changed.
 	 * 
 	 * @param dllLoad
-	 *            Dll load item
+	 *            DLL load item
 	 * @param splittedText
 	 *            One line of trace data file.
 	 */
 	private void fillDllLoadInfo(DllLoad dllLoad, String[] splittedText) {
 		int processID = dllLoad.getProcessID();
-		if(processes.containsKey(processID)) {
+		if (processes.containsKey(processID)) {
 			ProcessInfo processInfo = processes.get(processID);
 
-			//if data file contains also time stamp for dll load
-			//this information is added later than other information
-			//thats why we must check which version is used.
-			if( processInfo.getTraceDataVersion() > 1 && splittedText.length > 6 ) {
-				dllLoad.setLoadTime(splittedText[4]);
-				lastTime = dllLoad.getLoadTime();
-				dllLoad.setStartAddress(splittedText[5]);
-				dllLoad.setEndAddress(splittedText[6]);
-			}
-			else {
-				//load time note present - assume last available time (typically from an alloc or process start)
-				dllLoad.setLoadTime(lastTime);
+			if (splittedText.length > 5) {
+				dllLoad.setLoadTime(processInfo.getStartTime()
+						+ (logTime - processInfo.getLogTime()));
 				dllLoad.setStartAddress(splittedText[4]);
 				dllLoad.setEndAddress(splittedText[5]);
 			}
@@ -472,113 +510,76 @@
 	}
 
 	/**
-	 * Parses "FREE" tag information from the trace data file.
-	 *
-	 * Note! This tag is not used in current version,
-	 * this is support for older version of trace data files.
-	 * @param splitted One line content of trace file.
-	 */
-	private void parseFree(String[] splitted) {
-		
-		// check that there is enough data
-		// at least we need know to memory address 
-		// which is forth item of trace data
-		if( splitted.length > 3 ) {
-			String processID = splitted[1];
-			FreeInfo freeInfo = new FreeInfo(splitted[3]);
-			freeInfo.setProcessID(processID);
-			freeInfo.setFilePos(-1);//a free doesn't have a callstack
-			removeMemAddress(freeInfo);
-		}
-	}
-
-
-	/**
 	 * Parse dealloction header from the line
-	 * @param splitted Split trace message
+	 * 
+	 * @param splitted
+	 *            Split trace message
 	 */
 	private void parseFreeHeader(String[] splitted) {
-		//get free line info
+		// get free line info
 		String processID = splitted[1];
 		FreeInfo freeInfo = new FreeInfo(splitted[3]);
 		freeInfo.setProcessID(processID);
+		freeInfo.setThreadId(splitted[4]);
 		freeInfo.setFilePos(splitted.length > 6 ? filePos : -1);
-		
-		if( createGraphModel ) {
-		
-			int traceFileVersion = 1;
-			//get trace file version
-			if(processes.containsKey(freeInfo.getProcessID())) {
-				ProcessInfo processInfo = processes.get(freeInfo.getProcessID());
-				traceFileVersion = processInfo.getTraceDataVersion();
-			}
-			// how many callstack items
-			int callstackCount = 0;
 
-			// index where the callstack addresses begins
-			int startIndex = 5;
+		if (createGraphModel) {
+			ProcessInfo processInfo = processes.get(freeInfo.getProcessID());
+			freeInfo.setTime(processInfo.getStartTime()
+					+ (logTime - processInfo.getLogTime()));
+			int callstackCount = Integer.parseInt(splitted[5], 16);
 
-			//if using the new trace file format
-			if( traceFileVersion > 1 ) {
-				freeInfo.setTime(splitted[4]);
-				lastTime = freeInfo.getTime();
-				callstackCount = Integer.parseInt(splitted[5], 16);
-				startIndex = 6;
-			}
-			else {
-				callstackCount = Integer.parseInt(splitted[4], 16);
-			}
+			if (!ignoreCallstacks && !deferCallstacks) {
+				AbstractList<AllocCallstack> callstack = new ArrayList<AllocCallstack>();
+				createCallstack(splitted, freeInfo.getProcessID(), callstack,
+						6, freeInfo.getTime());
+				freeInfo.addCallstack(callstack);
 
-			if (!ignoreCallstacks && !deferCallstacks){
-				AbstractList<AllocCallstack> callstack = new ArrayList<AllocCallstack>();
-				createCallstack(splitted, freeInfo.getProcessID(), callstack, startIndex, lastTime);
-				freeInfo.addCallstack(callstack);
-				
-				//if this free item contains fragments
-				//so we must store this info to cache
-				//and rest of the callstack items later
-				if( callstackCount > (splitted.length-startIndex) ) {
+				// if this free item contains fragments
+				// so we must store this info to cache
+				// and rest of the callstack items later
+				if (callstackCount > (splitted.length - 6)) {
 					freeCache.put(freeInfo.getMemoryAddress(), freeInfo);
-					//expect fragments
-					remainingCallstacksMap.put(freeInfo, callstackCount - callstack.size());
-				}				
+					// expect fragments
+					remainingCallstacksMap.put(freeInfo, callstackCount
+							- callstack.size());
+				}
 			}
 		}
-		
 		removeMemAddress(freeInfo);
-
-		
 	}
 
-
 	/**
 	 * Parse dealloction fragment from the line
-	 * @param splitted Split trace message
+	 * 
+	 * @param splitted
+	 *            Split trace message
 	 */
-	private void parseFreeFragment(String[] splitted)
-	{
-		if( createGraphModel ) {
+	private void parseFreeFragment(String[] splitted) {
+		if (createGraphModel) {
 			String procId = splitted[1];
-			int processId = Integer.parseInt(procId,16);
+			int processId = Integer.parseInt(procId, 16);
 			if (processes.containsKey(processId)) {
+				ProcessInfo processInfo = processes.get(processId);
 				String memAddr = splitted[3];
-				Long memoryAddress =Long.parseLong(memAddr, 16);
-				Long time = Long.parseLong(splitted[4],16);
-				lastTime = time;
-				String packetNumber = splitted[5];
+				Long memoryAddress = Long.parseLong(memAddr, 16);
+				Long time = processInfo.getStartTime()
+						+ (logTime - processInfo.getLogTime());
+				String packetNumber = splitted[4];
 
-				//if cache contains corresponding free info
+				// if cache contains corresponding free info
 				if (freeCache.containsKey(memoryAddress)) {
 					FreeInfo info = freeCache.get(memoryAddress);
-					if (info.getMemoryAddress() == memoryAddress && info.getTime() == time ) {
+					if (info.getMemoryAddress() == memoryAddress
+							&& info.getTime() == time) {
 						AbstractList<AllocCallstack> callstack = new ArrayList<AllocCallstack>();
-						createCallstack(splitted, processId, callstack, 6, time);
+						createCallstack(splitted, processId, callstack, 5, time);
 						info.updateFragment(callstack, packetNumber);
 
 						int callstackCount = callstack.size();
 						int remaining = remainingCallstacksMap.get(info);
 						remaining -= callstackCount;
-						if (remaining <= 0){
+						if (remaining <= 0) {
 							remainingCallstacksMap.remove(info);
 							freeCache.remove(info);
 							info.finaliseCallstack();
@@ -586,52 +587,44 @@
 							remainingCallstacksMap.put(info, remaining);
 						}
 					}
-					
 				}
 			}
 		}
 	}
-	
+
 	/**
-	 * Mark dll as unloaded
-	 * This provides functionality for dynamically loaded dll loads
-	 * @param lineFragments elements of text to parse for unloading dll
+	 * Mark DLL as unloaded This provides functionality for dynamically loaded
+	 * DLL loads
+	 * 
+	 * @param lineFragments
+	 *            elements of text to parse for unloading dll
 	 */
-	private void unloadDll(String[] lineFragments)
-	{
+	private void unloadDll(String[] lineFragments) {
 		int processID = Integer.parseInt(lineFragments[1], 16);
-		
-		if(processes.containsKey(processID)) {
+
+		if (processes.containsKey(processID)) {
 			ProcessInfo processInfo = processes.get(processID);
 			String dllName = lineFragments[3];
 
-			//timestamp only exists for more recent trace versions
-			long dllUnloadTime;
-			long startAddr;
-			long endAddr;
-			
-			if( processInfo.getTraceDataVersion() > 1 && lineFragments.length > 6 ) {
-				dllUnloadTime = Long.parseLong(lineFragments[4], 16);
-				lastTime = dllUnloadTime;
-				startAddr = Long.parseLong(lineFragments[5], 16);
-				endAddr = Long.parseLong(lineFragments[6], 16);
+			DllLoad dll = null;
+
+			if (lineFragments.length > 5) {
+				long dllUnloadTime = processInfo.getStartTime()
+						+ (logTime - processInfo.getLogTime());
+				long startAddr = Long.parseLong(lineFragments[4], 16);
+				long endAddr = Long.parseLong(lineFragments[5], 16);
+
+				dll = processInfo.unloadOneDll(dllName, startAddr, endAddr,
+						dllUnloadTime);
 			}
-			else {
-				//load time note present - assume last available time (typically from an alloc or process start)
-				dllUnloadTime = lastTime;
-				startAddr = Long.parseLong(lineFragments[4], 16);
-				endAddr = Long.parseLong(lineFragments[5], 16);
-			}
-			
-			ProcessInfo p = processes.get(processID);
-			DllLoad dll = p.unloadOneDll(dllName, startAddr, endAddr, dllUnloadTime);
-			
-			//remove found dll load item from cache
-			if (!ignoreCallstacks && !deferCallstacks && dll != null){
+
+			// remove found DLL load item from cache
+			if (!ignoreCallstacks && !deferCallstacks && dll != null) {
 				for (Entry<Long, DllLoad> entry : dllLoadCache.entrySet()) {
-					if (entry.getValue().equals(dll)){
+					if (entry.getValue().equals(dll)) {
 						dllLoadCache.remove(entry.getKey());
-						System.out.println("dllLoadCache.removedEntry for"+dll.getName());
+						System.out.println("dllLoadCache.removedEntry for"
+								+ dll.getName());
 					}
 				}
 			}
@@ -640,10 +633,11 @@
 
 	/**
 	 * Parse allocation header info from the line
-	 * @param splitted Split trace message
+	 * 
+	 * @param splitted
+	 *            Split trace message
 	 */
-	private void parseAllocHeader(String[] splitted)
-	{
+	private void parseAllocHeader(String[] splitted) {
 		try {
 			String procID = splitted[1];
 			int processID = Integer.parseInt(procID, 16);
@@ -651,25 +645,30 @@
 				AllocInfo oneAlloc = new AllocInfo(splitted[3]);
 				oneAlloc.setProcessID(procID);
 				oneAlloc.setFilePos(splitted.length > 6 ? filePos : -1);
-				if( createGraphModel ) {
-					oneAlloc.setTime(splitted[4]);
-					lastTime = oneAlloc.getTime();
-					
-					oneAlloc.setSizeInt(Integer.parseInt(splitted[5], 16));
+				if (createGraphModel) {
+					ProcessInfo processInfo = processes.get(processID);
+					oneAlloc.setTime(processInfo.getStartTime()
+							+ (logTime - processInfo.getLogTime()));
+					oneAlloc.setSizeInt(Integer.parseInt(splitted[4], 16));
+					oneAlloc.setThreadId(splitted[5]);
+
 					// if one trace message contains callstack
-					if (!ignoreCallstacks && !deferCallstacks && splitted.length > 6) {
-						
+					if (!ignoreCallstacks && !deferCallstacks
+							&& splitted.length > 6) {
+
 						int callstackSize = Integer.parseInt(splitted[6], 16);
 
 						AbstractList<AllocCallstack> callstack = new ArrayList<AllocCallstack>();
-						createCallstack(splitted, processID, callstack, 7, oneAlloc.getTime());
+						createCallstack(splitted, processID, callstack, 7,
+								oneAlloc.getTime());
 						oneAlloc.addCallstack(callstack);
-						
+
 						callstackSize -= callstack.size();
-						if (callstackSize > 0){
-							//expect fragments
+						if (callstackSize > 0) {
+							// expect fragments
 							remainingCallstacksMap.put(oneAlloc, callstackSize);
-							allocCache.put(oneAlloc.getMemoryAddress(), oneAlloc);
+							allocCache.put(oneAlloc.getMemoryAddress(),
+									oneAlloc);
 						}
 					}
 				}
@@ -678,36 +677,38 @@
 		} catch (NumberFormatException nfe) {
 			nfe.printStackTrace();
 		}
-
 	}
 
 	/**
 	 * Parse allocation fragment from the line
 	 * 
-	 * @param splitted Split trace message
+	 * @param splitted
+	 *            Split trace message
 	 */
 	private void parseAllocFragment(String[] splitted) {
-		if( createGraphModel ) {
+		if (createGraphModel) {
 			String procId = splitted[1];
 			int processId = Integer.parseInt(procId, 16);
 			if (processes.containsKey(processId)) {
+				ProcessInfo processInfo = processes.get(processId);
 				String memAddr = splitted[3];
-				long memoryAddress = Long.parseLong(memAddr,16);
-				long time = Long.parseLong(splitted[4],16);
-				lastTime = time;
-				String packetNumber = splitted[5];
+				long memoryAddress = Long.parseLong(memAddr, 16);
+				long time = processInfo.getStartTime()
+						+ (logTime - processInfo.getLogTime());
+				String packetNumber = splitted[4];
 
 				if (allocCache.containsKey(memoryAddress)) {
 					AllocInfo info = allocCache.get(memoryAddress);
-					if (info.getMemoryAddress() == memoryAddress && info.getTime() == time) {
+					if (info.getMemoryAddress() == memoryAddress
+							&& info.getTime() == time) {
 						AbstractList<AllocCallstack> callstack = new ArrayList<AllocCallstack>();
-						createCallstack(splitted, processId, callstack, 6, time);
+						createCallstack(splitted, processId, callstack, 5, time);
 						info.updateFragment(callstack, packetNumber);
-						
+
 						int callstackCount = callstack.size();
 						int remaining = remainingCallstacksMap.get(info);
 						remaining -= callstackCount;
-						if (remaining <= 0){
+						if (remaining <= 0) {
 							remainingCallstacksMap.remove(info);
 							info.finaliseCallstack();
 							allocCache.remove(info);
@@ -732,70 +733,31 @@
 	 * @param startIndex
 	 *            Index where to start parse callstack values
 	 */
-	private void createCallstack(String[] splitted, int processId, AbstractList<AllocCallstack> callstack, int startIndex, long time) {
+	private void createCallstack(String[] splitted, int processId,
+			AbstractList<AllocCallstack> callstack, int startIndex, long time) {
 		// append whole callstack as a one memory address
 		for (int i = startIndex; i < splitted.length; i++) {
-			try{
-				AllocCallstack allocCAll = new AllocCallstack(splitted[i]);
+			try {
+				AllocCallstack allocCallstack = new AllocCallstack(splitted[i]);
 
 				// define dll load for current alloc
-				DllLoad dllLoad = getDllLoadName(processId, Long.parseLong(splitted[i],16), time);
-				if( dllLoad != null ) {
-					allocCAll.setDllLoad(dllLoad);
-					callstack.add(allocCAll);	
+				DllLoad dllLoad = getDllLoadName(processId, Long.parseLong(
+						splitted[i], 16), time);
+				if (dllLoad != null) {
+					allocCallstack.setDllLoad(dllLoad);
+					callstack.add(allocCallstack);
 				}
-			} catch(NumberFormatException nfe) {
-				//no nothing by design
-				
-			} catch( Exception e ) {
-				//no nothing by design
+			} catch (NumberFormatException nfe) {
+				// nothing by design
+			} catch (Exception e) {
+				// nothing by design
 			}
-			
 		}
 	}
 
 	/**
-	 * Parses memory address from the one trace message line. Parses one trace
-	 * message whole callstack to one memory address. This memory address is
-	 * used to calculate most used memory allocation location.
-	 * 
-	 * @param splitted Split trace message
-	 */
-	private void parseMemAddressesFromLine(String[] splitted) {
-
-		String processID = splitted[1];
-		if (processes.containsKey(processID)) {
-			AllocInfo oneAlloc = new AllocInfo(splitted[3]);
-			oneAlloc.setProcessID(processID);
-			oneAlloc.setFilePos(splitted.length > 5 ? filePos : -1);
-			oneAlloc.setTime(splitted[4]);
-			lastTime = oneAlloc.getTime();
-			oneAlloc.setSizeInt(Integer.parseInt(splitted[5], 16));
-
-			// if one trace message contains callstack
-			if (!ignoreCallstacks && !deferCallstacks && splitted.length > 5) {
-				AbstractList<AllocCallstack> callstack = new ArrayList<AllocCallstack>();
-				// append whole callstack as a one memory address
-				for (int i = 6; i < splitted.length; i++) {
-					AllocCallstack allocCAll = new AllocCallstack(splitted[i]);
-
-					// define dll load for current alloc
-					DllLoad dllLoad = getDllLoadName(oneAlloc.getProcessID(), allocCAll.getMemoryAddress(), lastTime);
-					if (dllLoad != null) {
-						allocCAll.setDllLoad(dllLoad);
-					}
-
-					callstack.add(allocCAll);
-				}
-				oneAlloc.addCallstack(callstack);
-			}
-			addMemAddress(oneAlloc);
-		}
-	}
-
-	/**
-	 * Returns dll load item for the memory address. Checks that entered memory
-	 * address is dll load memory area
+	 * Returns DLL load item for the memory address. Checks that entered memory
+	 * address is DLL load memory area
 	 * 
 	 * @param processId
 	 *            Process id
@@ -811,11 +773,14 @@
 				return dllLoadCache.get(memoryAddress);
 			}
 
-			// no item found in the cache loop thru the loaded dlls
-			ProcessInfo p = processes.get(processId);
+			// no item found in the cache loop thru the loaded DLLs
+			ProcessInfo processInfo = processes.get(processId);
 
-			for (DllLoad oneLoad : p.getDllLoads()) {
-				if (memoryAddress >= oneLoad.getStartAddress() && memoryAddress <= oneLoad.getEndAddress() && time >= oneLoad.getLoadTime() && time <= oneLoad.getUnloadTime()) {
+			for (DllLoad oneLoad : processInfo.getDllLoads()) {
+				if (memoryAddress >= oneLoad.getStartAddress()
+						&& memoryAddress <= oneLoad.getEndAddress()
+						&& time >= oneLoad.getLoadTime()
+						&& time <= oneLoad.getUnloadTime()) {
 					// dll load found => save it to cache and return it
 					dllLoadCache.put(memoryAddress, oneLoad);
 					return oneLoad;
@@ -826,69 +791,78 @@
 	}
 
 	/**
-	 * process the line: switch on the event type and fill the model
+	 * Process the line: switch on the event type and fill the model.
 	 * 
 	 * @param aLine
-	 *            One debug print
+	 *            one debug print
 	 */
 	private final void parseLine(final String aLine) {
 
 		try {
 			// parse switch
-			int index = aLine.indexOf(Constants.PREFIX); // lines should be preceded
-			// with PCSS
-			String usedString = null;
+			int index = aLine.indexOf(Constants.PREFIX); // lines should be
+			// preceded by <AT>
+
+			String time = aLine.substring(0, index).trim();
 
-			if (index == -1 || index == 0) {
-				usedString = aLine;
-			} else {
-				usedString = aLine.substring(index, aLine.length());
+			if (createGraphModel) {
+				logTime = Long.parseLong(time, 16);
 			}
 
+			String usedString = aLine.substring(index, aLine.length());
+
 			String[] lineFragments = usedString.split(" ");
 
 			// determine the memory operation/event
 			String event = null;
 			if (lineFragments.length >= 3) {
-				event = lineFragments[2];
+				if (lineFragments[1].equals(Constants.DEVINFO)) {
+					event = lineFragments[1];
+				} else {
+					event = lineFragments[2];
+				}
 			}
 
 			DllLoad dllLoad = null;
 
 			switch (Constants.Operation.toOperation(event)) {
-			case PROCESS_START:
-				// process PROCESS_START
-				parseProcessStarted(lineFragments);
-				break;
-			case PROCESS_END:
-				// process PROCESS_END
-				parseProcessEnded(lineFragments);
+			case PCS:
+				// process start
+				parseProcessStart(lineFragments);
 				break;
-			case ALLOC:
-				// process ALLOC
-				parseMemAddressesFromLine(lineFragments);
+			case PCE:
+				// process end
+				parseProcessEnd(lineFragments);
 				break;
-			case FREE:
-				parseFree(lineFragments);
-				break;
-			case ALLOCH:
+			case ALH:
+				// allocation header
 				parseAllocHeader(lineFragments);
 				break;
-			case FREEH:
-				parseFreeHeader(lineFragments);
-				break;
-			case ALLOCF:
-				if (!ignoreCallstacks && !deferCallstacks){
-					parseAllocFragment(lineFragments);				
+			case ALF:
+				// allocation fragment
+				if (!ignoreCallstacks && !deferCallstacks) {
+					parseAllocFragment(lineFragments);
 				}
 				break;
-			case FREEF:
-				if (!ignoreCallstacks && !deferCallstacks){
-					parseFreeFragment(lineFragments);				
+			case FRH:
+				// free header
+				parseFreeHeader(lineFragments);
+				break;
+			case FRF:
+				// free fragment
+				if (!ignoreCallstacks && !deferCallstacks) {
+					parseFreeFragment(lineFragments);
 				}
 				break;
-			case DLL_LOAD:
-				if(createGraphModel && !ignoreCallstacks) {
+			case RAH:
+				// reallocation header (not yet implemented)
+				break;
+			case RAF:
+				// reallocation fragment (not yet implemented)
+				break;
+			case DLL:
+				// DLL load
+				if (createGraphModel && !ignoreCallstacks) {
 					dllLoad = new DllLoad();
 					dllLoad.setProcessID(lineFragments[1]);
 					dllLoad.setName(lineFragments[3]);
@@ -896,27 +870,70 @@
 					addDllLoad(dllLoad);
 				}
 				break;
-			case DLL_UNLOAD:
-				if(createGraphModel && !ignoreCallstacks) {
+			case DLU:
+				// DLL unload
+				if (createGraphModel && !ignoreCallstacks) {
 					unloadDll(lineFragments);
 				}
 				break;
+			case TDS:
+				// thread start
+				break;
+			case TDE:
+				// thread end
+				break;
+			case VER:
+				// version
+				break;
+			case TSS:
+				// subtest start
+				break;
+			case TSE:
+				// subtest end
+				break;
+			case DEVINFO:
+				// device info
+				break;
 			default:
-				// ignore this line
+				if (showUnknownTagDialog) {
+					final String unknownTag = event;
+					PlatformUI.getWorkbench().getDisplay().asyncExec(
+							new Runnable() {
+								public void run() {
+									WarningDialogWithCheckbox dialog = new WarningDialogWithCheckbox(
+											new Shell(), unknownTag);
+									int ret = dialog.open();
+									if (ret == Dialog.OK
+											|| ret == Dialog.CANCEL) {
+										if (dialog.dontShow())
+											showUnknownTagDialog = false;
+
+										synchronized (ParseAnalyzeData.this) {
+											ParseAnalyzeData.this.notify();
+										}
+									}
+								}
+							});
+
+					synchronized (this) {
+						this.wait();
+					}
+				}
 				break;
 			}
-			
-		}catch(Exception e) {
-			Activator.getDefault().log(IStatus.ERROR, "Error while parsing data", e);
+		} catch (Exception e) {
+			Activator.getDefault().log(IStatus.ERROR,
+					"Error while parsing data", e);
 		}
-		
 	}
 
 	/**
-	 * Processing PROCESS_END tag
-	 * @param lineFragments String[] containing split PROCESS_END tag line
+	 * Processing PCE tag
+	 * 
+	 * @param lineFragments
+	 *            String[] containing split PCE tag line
 	 */
-	private void parseProcessEnded(String[] lineFragments) {
+	private void parseProcessEnd(String[] lineFragments) {
 
 		// process id
 		String procId = null;
@@ -925,88 +942,95 @@
 		if (lineFragments.length >= 2) {
 			procId = lineFragments[1];
 		}
-		
+
 		int processId = Integer.parseInt(procId, 16);
+
 		if (processes.containsKey(processId)) {
-			if( lineFragments.length > 4 ){
-				//check is ABNORMAL process end and that there are enough data to parse
-				ProcessInfo p = processes.get(processId); 
-				if( lineFragments[4].equals(KEYWORD_ABNORMAL) && lineFragments.length > 5 ) {
-					p.setEndTime(lineFragments[5]);	
-				}
-				else {
-					p.setEndTime(lineFragments[4]);
-				}	
-				lastTime = p.getEndTime();
+			ProcessInfo processInfo = processes.get(processId);
+
+			if (createGraphModel) {
+				processInfo.setEndTime(processInfo.getStartTime()
+						+ (logTime - processInfo.getLogTime()));
 			}
-			
 
 			// store process id and process name
 			this.processEnd.add(processId);
 
 			if (processStart.containsValue(processId)) {
-				for (java.util.Enumeration<String> e = processStart.keys(); e.hasMoreElements();) {
+				for (Enumeration<String> e = processStart.keys(); e
+						.hasMoreElements();) {
 					Object key = e.nextElement();
 					Object value = processStart.get(key);
 					if (value.equals(processId)) {
 						processStart.remove(key);
 					}
-
 				}
 			}
 
-			// PROCESS_END tag reached
-			// check that started processes contains this process id.
-			ProcessInfo info = processes.get(processId);
-
 			// process found from the started processes list
 			// add it to list
-			if (info != null) {
+			if (processInfo != null) {
 				addProcessInfoToList(processes.get(processId));
 			}
 
 			// remove process id from processes list
 			processes.remove(processId);
 
-			// clear the founded dll load items list
-			// this prevent that results between runs do not mixed up
-			if (dllLoadCache != null){
-				dllLoadCache.clear();				
+			// clear found DLL load items list, this prevents that results
+			// between runs do not mixed up
+			if (dllLoadCache != null) {
+				dllLoadCache.clear();
 			}
 		}
 	}
 
 	/**
-	 * Processing PROCESS_START tag
-	 * @param lineFragments String[] containing split PROCESS_START tag line
+	 * Processing PCS tag
+	 * 
+	 * @param lineFragments
+	 *            String[] containing split PCS tag line
 	 */
-	private void parseProcessStarted(String[] lineFragments) {
-
-		String procId = lineFragments[1];
-		int processId = Integer.parseInt(procId, 16);
+	private void parseProcessStart(String[] lineFragments) {
 
 		ProcessInfo processInfo = new ProcessInfo();
-		processInfo.setProcessID(processId);
 
-		if (lineFragments.length >= 4) {
+		if (lineFragments.length > 8) {
+			// set trace data version number
+			processInfo.setTraceDataVersion(lineFragments[7]);
+			traceVersion = processInfo.getTraceDataVersion();
+
+			int processId = Integer.parseInt(lineFragments[1], 16);
+			processInfo.setProcessID(processId);
+
 			processInfo.setProcessName(lineFragments[3]);
-		}
-
-		if (lineFragments.length > 5) {
 			processInfo.setStartTime(lineFragments[5]);
-			lastTime = processInfo.getStartTime();
-		}
+			deviceAtoolVersion = lineFragments[8];
 
-		// set trace data version number
-		// this information is used later when parsing e.g. one allocation
-		// information
-		if (lineFragments.length > 7) {
-			processInfo.setTraceDataVersion(lineFragments[7]);
-		}
+			if (!createGraphModel) {
+				String carbideAtoolVersion = Util.getAtoolVersionNumber(Util
+						.getAtoolInstallFolder());
+				if (showAtoolBinariesVersionMismatchWarning) {
+					if (!deviceAtoolVersion.equals(carbideAtoolVersion)) {
+						Util
+								.showMessageDialog(
+										Constants.CLE_VERSION_MISMATCH,
+										MessageFormat
+												.format(
+														Constants.AT_BINARIES_VERSION_MISMATCH,
+														deviceAtoolVersion,
+														carbideAtoolVersion),
+										SWT.ICON_WARNING);
+						showAtoolBinariesVersionMismatchWarning = false;
+					}
+				}
+			}
 
-		// store process id and process name
-		if( lineFragments.length > 3 ) {
-			this.processStart.put(lineFragments[3], processId);
+			if (createGraphModel) {
+				processInfo.setLogTime(logTime);
+			}
+
+			// store process id and process name
+			processStart.put(lineFragments[3], processId);
 			processes.put(processId, processInfo);
 		}
 	}
@@ -1024,7 +1048,8 @@
 		}
 		for (int i = 0; i < processList.size(); i++) {
 			ProcessInfo tempInfo = processList.get(i);
-			if( info.getStartTime() != null && info.getStartTime() < tempInfo.getStartTime() ){
+			if (info.getStartTime() != null
+					&& info.getStartTime() < tempInfo.getStartTime()) {
 				processList.add(i, info);
 				return;
 			}
@@ -1033,49 +1058,12 @@
 	}
 
 	/**
-	 * Writes data to file if line contains wanted data.
+	 * Returns true if callstack reading from file is done on demand; false if
+	 * callstacks are made available during parsing phase.
 	 * 
-	 * @param data
-	 *            Data to write
-	 */
-	private void writeDataToFile(String data) {
-		try {
-
-			// check if data contains PROCESS_START or PROCESS_END tag
-			parseLine(data);
-
-			// if saveDataToFile flag is true => save data
-			if (saveDataToFile) {
-
-				if (fis == null) {
-
-					// streams not open => try to open
-					boolean returnValue = this.openStreams(usedFilePath);
-					if (!returnValue) {
-						return;
-					}
-				}
-
-				// append line feed and write given data to file
-				String dataAndLineFeed = data + "\n";
-
-				// write data
-				fis.write(dataAndLineFeed.getBytes("UTF-8"));
-				filePos = deferCallstacks ? fis.getChannel().position() : -1;
-			}
-
-		} catch (IOException ioe) {
-			return;
-		}
-	}
-	
-	/**
-	 * Returns true if callstack reading from file is done
-	 * on demand; false if callstacks are made available during parsing
-	 * phase.
 	 * @return true for deferred callstack reading
 	 */
-	public boolean hasDeferredCallstacks(){
+	public boolean hasDeferredCallstacks() {
 		return deferCallstacks;
 	}
 }
--- a/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/engine/ParseXMLFileSAX.java	Tue Aug 24 12:10:03 2010 +0300
+++ b/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/engine/ParseXMLFileSAX.java	Tue Aug 24 12:16:27 2010 +0300
@@ -37,9 +37,9 @@
  * Parses atool.exe generated xml file and creates memory analysis results.
  * Using the SAX parser to parse xml file. SAX parser fits better than DOM
  * parser because it is possible that AT must handle very big xml files.
- *
+ * 
  * @author kihe
- *
+ * 
  */
 public class ParseXMLFileSAX implements org.xml.sax.ContentHandler {
 	/** XML constants. */
@@ -69,19 +69,19 @@
 	public static final String XML_TIME = "time";
 	public static final String XML_UNKNOWN = "???";
 
-	/**Active call stack item id*/
+	/** Active call stack item id */
 	private int activeCallstackID = 1;
 
 	/** Active item(memory leak) information */
 	private AnalysisItem activeItem;
 
-	/**Active item(memory leak) id*/
+	/** Active item(memory leak) id */
 	private int activeItemID = 1;
 
-	/** Summary field active module memory leak count*/
+	/** Summary field active module memory leak count */
 	private String activeModuleCount;
 
-	/** Summary field active module name*/
+	/** Summary field active module name */
 	private String activeModuleName;
 
 	/** Active run information */
@@ -93,7 +93,7 @@
 	/** Active subtest item information */
 	private Subtest activeSubtest;
 
-	/**Active subtest id*/
+	/** Active subtest id */
 	private int activeSubtestID = 1;
 
 	/** Active callstack item information */
@@ -102,20 +102,21 @@
 	/** xml file path. */
 	private final String filePath;
 
-	/** 
-	 * Flag to demonstrate that is the memory leak summary parsing active. 
-	 * If this flag is set to False, then information is stored to the handle leak summary object, 
-	 * otherwise information is stored to the memory leak summary object.
+	/**
+	 * Flag to demonstrate that is the memory leak summary parsing active. If
+	 * this flag is set to False, then information is stored to the handle leak
+	 * summary object, otherwise information is stored to the memory leak
+	 * summary object.
 	 */
 	private boolean moduleLeakActive = true;
 
 	/** List of modules */
 	private final AbstractList<String> moduleList;
 
-	/** 
-	 * Is subtest related information parsing active. 
-	 * If this flag is set to true all the information (such as 
-	 * memory leaks etc) is stored to the subtest object.
+	/**
+	 * Is subtest related information parsing active. If this flag is set to
+	 * true all the information (such as memory leaks etc) is stored to the
+	 * subtest object.
 	 */
 	private boolean parsingSubtest = false;
 
@@ -127,11 +128,10 @@
 
 	/** Index for active items */
 	private int runID = 1;
-	
 
 	/**
 	 * Constructor.
-	 *
+	 * 
 	 * @param projectRef
 	 *            Project reference
 	 * @param newFilePath
@@ -139,9 +139,8 @@
 	 * @param projResults
 	 *            Project results reference
 	 */
-	public ParseXMLFileSAX(
-			final org.eclipse.core.resources.IProject projectRef,
-			final String newFilePath, final ProjectResults projResults) {
+	public ParseXMLFileSAX(final IProject projectRef, final String newFilePath,
+			final ProjectResults projResults) {
 		results = projResults;
 		filePath = newFilePath;
 		project = projectRef;
@@ -151,7 +150,7 @@
 
 	/**
 	 * Adds module name to list
-	 *
+	 * 
 	 * @param moduleName
 	 *            Module to add to the list
 	 */
@@ -173,7 +172,7 @@
 	/**
 	 * When the SAX parser reach the end of the XML file this function is
 	 * called.
-	 *
+	 * 
 	 * Updates results.
 	 */
 	public void endDocument() throws SAXException {
@@ -182,7 +181,7 @@
 
 	/**
 	 * When the SAX parser reach the end of the xml tag this function is called.
-	 *
+	 * 
 	 * Checks what tag read is finished and stores corresponding results
 	 */
 	public void endElement(String uri, String localName, String name)
@@ -192,20 +191,18 @@
 			activeRuns.add(activeRunResults);
 		} else if (name.equals(XML_LEAK)) {
 
-			//not enough information so clear the active item
-			if( activeItem == null || !activeItem.checkData() ) {
+			// not enough information so clear the active item
+			if (activeItem == null || !activeItem.checkData()) {
 				activeItem = null;
-			}
-			else if (parsingSubtest) {
+			} else if (parsingSubtest) {
 				activeSubtest.addAnalysisItem(activeItem);
 			} else {
 				activeRunResults.addAnalysisItem(activeItem);
 			}
 		} else if (name.equals(XML_ITEM)) {
-			if( callstackItem.isEmpty() ) {
+			if (callstackItem.isEmpty()) {
 				callstackItem = null;
-			}
-			else {
+			} else {
 				activeItem.addCallstackItem(callstackItem);
 			}
 		} else if (name.equals(XML_SUBTEST)) {
@@ -221,7 +218,7 @@
 				}
 
 				// convert module count information to string object
-				int count = Integer.parseInt(activeModuleCount,16);
+				int count = Integer.parseInt(activeModuleCount, 16);
 
 				// if module leak summary is active
 				if (moduleLeakActive) {
@@ -232,7 +229,7 @@
 					activeRunResults.addHandleLeak(activeModuleName, count);
 				}
 
-			}catch( NumberFormatException npe ) {
+			} catch (NumberFormatException npe) {
 				npe.printStackTrace();
 			}
 		}
@@ -246,7 +243,7 @@
 
 	/**
 	 * Returns list of modules
-	 *
+	 * 
 	 * @return List of modules
 	 */
 	public AbstractList<String> getModules() {
@@ -261,8 +258,8 @@
 	}
 
 	/**
-	 * Parses xml file content.
-	 *
+	 * Parses XML file content.
+	 * 
 	 * @return True if there are no errors while parsing XML file otherwise
 	 *         False
 	 */
@@ -275,16 +272,16 @@
 			File file = new File(filePath);
 			if (file.exists()) {
 
-				SAXParserFactory factor = null;
+				SAXParserFactory factory = null;
 				SAXParser parser = null;
 				XMLReader xmlReader = null;
 
 				// get parser factory
-				factor = SAXParserFactory.newInstance();
+				factory = SAXParserFactory.newInstance();
 
-				if (factor != null) {
+				if (factory != null) {
 					// get xml parser
-					parser = factor.newSAXParser();
+					parser = factory.newSAXParser();
 
 					if (parser != null) {
 						// get xml reader
@@ -307,9 +304,9 @@
 				ret = false;
 			}
 
-			//check that XML file contains data
-			//otherwise return false
-			if( activeRunResults == null ) {
+			// check that XML file contains data
+			// otherwise return false
+			if (activeRunResults == null) {
 				ret = false;
 			}
 		} catch (SAXException sae) {
@@ -354,13 +351,13 @@
 
 	/**
 	 * When the SAX parser start to read xml tag this function is called.
-	 *
+	 * 
 	 * Checks what tag read is started and initializes corresponding objects
 	 */
 	public void startElement(String uri, String localName, String name,
 			Attributes atts) throws SAXException {
 
-		//parse one run information
+		// parse one run information
 		if (name.equals(XML_RUN)) {
 			activeRunResults = new RunResults(runID);
 			activeRunResults.setEndTime(atts.getValue(XML_END_TIME));
@@ -371,7 +368,7 @@
 			activeItemID = 1;
 			activeSubtestID = 1;
 		}
-		//parse one memory leak information
+		// parse one memory leak information
 		else if (name.equals(XML_LEAK)) {
 			try {
 				activeItem = new AnalysisItem();
@@ -383,53 +380,56 @@
 				activeItem.setModuleName(moduleName);
 				String size = atts.getValue(XML_SIZE);
 				if (size != null && !("").equals(size)) {
-					activeItem.setLeakSize(Integer
-							.parseInt(size));
+					activeItem.setLeakSize(Integer.parseInt(size));
 				}
 
-			}catch(NumberFormatException npe) {
+			} catch (NumberFormatException npe) {
 				npe.printStackTrace();
 			}
 			activeItemID++;
 			activeCallstackID = 1;
 		}
-		//parse call stack item information
+		// parse call stack item information
 		else if (name.equals(XML_ITEM)) {
-			try{
-				//create new item
+			try {
+				// create new item
 				callstackItem = new CallstackItem();
 				callstackItem.setID(activeCallstackID);
 				callstackItem.setFileName(atts.getValue(XML_FILE));
 				callstackItem.setFunctionName(atts.getValue(XML_FUNCTION));
 				callstackItem.setMemoryAddress(atts.getValue(XML_MEMADDR));
 
-				//get module name and add it to list
-				//module name list is used later.
+				// get module name and add it to list
+				// module name list is used later.
 				String moduleName = atts.getValue(XML_MODULE);
 				addModuleNameToList(moduleName);
 				callstackItem.setModuleName(moduleName);
 
-				//if line number is added to the XML file
-				//this means that the results are generated to UREL
+				// if line number is added to the XML file
+				// this means that the results are generated to UREL
 				String lineNumber = atts.getValue(XML_LINE);
-				if (lineNumber != null && !("").equals(lineNumber) && !(XML_UNKNOWN).equals(lineNumber)) {
-					callstackItem.setLeakLineNumber(Integer.parseInt(lineNumber));
+				if (lineNumber != null && !("").equals(lineNumber)
+						&& !(XML_UNKNOWN).equals(lineNumber)) {
+					callstackItem.setLeakLineNumber(Integer
+							.parseInt(lineNumber));
 				}
 
-				//if function line is added to the XML file
-				//this means that the results are generated to UREL
+				// if function line is added to the XML file
+				// this means that the results are generated to UREL
 				String functionLine = atts.getValue(XML_FUNCTION_LINE);
-				if (functionLine != null && !("").equals(functionLine) && !(XML_UNKNOWN).equals(functionLine)) {
-					callstackItem.setLeakLineNumber(Integer.parseInt(functionLine));
+				if (functionLine != null && !("").equals(functionLine)
+						&& !(XML_UNKNOWN).equals(functionLine)) {
+					callstackItem.setLeakLineNumber(Integer
+							.parseInt(functionLine));
 					callstackItem.setUrelBuild(true);
 				}
-			}catch(NumberFormatException npe) {
+			} catch (NumberFormatException npe) {
 				npe.printStackTrace();
 			}
 			activeCallstackID++;
 
 		}
-		//parse subtest information
+		// parse subtest information
 		else if (name.equals(XML_SUBTEST)) {
 			activeSubtest = new Subtest(activeSubtestID);
 			activeItemID = 1;
--- a/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/engine/ProjectResults.java	Tue Aug 24 12:10:03 2010 +0300
+++ b/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/engine/ProjectResults.java	Tue Aug 24 12:16:27 2010 +0300
@@ -31,9 +31,9 @@
 
 /**
  * Stores project related memory analysis results.
- *
+ * 
  * @author kihe
- *
+ * 
  */
 public class ProjectResults {
 
@@ -46,7 +46,6 @@
 	/** Contains list of project unknown componets */
 	private final Hashtable<IProject, AbstractList<String>> projectUnknownComp;
 
-
 	/**
 	 * Constructor.
 	 */
@@ -67,7 +66,7 @@
 
 	/**
 	 * Clears given project data.
-	 *
+	 * 
 	 * @param project
 	 *            Project reference
 	 */
@@ -83,14 +82,14 @@
 		}
 
 		// remove project unknown components
-		if(projectUnknownComp.containsKey(project)) {
+		if (projectUnknownComp.containsKey(project)) {
 			projectUnknownComp.remove(project);
 		}
 	}
 
 	/**
 	 * Checks is there stored results available for the given project reference.
-	 *
+	 * 
 	 * @param project
 	 *            Project reference
 	 * @return True if project contains results, otherwise False
@@ -104,14 +103,14 @@
 
 	/**
 	 * Gets project related data file name.
-	 *
+	 * 
 	 * @param projRef
 	 *            Project reference
 	 * @return Data file or null
 	 */
-	public final String getDataFileName( final IProject projRef) {
+	public final String getDataFileName(final IProject projRef) {
 
-		if( projDataFile == null || projDataFile.isEmpty() ) {
+		if (projDataFile == null || projDataFile.isEmpty()) {
 			return null;
 		}
 		// if selected project contains data file
@@ -135,7 +134,7 @@
 
 	/**
 	 * Gets project results by project reference.
-	 *
+	 * 
 	 * @param projRef
 	 *            Project reference
 	 * @return Project moduleresults
@@ -163,7 +162,7 @@
 
 	/**
 	 * Gets project run results by run ID.
-	 *
+	 * 
 	 * @param project
 	 *            Project reference
 	 * @param runID
@@ -184,7 +183,7 @@
 
 	/**
 	 * Gets project one AnalysisItem by run ID and leak ID.
-	 *
+	 * 
 	 * @param project
 	 *            Project reference
 	 * @param runID
@@ -193,7 +192,8 @@
 	 *            Given leak ID
 	 * @return AlysisItem if exists, otherwise null
 	 */
-	public final AnalysisItem getSpecific(final IProject project, final int runID, final int leakID) {
+	public final AnalysisItem getSpecific(final IProject project,
+			final int runID, final int leakID) {
 		AbstractList<RunResults> runs = getResults(project);
 		Iterator<RunResults> iterRuns = runs.iterator();
 		while (iterRuns.hasNext()) {
@@ -214,7 +214,7 @@
 
 	/**
 	 * Gets subtest info for given project and given run.
-	 *
+	 * 
 	 * @param project
 	 *            Project reference
 	 * @param runID
@@ -225,8 +225,8 @@
 	 *            Subtest ID
 	 * @return Subtest if it exists otherwise null
 	 */
-	public final AnalysisItem getSubtestItem(final IProject project, final int runID, final int leakID,
-			final int subtestID) {
+	public final AnalysisItem getSubtestItem(final IProject project,
+			final int runID, final int leakID, final int subtestID) {
 		// get project runs
 		AbstractList<RunResults> runs = getResults(project);
 		Iterator<RunResults> iterRuns = runs.iterator();
@@ -255,20 +255,21 @@
 
 	/**
 	 * Set project used data file name and path.
-	 *
+	 * 
 	 * @param projectRef
 	 *            Project reference
 	 * @param newDataFileName
 	 *            Project used data file name
 	 */
-	public final void setDataFileName(final IProject projectRef, final String newDataFileName) {
+	public final void setDataFileName(final IProject projectRef,
+			final String newDataFileName) {
 		// store data file name
 		projDataFile.put(projectRef, newDataFileName);
 	}
 
 	/**
 	 * Updates/stores project related memory analysis results.
-	 *
+	 * 
 	 * @param projRef
 	 *            Project reference
 	 * @param runResults
@@ -285,107 +286,118 @@
 		setDataFileName(projRef, dataFile);
 	}
 
-
 	/**
 	 * Sets project modules, also creating the unknown component list
-	 * @param project Project reference
-	 * @param mmps Project mmp's
-	 * @param modules List of the modules.
+	 * 
+	 * @param project
+	 *            Project reference
+	 * @param mmps
+	 *            Project mmp's
+	 * @param modules
+	 *            List of the modules.
 	 */
-	public void setProjectModules(IProject project, AbstractList<MMPInfo> mmps, AbstractList<String> modules)
-	{
-		try{
-			if( modules.isEmpty() || mmps.isEmpty() ) {
+	public void setProjectModules(IProject project, AbstractList<MMPInfo> mmps,
+			AbstractList<String> modules) {
+		try {
+			if (modules.isEmpty() || mmps.isEmpty()) {
 				return;
 			}
 			Iterator<String> iterModules = modules.iterator();
 			AbstractList<String> unknownComponents = new ArrayList<String>();
-			while( iterModules.hasNext() ) {
+			while (iterModules.hasNext()) {
 				String moduleName = iterModules.next();
 				boolean build = Util.isModulePartOfProject(mmps, moduleName);
-				if( !build ) {
+				if (!build) {
 					unknownComponents.add(moduleName);
 				}
 			}
 			setProjectUnknownModules(project, unknownComponents);
+		} catch (Exception e) {
+			Activator.getDefault().log(IStatus.ERROR,
+					"Can not set project modules", e);
 		}
-		catch(Exception e)
-		{
-			Activator.getDefault().log(IStatus.ERROR, "Can not set project modules", e);
-		}
-		
-		
+
 	}
 
 	/**
 	 * Stores project unknown modules.
-	 * @param project Project reference
-	 * @param modules Project unknown modules
+	 * 
+	 * @param project
+	 *            Project reference
+	 * @param modules
+	 *            Project unknown modules
 	 */
-	private void setProjectUnknownModules(IProject project, AbstractList<String> modules) {
+	private void setProjectUnknownModules(IProject project,
+			AbstractList<String> modules) {
 
-		//update list only it is empty
-		if( !projectUnknownComp.containsKey(project) ) {
+		// update list only it is empty
+		if (!projectUnknownComp.containsKey(project)) {
 			projectUnknownComp.put(project, modules);
 			return;
 		}
 
 		AbstractList<String> existingModules = projectUnknownComp.get(project);
-		if( existingModules == null || existingModules.isEmpty() ) {
+		if (existingModules == null || existingModules.isEmpty()) {
 			projectUnknownComp.put(project, modules);
 		}
 	}
 
 	/**
 	 * Returns project unknown modules.
-	 * @param project Project reference
-	 * @return If project contains unknown modules returns unknown component list otherwise empty list
+	 * 
+	 * @param project
+	 *            Project reference
+	 * @return If project contains unknown modules returns unknown component
+	 *         list otherwise empty list
 	 */
-	public AbstractList<String> getProjectUnknownModules(IProject project){
-		if( projectUnknownComp == null || projectUnknownComp.isEmpty() ) {
+	public AbstractList<String> getProjectUnknownModules(IProject project) {
+		if (projectUnknownComp == null || projectUnknownComp.isEmpty()) {
 			return new ArrayList<String>();
 		}
-		if( projectUnknownComp.containsKey(project)) {
+		if (projectUnknownComp.containsKey(project)) {
 			return projectUnknownComp.get(project);
 		}
 
-		//no unknown components found for given project => return empty list
+		// no unknown components found for given project => return empty list
 		return new ArrayList<String>();
 	}
 
 	/**
 	 * Updates project unknown components list
-	 * @param project Project reference
-	 * @param targets Project targets
+	 * 
+	 * @param project
+	 *            Project reference
+	 * @param targets
+	 *            Project targets
 	 */
-	public void updateUnknownModulesList(final IProject project, final AbstractList<MMPInfo> targets) {
-		if( project != null && project.isOpen() ) {
+	public void updateUnknownModulesList(final IProject project,
+			final AbstractList<MMPInfo> targets) {
+		if (project != null && project.isOpen()) {
 			AbstractList<String> unkModules = projectUnknownComp.get(project);
-			if( unkModules == null || unkModules.isEmpty() ) {
+			if (unkModules == null || unkModules.isEmpty()) {
 				return;
 			}
 
-			if( targets == null || targets.isEmpty() ) {
+			if (targets == null || targets.isEmpty()) {
 				return;
 			}
 			Iterator<MMPInfo> iterTargets = targets.iterator();
 
-			while(iterTargets.hasNext()) {
+			while (iterTargets.hasNext()) {
 				MMPInfo oneInfo = iterTargets.next();
-				if( oneInfo == null ) {
+				if (oneInfo == null) {
 					continue;
 				}
 				String oneModule = oneInfo.getTarget();
-				if( oneModule == null || ("").equals(oneModule ) ) {
+				if (oneModule == null || ("").equals(oneModule)) {
 					continue;
 				}
 
-				if(unkModules.contains(oneModule.toLowerCase(Locale.US)) ) {
+				if (unkModules.contains(oneModule.toLowerCase(Locale.US))) {
 					unkModules.remove(oneModule.toLowerCase(Locale.US));
 				}
 			}
-
-			projectUnknownComp.put(project,unkModules);
+			projectUnknownComp.put(project, unkModules);
 		}
 	}
 }
--- a/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/engine/RunResults.java	Tue Aug 24 12:10:03 2010 +0300
+++ b/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/engine/RunResults.java	Tue Aug 24 12:16:27 2010 +0300
@@ -20,13 +20,12 @@
 import java.util.AbstractList;
 import java.util.ArrayList;
 
-
 /**
  * Stores one run related results (these results are created to link multiple
- * xml results file).
- *
+ * XML results file).
+ * 
  * @author kihe
- *
+ * 
  */
 public class RunResults extends ResultsBase {
 
@@ -35,7 +34,7 @@
 
 	/**
 	 * Constructor.
-	 *
+	 * 
 	 * @param newRunID
 	 *            Run ID
 	 */
@@ -45,40 +44,21 @@
 	}
 
 	/**
-	 * Adds new subtest to existing subtest list.
-	 *
+	 * Adds a new subtest to existing subtest list.
+	 * 
 	 * @param subtest
-	 *            Subtest
+	 *            subtest
 	 */
 	public final void addSubtest(final Subtest subtest) {
 		subtests.add(subtest);
 	}
 
 	/**
-	 * Gets used data file name.
-	 *
-	 * @return Used data file
-	 */
-	/*public final String getDataFileName() {
-		return usedDataFile;
-	}*/
-
-	/**
-	 * Gets current run Subtests.
-	 *
-	 * @return Subtests
+	 * Gets current run subtests.
+	 * 
+	 * @return subtests
 	 */
 	public final AbstractList<Subtest> getSubtest() {
 		return subtests;
 	}
-
-	/**
-	 * Sets used data file name.
-	 *
-	 * @param newDataFileName Used data file name and path
-	 */
-	/*public final void setDataFileName(final String newDataFileName) {
-		usedDataFile = newDataFileName;
-	}*/
-
 }
--- a/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/engine/UseAtool.java	Tue Aug 24 12:10:03 2010 +0300
+++ b/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/engine/UseAtool.java	Tue Aug 24 12:16:27 2010 +0300
@@ -19,10 +19,11 @@
 
 import java.io.BufferedReader;
 import java.io.File;
+import java.io.FileInputStream;
 import java.io.FileNotFoundException;
-import java.io.FileInputStream;
 import java.io.IOException;
 import java.io.InputStreamReader;
+import java.text.MessageFormat;
 import java.util.AbstractList;
 import java.util.ArrayList;
 
@@ -31,6 +32,7 @@
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.Path;
 import org.eclipse.core.runtime.QualifiedName;
+import org.eclipse.swt.SWT;
 
 import com.nokia.carbide.cdt.builder.CarbideBuilderPlugin;
 import com.nokia.carbide.cdt.builder.builder.CarbideCPPBuilder;
@@ -43,30 +45,65 @@
 /**
  * Class to use atool.exe. Atool.exe is usually used in command prompt so that's
  * why we executes atool commands with using CarbideCommandLauncher class.
- *
+ * 
  * @author kihe
- *
+ * 
  */
 public class UseAtool {
 
-	/** Used data file name and path */
-	private String dataFileName = "";
-	
+	/** XML file path */
+	private String xmlFilePath = null;
+
+	/** Clean .dat file path */
+	private String cleanDatFilePath = null;
+
+	private static String deviceAtoolVersion = "";
+
+	/**
+	 * Sets XML file path
+	 * 
+	 * @param xmlFilePath
+	 *            XML file path
+	 */
+	private void setXmlFilePath(String xmlFilePath) {
+		this.xmlFilePath = xmlFilePath;
+	}
+
 	/**
-	 * Returns used data file name and path
-	 * @return Data file name and path
+	 * Returns XML file path.
+	 * 
+	 * @return XML file path
 	 */
-	public String getDataFileName() {
-		return dataFileName;
+	public String getXmlFilePath() {
+		return xmlFilePath;
+	}
+
+	/**
+	 * Sets clean .dat file path
+	 * 
+	 * @param cleanDatFilePath
+	 *            clean .dat file path
+	 */
+	private void setCleanDatFilePath(String cleanDatFilePath) {
+		this.cleanDatFilePath = cleanDatFilePath;
+	}
+
+	/**
+	 * Returns clean .dat file path.
+	 * 
+	 * @return clean .dat file path
+	 */
+	public String getCleanDatFilePath() {
+		return cleanDatFilePath;
 	}
 
 	/**
 	 * Check data file type. Gets first line of file and compares that to
 	 * predefined constants.
-	 *
+	 * 
 	 * @param path
-	 *            Data file path
-	 * @return Type of data file
+	 *            data file path
+	 * @return type of data file
 	 */
 	public static int checkFileType(final String path) {
 		// return value
@@ -76,12 +113,12 @@
 		if (path == null || ("").equals(path)) {
 			return retValue;
 		}
-		java.io.File file = new java.io.File(path);
+		File file = new File(path);
 		if (!file.exists()) {
 			return retValue;
 		}
 
-		if( Util.isFileXML(path) ) {
+		if (Util.isFileXML(path)) {
 			return Constants.DATAFILE_XML;
 		}
 
@@ -89,11 +126,11 @@
 		BufferedReader input = null;
 		FileInputStream fileInputStream = null;
 		InputStreamReader inputReader = null;
+
 		try {
-
 			// get input
 			fileInputStream = new FileInputStream(path);
-			if( fileInputStream.available() == 0 ) {
+			if (fileInputStream.available() == 0) {
 				fileInputStream.close();
 				return Constants.DATAFILE_EMPTY;
 			}
@@ -102,26 +139,52 @@
 			inputReader = new InputStreamReader(fileInputStream, "UTF-8");
 			input = new BufferedReader(inputReader);
 
-			// get first line of data file
-			String line = input.readLine();
+			boolean firstLineProcessed = false;
+			String line;
+
+			while ((line = input.readLine()) != null) {
+
+				if (!firstLineProcessed) {
+					firstLineProcessed = true;
+
+					if (line.contains(Constants.DATAFILE_VERSION)) {
+						return Constants.DATAFILE_LOG;
+					}
+					if (line.contains(Constants.BINARY_FILE_VERSION)) {
+						return Constants.DATAFILE_BINARY;
+					}
+				}
+
+				if (line.contains(Constants.PREFIX_OLD)) {
+					return Constants.DATAFILE_OLD_FORMAT;
+				}
 
-			// line contains data file version specification => data file type
-			// is log
-			if (line != null && line.contains(Constants.DATAFILE_VERSION)) {
-				// update return value
-				retValue = Constants.DATAFILE_LOG;
-			} else {
-				// go thru file
-				while ((line = input.readLine()) != null) {
+				if (line.contains(Constants.PREFIX)) {
+					int index = line.indexOf(Constants.PREFIX);
+					String usedString = line.substring(index, line.length());
+					String[] lineFragments = usedString.split(" ");
+
+					if (lineFragments.length > 8) {
+						if (lineFragments[2].equals(Constants.PCS)) {
+
+							deviceAtoolVersion = lineFragments[8];
 
-					// line contains prefix specification => data file type is
-					// trace
-					if (line.contains(Constants.PREFIX)) {
-						// update return value
-						retValue = Constants.DATAFILE_TRACE;
-						return retValue;
+							int traceFormatVersion = 0;
+							try {
+								traceFormatVersion = Integer.parseInt(
+										lineFragments[7], 16);
+							} catch (NumberFormatException nfe) {
+								nfe.printStackTrace();
+								return Constants.DATAFILE_INVALID;
+							}
+
+							if (traceFormatVersion == 3) {
+								return Constants.DATAFILE_TRACE;
+							} else {
+								return Constants.DATAFILE_UNSUPPORTED_TRACE_FORMAT;
+							}
+						}
 					}
-
 				}
 			}
 			input.close();
@@ -161,11 +224,11 @@
 
 	/**
 	 * Creates atool_temp folder to current mmp folder location.
-	 *
+	 * 
 	 * @param folderLocation
 	 *            Current mmp folder location
 	 * @return True if given location contains atool_temp folder otherwise false
-	 *
+	 * 
 	 */
 	public static boolean createAToolFolderIfNeeded(final String folderLocation) {
 
@@ -177,7 +240,7 @@
 		}
 
 		// create atool_temp folder
-		if( !returnValue ) {
+		if (!returnValue) {
 			File file = new File(folderLocation + "\\" + Constants.ATOOL_TEMP);
 			if (!file.exists()) {
 				returnValue = file.mkdir();
@@ -196,8 +259,8 @@
 	}
 
 	/**
-	 * Creates xml file to project bld.inf folder.
-	 *
+	 * Creates XML file to project bld.inf folder.
+	 * 
 	 * @param monitor
 	 *            IProgressMonitor reference
 	 * @param project
@@ -209,10 +272,10 @@
 	 * @return XML file name and path if file was successfully created otherwise
 	 *         null
 	 */
-	public final Constants.COMMAND_LINE_ERROR_CODE createXMLFileToCarbide(final IProgressMonitor monitor,
-			final IProject project, final String dataFilePath, final String command) {
-		// check file type
-		// possible file types: S60 data file, trace data file or xml file
+	public final Constants.COMMAND_LINE_ERROR_CODE createXmlAndCleanDatFilesToCarbide(
+			final IProgressMonitor monitor, final IProject project,
+			final String dataFilePath, final String command) {
+
 		int fileType = 0;
 
 		// get file type
@@ -220,19 +283,23 @@
 
 		if (fileType == Constants.DATAFILE_INVALID) {
 			return Constants.COMMAND_LINE_ERROR_CODE.DATA_FILE_INVALID;
-		} else if( fileType == Constants.DATAFILE_EMPTY ) {
+		} else if (fileType == Constants.DATAFILE_EMPTY) {
 			return Constants.COMMAND_LINE_ERROR_CODE.DATA_FILE_EMPTY;
+		} else if (fileType == Constants.DATAFILE_OLD_FORMAT) {
+			return Constants.COMMAND_LINE_ERROR_CODE.DATA_FILE_OLD_FORMAT;
+		} else if (fileType == Constants.DATAFILE_UNSUPPORTED_TRACE_FORMAT) {
+			return Constants.COMMAND_LINE_ERROR_CODE.DATA_FILE_UNSUPPORTED_TRACE_FORMAT;
 		}
-		
-		//check that command line engine can be executed
-		if( !Util.isAtoolAvailable() ) {
+
+		// check that command line engine can be executed
+		if (!Util.isAtoolAvailable()) {
 			return Constants.COMMAND_LINE_ERROR_CODE.EXECUTE_ERROR;
 		}
 		ICarbideProjectInfo cpi = CarbideBuilderPlugin.getBuildManager()
 				.getProjectInfo(project);
 
 		// if ICarbideProjectInfo not found return null
-		if( cpi == null ) {
+		if (cpi == null) {
 			return Constants.COMMAND_LINE_ERROR_CODE.UNKNOWN_ERROR;
 		}
 		String absolutePath = cpi.getAbsoluteBldInfPath().toOSString();
@@ -241,34 +308,40 @@
 		if (index != -1) {
 			bldInfFolder = absolutePath.substring(0, index);
 		}
-		if( bldInfFolder != null ) {
+		if (bldInfFolder != null) {
 			createAToolFolderIfNeeded(bldInfFolder);
 		}
 
 		AbstractList<String> usedArguments = new ArrayList<String>();
 		usedArguments.add(command);
 		usedArguments.add(dataFilePath);
-		
-		//try to load user defined symbol files
+
+		// try to load user defined symbol files
 		try {
-			//property store names
-			QualifiedName useRom = new QualifiedName(Constants.USE_ROM_SYMBOL, Constants.USE_ROM );
-			QualifiedName name = new QualifiedName(Constants.USE_ROM_SYMBOL_LOCATION, Constants.ROM_LOC );
-			
-			//get value
+			// property store names
+			QualifiedName useRom = new QualifiedName(Constants.USE_ROM_SYMBOL,
+					Constants.USE_ROM);
+			QualifiedName name = new QualifiedName(
+					Constants.USE_ROM_SYMBOL_LOCATION, Constants.ROM_LOC);
+
+			// get value
 			String useRomText = project.getPersistentProperty(useRom);
-			if( useRomText != null ) {
-				boolean useRomSymbol = useRomText.equalsIgnoreCase("true") ? true : false;
-				//is symbol files activated for project
-				if(useRomSymbol) {
-					String symbolFileLocation = project.getPersistentProperty(name);
-					if( symbolFileLocation != null && !("").equals(symbolFileLocation) ) {
+			if (useRomText != null) {
+				boolean useRomSymbol = useRomText.equalsIgnoreCase("true") ? true
+						: false;
+				// is symbol files activated for project
+				if (useRomSymbol) {
+					String symbolFileLocation = project
+							.getPersistentProperty(name);
+					if (symbolFileLocation != null
+							&& !("").equals(symbolFileLocation)) {
 						String[] split = symbolFileLocation.split(";");
-						if( split != null ) {
-							for( int i=0; i<split.length; i++ ) {
-								//check that file exists
-								java.io.File symFile = new java.io.File(split[i]);
-								if(symFile.exists()) {
+						if (split != null) {
+							for (int i = 0; i < split.length; i++) {
+								// check that file exists
+								java.io.File symFile = new java.io.File(
+										split[i]);
+								if (symFile.exists()) {
 									usedArguments.add("-s");
 									usedArguments.add(split[i]);
 								}
@@ -277,46 +350,63 @@
 					}
 				}
 			}
-		}catch(CoreException ce) {
+		} catch (CoreException ce) {
 			ce.printStackTrace();
 		}
-		
-		
+
 		usedArguments.add(bldInfFolder + "\\" + Constants.ATOOL_TEMP + "\\"
 				+ Constants.FILENAME_CARBIDE);
 		if (Util.verboseAtoolOutput()) {
 			usedArguments.add(Constants.ATOOL_SHOW_DEBUG);
 		}
 
-	    String[] arguments = new String[usedArguments.size()];
-        usedArguments.toArray(arguments);
+		String[] arguments = new String[usedArguments.size()];
+		usedArguments.toArray(arguments);
 
-		int returnValue = executeCommand(arguments, bldInfFolder,
-				monitor, project);
+		if (fileType != Constants.DATAFILE_BINARY) {
+			String carbideAtoolVersion = Util.getAtoolVersionNumber(Util
+					.getAtoolInstallFolder());
+			if (!carbideAtoolVersion.equals(deviceAtoolVersion)) {
+				Util.showMessageDialog(Constants.CLE_VERSION_MISMATCH,
+						MessageFormat.format(
+								Constants.AT_BINARIES_VERSION_MISMATCH,
+								deviceAtoolVersion, carbideAtoolVersion),
+						SWT.ICON_WARNING);
+			}
+		}
+
+		int returnValue = executeCommand(arguments, bldInfFolder, monitor,
+				project);
 
 		// if some error happens
-		if (returnValue == Constants.DATAFILE_INVALID || returnValue != Constants.COMMAND_LINE_ERROR_CODE.OK.getCode() ) {
-			Constants.COMMAND_LINE_ERROR_CODE error = Util.getErrorCode(returnValue);
-			setDataFileName(null);
+		if (returnValue == Constants.DATAFILE_INVALID
+				|| returnValue != Constants.COMMAND_LINE_ERROR_CODE.OK
+						.getCode()) {
+			Constants.COMMAND_LINE_ERROR_CODE error = Util
+					.getErrorCode(returnValue);
+			setXmlFilePath(null);
+			setCleanDatFilePath(null);
 			return error;
 		}
-		
-		setDataFileName(bldInfFolder + "\\" + Constants.ATOOL_TEMP + "\\"
-		+ Constants.FILENAME_CARBIDE); 
-		return Constants.COMMAND_LINE_ERROR_CODE.OK; 
-	}
+
+		setXmlFilePath(bldInfFolder + "\\" + Constants.ATOOL_TEMP + "\\"
+				+ Constants.FILENAME_CARBIDE);
 
-	/**
-	 * Sets data file name and path
-	 * @param newDataFileName Data file name and path
-	 */
-	private void setDataFileName(String newDataFileName) {
-		dataFileName = newDataFileName;
+		String cleanDatFileName = null;
+		int lastSlashIndex = Util.getLastSlashIndex(dataFilePath);
+		if (lastSlashIndex != -1) {
+			cleanDatFileName = dataFilePath.substring(lastSlashIndex + 1,
+					dataFilePath.length());
+		}
+		setCleanDatFilePath(bldInfFolder + "\\" + Constants.ATOOL_TEMP + "\\"
+				+ cleanDatFileName + ".cleaned");
+
+		return Constants.COMMAND_LINE_ERROR_CODE.OK;
 	}
 
 	/**
 	 * Executes given command, uses CarbideCommandLauncher class for execution.
-	 *
+	 * 
 	 * @param args
 	 *            Command argument list
 	 * @param path
@@ -366,5 +456,4 @@
 		}
 		return error;
 	}
-
 }
--- a/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/engine/statistic/AllocCallstack.java	Tue Aug 24 12:10:03 2010 +0300
+++ b/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/engine/statistic/AllocCallstack.java	Tue Aug 24 12:16:27 2010 +0300
@@ -27,7 +27,7 @@
 	/** Callstack memory address */
 	long memoryAddress;
 
-	/** Dll name where this callstack belongs*/
+	/** DLL name where this callstack belongs*/
 	DllLoad dllLoad;
 
 	/**
@@ -47,8 +47,8 @@
 	}
 
 	/**
-	 * Set dll load item for current allocation callstack item
-	 * @param loadItem Dll load item
+	 * Set DLL load item for current allocation callstack item
+	 * @param loadItem DLL load item
 	 */
 	public void setDllLoad(DllLoad loadItem)
 	{
@@ -56,8 +56,8 @@
 	}
 
 	/**
-	 * Returns Dll load item
-	 * @return Dll load item
+	 * Returns DLL load item
+	 * @return DLL load item
 	 */
 	public DllLoad getDllLoad()
 	{
--- a/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/engine/statistic/AllocInfo.java	Tue Aug 24 12:10:03 2010 +0300
+++ b/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/engine/statistic/AllocInfo.java	Tue Aug 24 12:16:27 2010 +0300
@@ -16,18 +16,19 @@
  */
 package com.nokia.s60tools.analyzetool.engine.statistic;
 
-
-
 /**
  * Class holds information of one memory allocation
+ * 
  * @author kihe
- *
+ * 
  */
 public class AllocInfo extends BaseInfo {
 
 	/**
 	 * Constructor
-	 * @param memoryAddress memory address for this allocation
+	 * 
+	 * @param memoryAddress
+	 *            memory address for this allocation
 	 */
 	public AllocInfo(String memoryAddress) {
 		super(memoryAddress);
@@ -36,15 +37,17 @@
 	private FreeInfo freedBy = null;
 
 	/**
-	 * set this allocation as freed by the provide FreeInfo
+	 * set this allocation as freed by the provided FreeInfo
+	 * 
 	 * @param info
 	 */
 	public void setFreedBy(FreeInfo info) {
-		this.freedBy  =info;
+		this.freedBy = info;
 	}
-	
+
 	/**
 	 * get the FreeInfo that freed this allocation
+	 * 
 	 * @return a FreeInfo or null
 	 */
 	public FreeInfo getFreedBy() {
@@ -53,6 +56,7 @@
 
 	/**
 	 * is this allocation freed
+	 * 
 	 * @return boolean true/false
 	 */
 	public boolean isFreed() {
@@ -61,14 +65,16 @@
 
 	@Override
 	public String toString() {
-		return String.format("AllocInfo [%s freedBy=[%s]]", super.toString(), freedByToString());
+		return String.format("AllocInfo [%s freedBy=[%s]]", super.toString(),
+				freedByToString());
 	}
-	
-	private String freedByToString(){
-		if (freedBy == null){
+
+	private String freedByToString() {
+		if (freedBy == null) {
 			return "null";
 		}
-		
-		return String.format("addr=0x%08X time=%s", freedBy.getMemoryAddress(), freedBy.getTime());
+
+		return String.format("addr=0x%08X time=%s", freedBy.getMemoryAddress(),
+				freedBy.getTime());
 	}
 }
--- a/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/engine/statistic/BaseInfo.java	Tue Aug 24 12:10:03 2010 +0300
+++ b/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/engine/statistic/BaseInfo.java	Tue Aug 24 12:16:27 2010 +0300
@@ -52,11 +52,15 @@
 	private int totalMemory;
 	private int size;
 	
+	/** Thread Id. **/
+	private int threadId;
+	
 	/** file position to defer callstack reading */
 	private long filePos;
 
 	/**
 	 * Constructor
+	 * 
 	 * @param memoryAddress The address for this memory operation
 	 */
 	public BaseInfo(String memoryAddress) {
@@ -128,19 +132,20 @@
 		this.processID = iValue;
 	}
 
-	/**
-	 * Sets time for the allocation
-	 *
-	 * @param newTime
-	 *            Allocation time
-	 */
-	public void setTime(String newTime) {
-		long lValue = Long.parseLong(newTime, 16);
-		this.time = lValue;
-	}
+//	/**
+//	 * Sets time for the allocation
+//	 *
+//	 * @param newTime
+//	 *            Allocation time
+//	 */
+//	public void setTime(String newTime) {
+//		long lValue = Long.parseLong(newTime, 16);
+//		this.time = lValue;
+//	}
 	
 	/**
-	 * Sets the timestamp of event occurrence
+	 * Sets the time stamp of event occurrence
+	 * 
 	 * @param newTime
 	 */
 	public void setTime(long newTime)
@@ -228,6 +233,24 @@
 	public int getSizeInt() {
 		return size;
 	}
+	
+	/**
+	 * Sets thread id.
+	 * 
+	 * @param threadId thread id
+	 */
+	public void setThreadId(String threadId){
+		this.threadId = Integer.parseInt(threadId, 16);
+	}
+	
+	/**
+	 * Gets thread id.
+	 * 
+	 * @return thread id
+	 */
+	public int getThreadId(){
+		return threadId;
+	}
 
 	/**
 	 * Getter for file position pointing to first record in 
@@ -280,6 +303,4 @@
 		}
 		return sb.toString();
 	}
-	
-	
 }
--- a/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/engine/statistic/DllLoad.java	Tue Aug 24 12:10:03 2010 +0300
+++ b/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/engine/statistic/DllLoad.java	Tue Aug 24 12:16:27 2010 +0300
@@ -107,16 +107,17 @@
 		this.endAddress = lValue;
 	}
 
-	/**
-	 * Set load time of this item
-	 *
-	 * @param newLoadTime
-	 *            Time when this dll is loaded.
-	 */
-	public void setLoadTime(String newLoadTime) {
-		Long lValue = Long.parseLong(newLoadTime, 16);
-		this.loadTime = lValue;
-	}
+//	/**
+//	 * Set load time of this item
+//	 *
+//	 * @param newLoadTime
+//	 *            Time when this dll is loaded.
+//	 */
+//	public void setLoadTime(String newLoadTime) {
+//		Long lValue = Long.parseLong(newLoadTime, 16);
+//		this.loadTime = lValue;
+//	}
+	
 	/**
 	 * Set load time of this item
 	 *
@@ -126,6 +127,7 @@
 	public void setLoadTime(long loadTime) {
 		this.loadTime = loadTime;
 	}
+	
 	/**
 	 * Set unload time of this dll
 	 *
--- a/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/engine/statistic/FreeInfo.java	Tue Aug 24 12:10:03 2010 +0300
+++ b/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/engine/statistic/FreeInfo.java	Tue Aug 24 12:16:27 2010 +0300
@@ -22,10 +22,8 @@
 import java.util.Collections;
 import java.util.Set;
 
-
-
 /**
- * Constains information of free
+ * Contains information of free
  * @author kihe
  *
  */
@@ -78,5 +76,4 @@
 		}
 		return sb.toString();
 	}
-	
 }
--- a/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/engine/statistic/ProcessInfo.java	Tue Aug 24 12:10:03 2010 +0300
+++ b/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/engine/statistic/ProcessInfo.java	Tue Aug 24 12:16:27 2010 +0300
@@ -39,7 +39,7 @@
 	/** List of allocations and frees sorted as they arrive in time */
 	private AbstractList<BaseInfo> allocsFrees;
 
-	/** List of dll loads */
+	/** List of DLL loads */
 	private List<DllLoad> dllLoads;
 
 	/** Process id */
@@ -48,21 +48,26 @@
 	/** Process Name */
 	private String processName;
 
+	/** Log time */
+	private long logTime;
+
 	/** Process start time */
 	private Long startTime;
 
-	/** Process start time */
+	/** Process end time */
 	private Long endTime;
 
 	/** Trace data format version number */
-	private int traceDataVersion = 1;
+	private int traceDataVersion = 0;
 
-	/** active allocations account */
+	/** Active allocations account */
 	private int allocCount = 0;
-	/** total memory consumed by this process at each event */
+
+	/** Total memory consumed by this process at each event */
 	private int totalMemory = 0;
-	/** highest memory consumed by this process */
-	private int highestMemory =0;
+
+	/** Highest memory consumed by this process */
+	private int highestMemory = 0;
 
 	/** Map of potential leaks; to track allocations not yet freed */
 	private Map<Long, List<AllocInfo>> potentialLeaksMap;
@@ -74,7 +79,7 @@
 		dllLoads = new ArrayList<DllLoad>();
 		allocsFrees = new ArrayList<BaseInfo>();
 		allocCount = 0;
-		potentialLeaksMap = new HashMap<Long, List<AllocInfo>>(); 
+		potentialLeaksMap = new HashMap<Long, List<AllocInfo>>();
 	}
 
 	/**
@@ -91,10 +96,10 @@
 			highestMemory = totalMemory;
 		}
 		allocsFrees.add(oneInfo);
-		//add this alloc to the potential leaks map
+		// add this alloc to the potential leaks map
 		Long addr = oneInfo.getMemoryAddress();
 		List<AllocInfo> allocsSameAddr = potentialLeaksMap.get(addr);
-		if (allocsSameAddr == null){
+		if (allocsSameAddr == null) {
 			allocsSameAddr = new ArrayList<AllocInfo>();
 			potentialLeaksMap.put(addr, allocsSameAddr);
 		}
@@ -102,20 +107,21 @@
 	}
 
 	/**
-	 * Adds one dll load to the list.
+	 * Adds one DLL load to the list.
 	 * 
 	 * @param dllLoad
-	 *            One dll load
+	 *            One DLL load
 	 */
 	public void addOneDllLoad(DllLoad dllLoad) {
-		//make sure there is no dll with the same details already loaded
+		// make sure there is no DLL with the same details already loaded
 		for (DllLoad dll : dllLoads) {
-			if (dll.getName().equalsIgnoreCase(dllLoad.getName()) && dll.getProcessID() == dllLoad.getProcessID()
-					&& dll.getUnloadTime()> dllLoad.getLoadTime()){
+			if (dll.getName().equalsIgnoreCase(dllLoad.getName())
+					&& dll.getProcessID() == dllLoad.getProcessID()
+					&& dll.getUnloadTime() > dllLoad.getLoadTime()) {
 				return;
 			}
 		}
-		
+
 		dllLoads.add(dllLoad);
 	}
 
@@ -128,48 +134,54 @@
 	public void free(FreeInfo info) {
 
 		int freeSize = 0;
-		
-		//remove allocs with the same address from the potential leaks map
+
+		// remove allocs with the same address from the potential leaks map
 		Long freeAddr = info.getMemoryAddress();
-		List<AllocInfo> allocsSameAddr = potentialLeaksMap.remove(freeAddr);		
-		if (allocsSameAddr != null && allocsSameAddr.size()>0){
-			for(AllocInfo allocInfo : allocsSameAddr){
+		List<AllocInfo> allocsSameAddr = potentialLeaksMap.remove(freeAddr);
+		if (allocsSameAddr != null && allocsSameAddr.size() > 0) {
+			for (AllocInfo allocInfo : allocsSameAddr) {
 				allocInfo.setFreedBy(info);
 				allocCount--;
 				int thisFreedSize = allocInfo.getSizeInt();
 				freeSize = freeSize + thisFreedSize;
 				totalMemory = totalMemory - thisFreedSize;
-			}	
+			}
 			info.setFreedAllocs(new HashSet<AllocInfo>(allocsSameAddr));
 		}
-		
 
 		info.setSizeInt(freeSize);
 		info.setTotalMem(totalMemory);
-		
-		if ( info.getTime() == 0 ) {
+
+		if (info.getTime() == 0) {
 			// support old format
-			//set time as last operation time or start time.
+			// set time as last operation time or start time.
 			Long time = getPreviousTime();
 			if (time == null || time == -1L) {
-				Activator.getDefault().log(IStatus.WARNING, String.format("AnalyzeTool encountered a process = %s, which starts with FREE.", processID), null);
+				Activator
+						.getDefault()
+						.log(
+								IStatus.WARNING,
+								String
+										.format(
+												"AnalyzeTool encountered a process = %s, which starts with FREE.",
+												processID), null);
 				time = startTime == null ? 0 : startTime;
 			}
 			info.setTime(time);
 		}
-		
 		allocsFrees.add(info);
 	}
 
 	/**
-	 * Returns the timestamp of the last memory operation
-	 * @return the timestamp of the last memory operation, or -1 if there
-	 * are no memory operations
+	 * Returns the time stamp of the last memory operation
+	 * 
+	 * @return the time stamp of the last memory operation, or -1 if there are
+	 *         no memory operations
 	 */
 	private Long getPreviousTime() {
 		Long time = -1L;
 		if (!allocsFrees.isEmpty()) {
-			time = (allocsFrees.get(allocsFrees.size() -1)).getTime();
+			time = (allocsFrees.get(allocsFrees.size() - 1)).getTime();
 		}
 		return time;
 	}
@@ -190,9 +202,9 @@
 	}
 
 	/**
-	 * Returns list of dll loads
+	 * Returns list of DLL loads
 	 * 
-	 * @return List of dll loads
+	 * @return List of DLL loads
 	 */
 	public List<DllLoad> getDllLoads() {
 		return dllLoads;
@@ -224,8 +236,9 @@
 		return count;
 	}
 
-	/** 
+	/**
 	 * get list of frees
+	 * 
 	 * @return List of FreeInfo
 	 */
 	public AbstractList<FreeInfo> getFrees() {
@@ -279,7 +292,7 @@
 	 * Sets process start time
 	 * 
 	 * @param newTime
-	 *            Process start time
+	 *            process start time
 	 */
 	public void setStartTime(String newTime) {
 		long lValue = Long.parseLong(newTime, 16);
@@ -287,31 +300,53 @@
 	}
 
 	/**
+	 * Sets log time
+	 * 
+	 * @param logTime
+	 *            log time of one trace message in microseconds
+	 */
+	public void setLogTime(long logTime) {
+		this.logTime = logTime;
+	}
+
+	/**
+	 * Gets log time
+	 * 
+	 * @return log time of one trace message in microseconds
+	 */
+	public long getLogTime() {
+		return logTime;
+	}
+
+	/**
 	 * Updates trace version number
 	 * 
 	 * @param newTraceDataVersion
 	 *            New trace data version number
 	 */
 	public void setTraceDataVersion(String newTraceDataVersion) {
-
 		try {
 			traceDataVersion = Integer.parseInt(newTraceDataVersion, 16);
 		} catch (NumberFormatException nfe) {
-			// exception while trying to set new version number
-			// use the oldest version number, this version number is safest
-			// but when use this version some information could be lost
-			traceDataVersion = 1;
+			traceDataVersion = 0;
 		}
 	}
+
 	/**
 	 * Marks given dll as unloaded
-	 * @param dllName Dll name
-	 * @param startAddr memory start address for DLL
-	 * @param endAddr memory end address for DLL
-	 * @param dllUnloadTime time when DLL is unloaded
+	 * 
+	 * @param dllName
+	 *            Dll name
+	 * @param startAddr
+	 *            memory start address for DLL
+	 * @param endAddr
+	 *            memory end address for DLL
+	 * @param dllUnloadTime
+	 *            time when DLL is unloaded
 	 * @return the dll marked as unloaded, or null if no match found
 	 */
-	public DllLoad unloadOneDll(String dllName, long startAddr, long endAddr, long dllUnloadTime) {
+	public DllLoad unloadOneDll(String dllName, long startAddr, long endAddr,
+			long dllUnloadTime) {
 		DllLoad ret = null;
 		for (DllLoad dll : dllLoads) {
 			if (dll.getName().equals(dllName)
@@ -326,15 +361,26 @@
 
 	/**
 	 * set end time of the process
-	 * @param aTime
+	 * 
+	 * @param endTime
 	 */
-	public void setEndTime(String aTime) {
-		Long lValue = Long.parseLong(aTime, 16);
-		endTime = lValue;
+	public void setEndTime(long endTime) {
+		this.endTime = endTime;
 	}
 
+	// /**
+	// * set end time of the process
+	// *
+	// * @param aTime
+	// */
+	// public void setEndTime(String aTime) {
+	// Long lValue = Long.parseLong(aTime, 16);
+	// endTime = lValue;
+	// }
+
 	/**
 	 * set process name
+	 * 
 	 * @param aProcessName
 	 */
 	public void setProcessName(String aProcessName) {
@@ -350,6 +396,7 @@
 
 	/**
 	 * get all events
+	 * 
 	 * @return list of BaseInfo
 	 */
 	public AbstractList<BaseInfo> getAllocsFrees() {
@@ -357,7 +404,8 @@
 	}
 
 	/**
-	 * get end time of the process
+	 * Get end time of the process
+	 * 
 	 * @return End time
 	 */
 	public Long getEndTime() {
@@ -374,19 +422,20 @@
 	public AbstractList<AllocInfo> getAllocsFreedBy(FreeInfo free) {
 		AbstractList<AllocInfo> allocs = new ArrayList<AllocInfo>();
 		for (BaseInfo alloc : allocsFrees) {
-			if (alloc instanceof AllocInfo && ((AllocInfo) alloc).getFreedBy() == free) {
+			if (alloc instanceof AllocInfo
+					&& ((AllocInfo) alloc).getFreedBy() == free) {
 				allocs.add((AllocInfo) alloc);
 			}
 		}
 		return allocs;
 	}
+
 	/**
 	 * Getter for highest memory allocation for the current process
+	 * 
 	 * @return int containing highest memory usage
 	 */
 	public int getHighestCumulatedMemoryAlloc() {
 		return highestMemory;
 	}
-
-
 }
--- a/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/engine/statistic/ReadFile.java	Tue Aug 24 12:10:03 2010 +0300
+++ b/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/engine/statistic/ReadFile.java	Tue Aug 24 12:16:27 2010 +0300
@@ -11,7 +11,7 @@
  *
  * Contributors:
  *
- * Description:  Definitions for the class ReadFile
+ * Description: Definitions for the class ReadFile
  *
  */
 
@@ -29,27 +29,28 @@
 import com.nokia.s60tools.analyzetool.engine.ParseAnalyzeData;
 
 /**
- * Reads thru trace file and generates statistic info
+ * Reads thru trace file and generates statistic info.
+ * 
  * @author kihe
- *
+ * 
  */
 public class ReadFile {
 
-	/** Parser */
+	/** Parser. */
 	private ParseAnalyzeData parser;
 
 	/**
-	 * Constructor
+	 * Constructor.
 	 */
-	public ReadFile()
-	{
+	public ReadFile() {
 	}
 
-
 	/**
-	 * Reads thru file
-	 * @param path File location
-	 * @return True if no errors occurs when reading file otherwise False
+	 * Reads thru file.
+	 * 
+	 * @param path
+	 *            file location
+	 * @return true, if no errors occurs when reading file, otherwise false
 	 */
 	public boolean readFile(final String path) {
 		// return value
@@ -58,35 +59,39 @@
 		// input
 		BufferedReader input = null;
 		FileInputStream fis = null;
+
 		try {
-
 			// check that file exists
 			if (path == null || ("").equals(path)) {
 				return false;
 			}
-			java.io.File file = new java.io.File(path);
+			File file = new File(path);
 			if (!file.exists()) {
 				return false;
 			}
 
 			// get input
 			fis = new FileInputStream(file);
-			input = new BufferedReader(new InputStreamReader(fis,"UTF-8"));
-			int linebreakSize = lineBreakSize(file); //important to determine file position for deferred callstack reading
+			input = new BufferedReader(new InputStreamReader(fis, "UTF-8"));
+			int linebreakSize = lineBreakSize(file); // important to determine
+			// file position for deferred callstack reading
 
 			// get first line of data file
 			parser = new ParseAnalyzeData(false, true, true, linebreakSize);
 			String line = null;
 			// go thru file
 			while ((line = input.readLine()) != null) {
-				parser.parse(line);
+				boolean success = parser.parse(line);
+				if (!success) {
+					return false;
+				}
 			}
 			fis.close();
 			input.close();
 		} catch (FileNotFoundException ex) {
 			retValue = false;
 			ex.printStackTrace();
-		} catch (OutOfMemoryError oome){
+		} catch (OutOfMemoryError oome) {
 			retValue = true;
 			oome.printStackTrace();
 		} catch (IOException ex) {
@@ -102,10 +107,10 @@
 			}
 
 			try {
-				if( fis != null ) {
+				if (fis != null) {
 					fis.close();
 				}
-			}catch(Exception e) {
+			} catch (Exception e) {
 				e.printStackTrace();
 			}
 		}
@@ -114,59 +119,58 @@
 
 	/**
 	 * Returns statistic
+	 * 
 	 * @return Statistic
 	 */
-	public AbstractList<ProcessInfo> getStatistic()
-	{
+	public AbstractList<ProcessInfo> getStatistic() {
 		return parser.getStatistic();
 	}
 
 	/**
 	 * Finish the file reading.
 	 */
-	public void finish()
-	{
+	public void finish() {
 		parser.finish();
-
 	}
-	
+
 	/**
-	 * Returns true if callstack reading from file is done
-	 * on demand; false if callstacks are made available during parsing
-	 * phase.
+	 * Returns true if callstack reading from file is done on demand; false if
+	 * callstacks are made available during parsing phase.
+	 * 
 	 * @return true for deferred callstack reading
 	 */
-	public boolean hasDeferredCallstacks(){
+	public boolean hasDeferredCallstacks() {
 		return parser.hasDeferredCallstacks();
 	}
-	
+
 	/**
-	 * Determines the size of line breaks in the given file. File produced on the device-side
-	 * should have while Windows files have.
-	 * @param aFile the file to check
+	 * Determines the size of line breaks in the given file. File produced on
+	 * the device-side should have while Windows files have.
+	 * 
+	 * @param aFile
+	 *            the file to check
 	 * @return 1 or 2 for size of line break, or 0 if it cannot be determined
 	 */
-	private static int lineBreakSize(File aFile){
+	private static int lineBreakSize(File aFile) {
 		int ret = 0;
 		try {
-			BufferedReader br = new BufferedReader(new FileReader( aFile.getPath() ));
-			
+			BufferedReader br = new BufferedReader(new FileReader(aFile
+					.getPath()));
+
 			int ch;
 			int cnt = 0;
-			while ((ch = br.read()) >=0){
-				cnt ++;
-				if (ch == '\r'){
-					ret ++;
-				} else if (ch == '\n'){
-					ret ++;
+			while ((ch = br.read()) >= 0) {
+				cnt++;
+				if (ch == '\r') {
+					ret++;
+				} else if (ch == '\n') {
+					ret++;
 					break;
 				}
 			}
-			
 		} catch (IOException e) {
 			// do nothing, a return value of 0 will indicate some problem
 		}
 		return ret;
 	}
-	
 }
--- a/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/engine/statistic/SourceFile.java	Tue Aug 24 12:10:03 2010 +0300
+++ b/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/engine/statistic/SourceFile.java	Tue Aug 24 12:16:27 2010 +0300
@@ -18,7 +18,7 @@
 package com.nokia.s60tools.analyzetool.engine.statistic;
 
 /**
- * Constains information of found source file.
+ * Contains information of found source file.
  * @author kihe
  *
  */
--- a/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/global/Constants.java	Tue Aug 24 12:10:03 2010 +0300
+++ b/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/global/Constants.java	Tue Aug 24 12:16:27 2010 +0300
@@ -19,18 +19,18 @@
 
 /**
  * Contains all the defined constants
- *
+ * 
  * @author kihe
- *
+ * 
  */
 public class Constants {
 
 	public static enum ACTIONS {
 		RUN_VIEW_MEM_LEAKS, RUN_BUILD, RUN_CLEAN
 	}
+
 	public static enum Operation {
-		PROCESS_START, 
-		PROCESS_END, ALLOC, FREE, ALLOCH, FREEH, ALLOCF, FREEF, DLL_LOAD, DLL_UNLOAD, NOVALUE;
+		PCS, PCE, ALH, ALF, FRH, FRF, RAH, RAF, DLL, DLU, TDS, TDE, VER, TSS, TSE, DEVINFO, NOVALUE;
 
 		public static Operation toOperation(String str) {
 			try {
@@ -41,6 +41,8 @@
 		}
 	}
 
+	public static final String ATOOL_LIBS_OK = "atool_libs_ok";
+
 	/** AnalyzeTool specific constants */
 	public final static String ANALYZE_TOOL_TITLE = "AnalyzeTool";
 	public final static String ANALYZE_TOOL_TITLE_WITH_VERSION = "AnalyzeTool v%s";
@@ -67,11 +69,22 @@
 	public final static String ACTION_CHANGE_REPORT_LEVEL_ALL = "Report detail level: All";
 	public final static String ACTION_CHANGE_REPORT_LEVEL_KNOWN = "Report detail level: Known";
 	public final static String ACTION_CHANGE_REPORT_LEVEL_TOPMOST = "Report detail level: Topmost";
-	public final static String ACTION_CHANGE_LOGGING_MODE = "Change data gathering mode";
-	public final static String ACTION_CHANGE_LOGGING_MODE_TOOLTIP_EXT = "Current mode: Monitored external";
-	public final static String ACTION_CHANGE_LOGGING_MODE_TOOLTIP_FAST = "Current mode: External";
-	public final static String ACTION_CHANGE_LOGGING_MODE_TOOLTIP_S60 = "Current mode: Monitored Internal";
-	public final static String ACTION_CHANGE_LOGGING_MODE_TOOLTIP_ASK = "Current mode: Ask always";
+	public final static String ACTION_CHANGE_LOGGING_MODE = "Change data output mode";
+
+	public static final String PREFS_EXT_FAST = "Output to trace (recommended)";
+	public static final String PREFS_EXT_FAST_TOOLTIP = "Output data to the host computer through external connection.";
+	public static final String PREFS_S60 = "Output to file system";
+	public static final String PREFS_S60_TOOLTIP = "Output data to a file in the target device.";
+	public static final String PREFS_ASK_ALWAYS = "Ask always";
+	public static final String PREFS_ASK_ALWAYS_TOOLTIP = "Ask data output mode from the user every time when building.";
+
+	public final static String ACTION_CHANGE_LOGGING_MODE_TOOLTIP_FAST = "Current mode: "
+			+ PREFS_EXT_FAST;
+	public final static String ACTION_CHANGE_LOGGING_MODE_TOOLTIP_S60 = "Current mode: "
+			+ PREFS_S60;
+	public final static String ACTION_CHANGE_LOGGING_MODE_TOOLTIP_ASK = "Current mode: "
+			+ PREFS_ASK_ALWAYS;
+
 	public final static String ACTION_SAVE = "Save raw test run data or memory leak results";
 	public final static String ACTION_SAVE_REPORT = "Save memory leak results";
 	public final static String ACTION_SAVE_DATA = "Save raw test run data";
@@ -96,7 +109,7 @@
 
 	// Selection dialog title when user builds project with AnalyzeTool and
 	// logging mode is set to "Ask always"
-	public final static String DIALOG_SELECT_LOGGING_MODE = "Select data gathering mode for AnalyzeTool";
+	public final static String DIALOG_SELECT_LOGGING_MODE = "Select data output mode for AnalyzeTool";
 
 	// generic title for all dialogs, information notes
 	public final static String DIALOG_TITLE = "AnalyzeTool";
@@ -123,8 +136,8 @@
 
 	// information text when user try to use actions and the atool.exe can not
 	// be executed
-	public static final String INFO_ATOOL_NOT_AVAILABLE = "\n\nCan not execute command line engine. \nCheck AnalyzeTool preferences.";
-	public static final String ERROR_ATOOL_NOT_AVAILABLE = "Can not execute command line engine. \nCheck AnalyzeTool preferences.";
+	public static final String INFO_ATOOL_NOT_AVAILABLE = "\n\nCommand Line Engine not available. \nCheck AnalyzeTool preferences.";
+	public static final String ERROR_ATOOL_NOT_AVAILABLE = "Command Line Engine not available. Check AnalyzeTool preferences.";
 
 	// info to user if AnalyzeTool for some reason can create results
 	public static final String INFO_FILE_INVALID = "Can not analyze. \nNo data to be analyzed.";
@@ -150,7 +163,7 @@
 	/** Tree model text */
 	// when no results are opened/available
 	public static final String INFO_NO_DATA_FILE_AVAILABLE = "No data file opened or trace data captured.";
-	/** Preference page title*/
+	/** Preference page title */
 	public static final String ATOOL_DESC = "AnalyzeTool Carbide extension configuration";
 	/** Trace capturing related text */
 	public static final String INFO_NO_DATA = "No data";
@@ -201,19 +214,33 @@
 	public static final String RUN_ABNORMAL = "Abnormal process end";
 	public static final String RUN_NO_LEAKS = "No memory leaks.";
 
-	public static final String CANCELLED = "Canceled.";
+	public static final String CANCELLED = "Cancelled.";
 
-	/**Error information if AnalyzeTool libraries are not installed*/
-	public static final String CAN_NOT_FIND_LIBRARIES = "Can not find AnalyzeTool library files from current SDK. \n\nYou can build AnalyzeTool from sources or contact " +
-			"AnalyzeTool development team to get AnalyzeTool binaries.";
+	/** Error information if AnalyzeTool libraries are not installed */
+	public static final String CAN_NOT_FIND_LIBRARIES_SUPPORT = "You can build AnalyzeTool from sources or contact AnalyzeTool development team to get AnalyzeTool binaries.";
 
-	public static final String CAN_NOT_FIND_LIBRARIES_MARKER = "Can not find AnalyzeTool library files from current SDK."; 
-	/**If user try to build with unsupported platform*/
+	public static final String CAN_NOT_FIND_LIBRARIES_MARKER = "Can not find AnalyzeTool library files from current SDK:";
+
+	/** If user try to build with unsupported platform */
 	public static final String PLATFORM_NOT_SUPPORTED = "AnalyzeTool supports only ARMV5, GCCE and WINSCW build platforms. \n\nDo you want to continue?";
 
 	public static final String TOO_OLD_ENGINE = "Current version of AnalyzeTool Engine is too old. \nRequired version must be 1.6.0 or higher.\n\nCheck AnalyzeTool preferences.";
 
-	/** Error text when trying to import unknown module to the workspace and module could not be found*/
+	public static final String MIN_CLE_SUPPORTED = "1.10.0";
+	public static final String CLE_OLDER_THAN_MIN = "Command Line Engine older than {0}. Check AnalyzeTool preferences.";
+	public static final String CLE_VERSION_MISMATCH = "Version mismatch";
+
+	public static final String AT_BINARIES_VERSION_MISMATCH = "Version mismatch between the AnalyzeTool binaries ({0}) in the device and AnalyzeTool headers in the SDK ({1}).\nPlease make sure that those match otherwise results may be unknown.";
+
+	public static final String UNSUPPORTED_FORMAT_TITLE = "Unsupported format";
+	public static final String UNSUPPORTED_FORMAT_MESSAGE = "Symbian side components are not up to date. Please see help for more information.";
+
+	public static final String TRACE_FORMAT_VERSION_IS_HIGHER = "Carbide extension is older than Symbian components. Please see help for more information.";
+
+	/**
+	 * Error text when trying to import unknown module to the workspace and
+	 * module could not be found
+	 */
 	public static final String CAN_NOT_FIND_MODULE = "Can not find module from the active SDK";
 
 	public static final String BUILD_STATE_CHANGED = "Project build state changed. \nDo you want to re-analyze results?";
@@ -233,24 +260,16 @@
 	public static final String INPUT_NO_SPACES_ALLOWED = "No spaces allowed";
 
 	public static final String MAIN_CAN_NOT_COPY = "Cannot copy: \n";
+
 	/**
 	 * Preference page constants
 	 */
-	public static final String PREFS_EXT = "Monitored external data gathering";
-	public static final String PREFS_EXT_TOOLTIP = "Gather data to the host computer through external connection.";
-	public static final String PREFS_EXT_FAST = "External data gathering";
-	public static final String PREFS_EXT_FAST_TOOLTIP = "Gather data to the host computer through external connection.";
-	public static final String PREFS_S60 = "Monitored internal data gathering";
-	public static final String PREFS_S60_TOOLTIP = "Gather data to a file in the target device.";
 	public static final String PREFS_USER_SPEC = "Name from the user";
 	public static final String PREFS_USER_SPEC_TOOLTIP = "Ask the file name from the user when building.";
 	public static final String PREFS_USE_PROCESS_NAME = "Name from the process";
 	public static final String PREFS_USE_PROCESS_NAME_TOOLTIP = "Use the process name as the name of the file.";
-	public static final String PREFS_ASK_ALWAYS = "Ask Always";
-	public static final String PREFS_ASK_ALWAYS_TOOLTIP = "Ask data gathering mode from the user every time when building.";
-	public static final String PREFS_ATOOL_VER_NOT_FOUND ="Not available";
-
-	public static final String PREFS_ATOOL_GROUP_TITLE= "AnalyzeTool Engine";
+	public static final String PREFS_ATOOL_VER_NOT_FOUND = "Not available";
+	public static final String PREFS_ATOOL_GROUP_TITLE = "AnalyzeTool Engine";
 	public static final String PREFS_USE_INTERNAL_TITLE = "Use internal command line engine";
 	public static final String PREFS_USE_EXTERNAL_TITLE = "Use external command line engine";
 	public static final String PREFS_SELECT_FOLDER = "Choose the atool.exe directory";
@@ -264,11 +283,11 @@
 	public static final String PREFS_USE_ROM_SYMBOL_TOOLTIP = "Use rom symbol file to pinpoint rom locations.";
 	public static final String PREFS_ROM_SYMBOL_PATH = "Rom symbol file:";
 	public static final String PREFS_ROM_SYMBOL_PATH_TOOLTIP = "Define which rom symbol file to use.";
-	public static final String PREFS_SELECT_ROM_SYMBOL= "Choose the rom symbol file.";
+	public static final String PREFS_SELECT_ROM_SYMBOL = "Choose the rom symbol file.";
 	public static final String PREFS_REFRESH_VERSION = "Refresh version";
 	public static final String PREFS_REPORT_LEVEL = "Report level";
 	public static final String PREFS_SHOW_EVERY = "&Show every detail";
-	public static final String PREFS_SHOW_KNOWN = "Show only known code lines(default)";
+	public static final String PREFS_SHOW_KNOWN = "Show only known code lines (default)";
 	public static final String PREFS_SHOW_TOPMOST = "Show only topmost memory allocation code line";
 	public static final String PREFS_SELECT_DIR = "Select folder";
 	public static final String PREFS_CSSIZE_TITLE = "Callstack size";
@@ -277,9 +296,10 @@
 	public static final String PREFS_HUNDRED_BUTTON = "100 items (Slows down test run a lot)";
 	public static final String PREFS_CUSTOM_BUTTON = "Custom size (0-255)";
 	public static final String PREFS_CS_SIZE_DISABLED_TOOLTIP = "Command line engine version is too old, version must be 1.7.4 or higher";
-
+	public static final String PREFS_CLE_NOT_AVAILABLE = "Command Line Engine not available.";
+	public static final String PREFS_CLE_OLDER_THAN_MIN = "Command Line Engine older than {0}.";
 
-	/**Statistics view constants*/
+	/** Statistics view constants */
 	public static final String STATISTICS_TAB_TITLE = "Top allocation locations";
 	public static final String STATISTICS_SELECT_RUN = "Select run";
 	public static final String STATISTICS_NODE_FILE = "File";
@@ -294,15 +314,12 @@
 	public static final String GRAPH_LOAD_JOB_TITLE = "AnalyzeTool Loading Graph Data...";
 	public static final String STATISTICS_NO_STATS = "No statistics available.";
 
-
 	public static final String FIND_COMP_JOB_TITLE = "Finding component locations";
 	public static final String FIND_COMP_JOB_SELECT_MODULE = "Select module";
 	// UI RELATED CONSTANTS END HERE
 
-
 	public static final String SOURCE_NOT_FOUND = "Source file not found from any project.";
 
-
 	public static final String SOURCE_FILE_EDITOR_ID = "org.eclipse.jdt.ui.SourceView";
 	/** Plug-in id */
 	public static final String PLUGINID = "com.nokia.s60tools.analyzetool";
@@ -316,34 +333,54 @@
 	/** File name which is used when generating memory analysis results */
 	public static final String FILENAME_CARBIDE = "AtoolFileToCarbide.xml";
 
-	/** Alloc */
-	public static final String ALLOC = "ALLOC";
-	/** Alloc */
-	public static final String ALLOCH = "ALLOCH";
-	/** Alloc */
-	public static final String ALLOCF = "ALLOCF";
+	/** Prefix of the old data trace format */
+	public final static String PREFIX_OLD = "PCSS";
+
+	/** Prefix to find */
+	public final static String PREFIX = "<AT>";
+
+	/** Process start string */
+	public static final String PCS = "PCS";
+
+	/** Process end string */
+	public static final String PCE = "PCE";
+
+	/** Allocation */
+	public static final String ALH = "ALH";
+	public static final String ALF = "ALF";
+
 	/** Free */
-	public static final String FREE = "FREE";
-	public static final String FREEH = "FREEH";
-	public static final String FREEF = "FREEF";
+	public static final String FRH = "FRH";
+	public static final String FRF = "FRF";
+
+	/** Reallocation */
+	public static final String RAH = "RAH";
+	public static final String RAF = "RAF";
+
+	/** DLL */
+	public static final String DLL = "DLL";
+	public static final String DLU = "DLU";
 
-	public static final String DLL_LOAD = "DLL_LOAD";
-	public static final String DLL_UNLOAD = "DLL_UNLOAD";
+	/** Thread */
+	public static final String TDS = "TDS";
+	public static final String TDE = "TDE";
+
+	/** Version */
+	public static final String VER = "VER";
+
+	/** Subtests */
+	public static final String TSS = "TSS";
+	public static final String TSE = "TSE";
+
+	/** Device info */
+	public static final String DEVINFO = "DEVINFO";
 
 	/** Memory allocation deallocation flag definitions */
 	public static final int TYPE_ALLOC = 0;
-
 	public static final int TYPE_FREE = 1;
 	public static final int TYPE_ALLOCH = 2;
 	public static final int TYPE_FREEH = 3;
 
-	/** Prefix to find */
-	public final static String PREFIX = "PCSS";
-
-	/** Process start string */
-	public static final String PROCESS_START = "PROCESS_START";
-	/** Process end string */
-	public static final String PROCESS_END = "PROCESS_END";
 	/** Button icon definitions */
 	public static final String BUTTON_RUN = "icons/btn_record.png";
 	public static final String BUTTON_STOP = "icons/btn_terminate.png";
@@ -364,15 +401,20 @@
 	public static final String ICON_OUTSIDE = "icons/module_outside.png";
 	public static final String ICON_NOT_BUILD = "icons/module_not_build.png";
 	public static final String ICON_BUILD = "icons/module_build.png";
+
 	/** Data file definitions */
 	public static final int DATAFILE_LOG = 0;
 	public static final int DATAFILE_TRACE = 1;
 	public static final int DATAFILE_XML = 2;
+	public static final int DATAFILE_BINARY = 3;
 
 	public static final int DATAFILE_INVALID = -1;
 	public static final int DATAFILE_EMPTY = -2;
+	public static final int DATAFILE_OLD_FORMAT = -3;
+	public static final int DATAFILE_UNSUPPORTED_TRACE_FORMAT = -4;
 
 	public static final String DATAFILE_VERSION = "DATA_FILE_VERSION";
+	public static final String BINARY_FILE_VERSION = "BINARY_FILE_VERSION";
 	public static final String ATOOL_TEMP = "atool_temp";
 	public static final String ATOOL_FOLDER = "atool_folder";
 	public static final String LOGGING_MODE = "logging_mode";
@@ -387,8 +429,11 @@
 	public static final String USE_CALLSTACK_SIZE = "use_user_define_cs_size";
 	public static final String REPORT_LEVEL = "report_level";
 	public static final String ATOOL_VERBOSE = "verbose_atool";
+
+	public static final String DEVICE_LOG_FILE_PATH = "device_log_file_path";
+	public static final String DEVICE_LOG_FILE_NAME = "device_log_file_name";
+
 	/** Logging mode preference values */
-	public static final String LOGGING_EXT = "EXT";
 	public static final String LOGGING_EXT_FAST = "EXT_FAST";
 	public static final String LOGGING_S60 = "S60";
 	public static final String LOGGING_ASK_ALLWAYS = "ask_always";
@@ -403,12 +448,11 @@
 	/** S60 logging mode data file name */
 	public static final String LOGGING_S60_PROCESS_NAME = "process_name";
 	public static final String LOGGING_S60_USER_SPECIFIED = "user_secified";
-	
+
 	/** Save report file types */
 	public static final int SAVE_REPORT_FILE_DATA = 0;
 	public static final int SAVE_REPORT_FILE_XML = 1;
 
-
 	public static final String BUILD_TARGET_WINSCW = "WINSCW";
 	public static final String BUILD_TARGET_ARMV5 = "ARMV5";
 	public static final String BUILD_TARGET_GCEE = "GCCE";
@@ -416,9 +460,9 @@
 	/** Default preference values */
 	public static final String DEFAULT_ATOOL_FOLDER = "c:\\apps\\atool\\";
 
-	public static final String DEFAULT_LOGGING_MODE = Constants.LOGGING_EXT;
+	public static final String DEFAULT_LOGGING_MODE = Constants.LOGGING_EXT_FAST;
 	public static final String DEFAULT_REPORT_LEVEL = Constants.REPORT_KNOWN;
-	public static final String PREFS_LOGGING_MODE_TITLE = "Data gathering mode";
+	public static final String PREFS_LOGGING_MODE_TITLE = "Output mode";
 
 	public static final int ANALYZE_ASK_FOR_USER = 0;
 	public static final int ANALYZE_USE_DATA_FILE = 1;
@@ -431,9 +475,9 @@
 	public static final int SAVE_DATA_FILE_CANCEL = 2;
 
 	public static final String ATOOL_INST = "-inst";
-	public static final String ATOOL_INST_E = "-instrument_e";
 	public static final String ATOOL_INST_EF = "-instrument_ef";
 	public static final String ATOOL_INST_I = "-instrument_i";
+
 	public static final String ATOOL_UNINST = "-uninstrument";
 	public static final String ATOOL_USE_VARIANT = "-variant";
 	public static final String ATOOL_UNINST_FAILED = "-uninstrument_failed";
@@ -445,13 +489,11 @@
 
 	public static final int HISTORY_LEVEL = 5;
 
-	//version number comparision constants
+	// version number comparison constants
 	public static final int VERSION_NUMBERS_INVALID = -1;
 	public static final int VERSION_NUMBERS_FIRST = 0;
 	public static final int VERSION_NUMBERS_SECOND = 1;
 	public static final int VERSION_NUMBERS_EQUALS = 2;
-	public static final String MIN_VERSION = "1.6.0";
-	public static final String CS_SUPPORT_MIN_VERSION = "1.7.4";
 
 	public static final String UNKNOWN = "Unknown";
 
@@ -461,70 +503,58 @@
 	public static final String PREFS_CONC_BUILD = "useConcBuild";
 	public static final String PREFS_BUILD_CANCELLED = "buildCancelled";
 
-	// List of libraries what AnalyzeTool needs when compiled applications on armv5 platform
+	// List of libraries what AnalyzeTool needs when compiled applications on
+	// armv5 platform
 	public static final String atoolLibs[] = {
-		"epoc32\\RELEASE\\armv5\\LIB\\AToolMemoryHook.lib",
-		"epoc32\\RELEASE\\armv5\\udeb\\AtoolStaticLib.lib",
-		"epoc32\\RELEASE\\armv5\\urel\\AtoolStaticLib.lib"
-	};
+			"epoc32\\RELEASE\\armv5\\LIB\\AToolMemoryHook.lib",
+			"epoc32\\RELEASE\\armv5\\udeb\\AtoolStaticLib.lib",
+			"epoc32\\RELEASE\\armv5\\urel\\AtoolStaticLib.lib" };
 
-	// List of libraries what AnalyzeTool needs when compiled applications on armv5 platform (using sbs2 / ABIV2 binaries)
-	public static final String  atoolLibsSbs2[] = {
-		"epoc32\\RELEASE\\armv5\\LIB\\AToolMemoryHook.dso",
-		"epoc32\\RELEASE\\armv5\\udeb\\AtoolStaticLib.lib",
-		"epoc32\\RELEASE\\armv5\\urel\\AtoolStaticLib.lib"
-	};
+	// List of libraries what AnalyzeTool needs when compiled applications on
+	// armv5 platform (using sbs2 / ABIV2 binaries)
+	public static final String atoolLibsSbs2[] = {
+			"epoc32\\RELEASE\\armv5\\LIB\\AToolMemoryHook.dso",
+			"epoc32\\RELEASE\\armv5\\udeb\\AtoolStaticLib.lib",
+			"epoc32\\RELEASE\\armv5\\urel\\AtoolStaticLib.lib" };
 
-	// List of libraries what AnalyzeTool needs when compiled applications on winscw platform
-	public static final String  atoolLibsWinscw[] = {
-		"epoc32\\RELEASE\\winscw\\udeb\\AToolMemoryHook.lib",
-		"epoc32\\RELEASE\\winscw\\udeb\\AtoolStaticLib.lib",
-		"epoc32\\RELEASE\\winscw\\urel\\AtoolStaticLib.lib"
-	};
+	// List of libraries what AnalyzeTool needs when compiled applications on
+	// winscw platform
+	public static final String atoolLibsWinscw[] = {
+			"epoc32\\RELEASE\\winscw\\udeb\\AToolMemoryHook.lib",
+			"epoc32\\RELEASE\\winscw\\udeb\\AtoolStaticLib.lib",
+			"epoc32\\RELEASE\\winscw\\urel\\AtoolStaticLib.lib" };
 
 	public static enum COMMAND_LINE_ERROR_CODE {
-		EXECUTE_ERROR(-1),
-		OK(0),
+		EXECUTE_ERROR(-1), OK(0),
 		/* instrument errors */
-		INVALID_ARGUMENT_ERROR(1), 
-		CANNOT_FIND_EPOCROOT(3),
-		MAKEFILE_ERROR(5),
-		NO_SUPPORTED_MODULES_ERROR(8),
+		INVALID_ARGUMENT_ERROR(1), CANNOT_FIND_EPOCROOT(3), MAKEFILE_ERROR(5), NO_SUPPORTED_MODULES_ERROR(
+				8),
 		/* Analyze errors */
-		WRONG_DATA_FILE_VERSION(10),
-		ANALYZE_ERROR(12),
-		EMPTY_DATA_FILE(13),
-		SYMBOL_FILE_ERROR(14),
-		DATA_FILE_EMPTY(31),
-		DATA_FILE_INVALID(32),
+		WRONG_DATA_FILE_VERSION(10), ANALYZE_ERROR(12), EMPTY_DATA_FILE(13), SYMBOL_FILE_ERROR(
+				14), DATA_FILE_EMPTY(31), DATA_FILE_INVALID(32), DATA_FILE_OLD_FORMAT(
+				33), DATA_FILE_UNSUPPORTED_TRACE_FORMAT(34),
 		/* building&releasing errors */
-		RELEASABLES_ERROR(20),
-		RESTORE_MODULES_ERROR(21),
-		CREATING_TEMP_CPP_ERROR(22),
-		CLEANING_TEMP_ERROR(23),
-		READ_MAKEFILE_ERROR(24),
-		MODIFY_MODULES_ERROR(25),
-		INVALID_MMP_DEFINED(27),
+		RELEASABLES_ERROR(20), RESTORE_MODULES_ERROR(21), CREATING_TEMP_CPP_ERROR(
+				22), CLEANING_TEMP_ERROR(23), READ_MAKEFILE_ERROR(24), MODIFY_MODULES_ERROR(
+				25), INVALID_MMP_DEFINED(27),
 
 		/* User issued exit */
 		UNKNOWN_ERROR(999);
 		private final int code;
 
 		COMMAND_LINE_ERROR_CODE(int c) {
-		   code = c;
-		 }
+			code = c;
+		}
 
-		 public int getCode() {
-		   return code;
-		 }
+		public int getCode() {
+			return code;
+		}
 	}
-	
-	
+
 	static final String AT_CORE_INCLUDE_FILE_WITH_VERSION_NUMBER[] = {
 			"epoc32\\include\\domain\\osextensions\\analyzetool\\analyzetool.h",
 			"epoc32\\include\\oem\\analyzetool\\analyzetool.h",
-			"epoc32\\include\\platform\\analyzetool\\analyzetool.h"
-		};
-	
-	static final String AT_CORE_VERSION_NUMBER_TAG="ANALYZETOOL_CORE_VERSION_FOR_CLE";
+			"epoc32\\include\\platform\\analyzetool\\analyzetool.h" };
+
+	static final String AT_CORE_VERSION_NUMBER_TAG = "ANALYZETOOL_CORE_VERSION_FOR_CLE";
 }
--- a/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/global/Util.java	Tue Aug 24 12:10:03 2010 +0300
+++ b/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/global/Util.java	Tue Aug 24 12:16:27 2010 +0300
@@ -28,6 +28,7 @@
 import java.util.AbstractList;
 import java.util.ArrayList;
 import java.util.Iterator;
+import java.util.List;
 
 import org.eclipse.cdt.core.model.ICModelMarker;
 import org.eclipse.core.resources.IMarker;
@@ -44,13 +45,25 @@
 import org.eclipse.core.runtime.Platform;
 import org.eclipse.core.runtime.Status;
 import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.dialogs.MessageDialog;
 import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.resource.JFaceResources;
 import org.eclipse.jface.viewers.ArrayContentProvider;
 import org.eclipse.jface.viewers.LabelProvider;
 import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.DisposeEvent;
+import org.eclipse.swt.events.DisposeListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Cursor;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.FileDialog;
 import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.ToolBar;
+import org.eclipse.swt.widgets.ToolItem;
 import org.eclipse.ui.IWorkbenchPage;
 import org.eclipse.ui.IWorkbenchPart;
 import org.eclipse.ui.PlatformUI;
@@ -70,10 +83,13 @@
 import com.nokia.carbide.cpp.epoc.engine.model.mmp.IMMPData;
 import com.nokia.carbide.cpp.epoc.engine.preprocessor.AcceptedNodesViewFilter;
 import com.nokia.s60tools.analyzetool.Activator;
+import com.nokia.s60tools.analyzetool.AnalyzeToolHelpContextIDs;
 import com.nokia.s60tools.analyzetool.builder.AnalyzeToolBuilder;
 import com.nokia.s60tools.analyzetool.engine.MMPInfo;
 import com.nokia.s60tools.analyzetool.engine.UseAtool;
 import com.nokia.s60tools.analyzetool.global.Constants.COMMAND_LINE_ERROR_CODE;
+import com.nokia.s60tools.analyzetool.ui.CustomMessageDialog;
+import com.nokia.s60tools.analyzetool.ui.OutputModeDialog;
 
 /**
  * Provides commonly used functions.
@@ -92,6 +108,8 @@
 	/** Contains user selection (String) in the selection dialog. */
 	private static String userSelection = "";
 
+	private static String[] outputMode = new String[3];
+
 	/** Contains StringBuffer size. */
 	private static int bufferSize = 32;
 
@@ -141,13 +159,13 @@
 	}
 
 	/**
-	 * Checks is AnalyzeTool libraries installed from the current SDK.
+	 * Checks AnalyzeTool libraries from the current SDK.
 	 * 
 	 * @param cpi
 	 *            {@link ICarbideProjectInfo} reference
-	 * @return True if libraries are installed otherwise false.
+	 * @return error message or Constants.ATOOL_LIBS_OK if libraries are OK
 	 */
-	public static boolean checkAtoolLibs(final ICarbideProjectInfo cpi) {
+	public static String checkAtoolLibs(final ICarbideProjectInfo cpi) {
 		// get active platform
 		String platform = cpi.getDefaultConfiguration().getPlatformString();
 
@@ -155,57 +173,61 @@
 		IPath epocRootPath = EpocEngineHelper.getEpocRootForProject(cpi
 				.getProject());
 
-		// check that epocroot path found
+		// check that epoc root path was found
 		if (epocRootPath == null) {
-			return false;
+			return "EPOCROOT directory of the SDK for the active build configuration of the project not found.";
 		}
 
 		String epocroot = epocRootPath.toOSString();
-		boolean found = true;
-		StringBuffer fileBuffer = new StringBuffer(bufferSize);
-		fileBuffer.append(Constants.CAN_NOT_FIND_LIBRARIES_MARKER);
-		fileBuffer.append(": ");
+
+		List<String> missingAtoolLibsList = new ArrayList<String>();
+
 		if ((Constants.BUILD_TARGET_WINSCW).equalsIgnoreCase(platform)) {
-			for (int i = 0; i < Constants.atoolLibsSbs2.length; i++) {
-				java.io.File file = new java.io.File(epocroot
-						+ Constants.atoolLibsWinscw[i]);
+			for (int i = 0; i < Constants.atoolLibsWinscw.length; i++) {
+				File file = new File(epocroot + Constants.atoolLibsWinscw[i]);
 				if (!file.exists()) {
-					found = false;
-					fileBuffer.append(epocroot);
-					fileBuffer.append(Constants.atoolLibsWinscw[i]);
-					fileBuffer.append(' ');
+					missingAtoolLibsList.add(epocroot
+							+ Constants.atoolLibsWinscw[i]);
 				}
 			}
 		} else if ((Constants.BUILD_TARGET_ARMV5).equalsIgnoreCase(platform)) {
 			if (AnalyzeToolBuilder.isSBSBuildActivated(cpi)) {
 				for (int i = 0; i < Constants.atoolLibsSbs2.length; i++) {
-					java.io.File file = new java.io.File(epocroot
-							+ Constants.atoolLibsSbs2[i]);
+					File file = new File(epocroot + Constants.atoolLibsSbs2[i]);
 					if (!file.exists()) {
-						found = false;
-						fileBuffer.append(epocroot);
-						fileBuffer.append(Constants.atoolLibsSbs2[i]);
-						fileBuffer.append(' ');
+						missingAtoolLibsList.add(epocroot
+								+ Constants.atoolLibsSbs2[i]);
 					}
 				}
 			} else {
 				for (int i = 0; i < Constants.atoolLibs.length; i++) {
-					java.io.File file = new java.io.File(epocroot
-							+ Constants.atoolLibs[i]);
+					File file = new File(epocroot + Constants.atoolLibs[i]);
 					if (!file.exists()) {
-						found = false;
-						fileBuffer.append(epocroot);
-						fileBuffer.append(Constants.atoolLibs[i]);
-						fileBuffer.append(' ');
+						missingAtoolLibsList.add(epocroot
+								+ Constants.atoolLibs[i]);
 					}
 				}
 			}
 		}
-		if (!found) {
-			createErrorMarker(cpi.getProject(), fileBuffer.toString());
+
+		if (missingAtoolLibsList.size() > 0) {
+			StringBuffer fileBuffer = new StringBuffer(bufferSize);
+
+			fileBuffer.append(Constants.CAN_NOT_FIND_LIBRARIES_MARKER);
+			fileBuffer.append("\n\n");
+
+			for (String string : missingAtoolLibsList) {
+				fileBuffer.append(string);
+				fileBuffer.append("\n");
+			}
+
+			fileBuffer.append("\n");
+			fileBuffer.append(Constants.CAN_NOT_FIND_LIBRARIES_SUPPORT);
+
+			return fileBuffer.toString();
 		}
 
-		return found;
+		return Constants.ATOOL_LIBS_OK;
 	}
 
 	/**
@@ -372,7 +394,6 @@
 		fileDialog.setText(title);
 		fileDialog.setFilterExtensions(ext);
 		return fileDialog.open();
-
 	}
 
 	/**
@@ -398,7 +419,7 @@
 			store.setValue(Constants.USE_INTERNAL, true);
 			atoolInstallFolder.append(getDefaultAtoolLocation());
 		} else if (folder.equals(Constants.DEFAULT_ATOOL_FOLDER)) {
-			java.io.File file = new java.io.File(Constants.DEFAULT_ATOOL_FOLDER);
+			File file = new File(Constants.DEFAULT_ATOOL_FOLDER);
 			if (file.exists()) {
 				atoolInstallFolder.append(Constants.DEFAULT_ATOOL_FOLDER);
 			} else {
@@ -658,6 +679,29 @@
 		return infDir + "\\atool_temp\\";
 	}
 
+	public static ToolBar createHelpControl(Composite parent) {
+		ToolBar toolBar = new ToolBar(parent, SWT.FLAT | SWT.NO_FOCUS);
+		((GridLayout) parent.getLayout()).numColumns++;
+		toolBar.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_CENTER));
+		final Cursor cursor = new Cursor(parent.getDisplay(), SWT.CURSOR_HAND);
+		toolBar.setCursor(cursor);
+		toolBar.addDisposeListener(new DisposeListener() {
+			public void widgetDisposed(DisposeEvent e) {
+				cursor.dispose();
+			}
+		});
+		ToolItem item = new ToolItem(toolBar, SWT.NONE);
+		item.setImage(JFaceResources.getImage(Dialog.DLG_IMG_HELP));
+		item.setToolTipText(JFaceResources.getString("helpToolTip")); //$NON-NLS-1$
+		item.addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e) {
+				PlatformUI.getWorkbench().getHelpSystem().displayHelp(
+						AnalyzeToolHelpContextIDs.ANALYZE_TROUBLESHOOTING);
+			}
+		});
+		return toolBar;
+	}
+
 	/**
 	 * Gets cpp file name and path.
 	 * 
@@ -763,7 +807,6 @@
 				return true;
 			}
 		}
-
 		return false;
 	}
 
@@ -808,7 +851,6 @@
 			}
 		}
 		return false;
-
 	}
 
 	/**
@@ -1087,6 +1129,29 @@
 		return userSelection;
 	}
 
+	public static String[] openOutputModeDialog() {
+		Activator.getDefault().getWorkbench().getDisplay().syncExec(
+				new Runnable() {
+					public void run() {
+						OutputModeDialog outputModeDialog = new OutputModeDialog(
+								new Shell());
+						outputModeDialog.open();
+						if (outputModeDialog.getReturnCode() == Dialog.OK) {
+							outputMode[0] = outputModeDialog.getOutputMode();
+							if (outputModeDialog.getOutputMode().equals(
+									Constants.LOGGING_S60)) {
+								outputMode[1] = outputModeDialog.getLogPath();
+								outputMode[2] = outputModeDialog.getFileName();
+							}
+						} else {
+							outputMode = null;
+						}
+					}
+				});
+
+		return outputMode;
+	}
+
 	/**
 	 * Displays error message.
 	 * 
@@ -1102,7 +1167,28 @@
 						Constants.DIALOG_TITLE, message);
 			}
 		});
+	}
 
+	/**
+	 * Displays error message with title.
+	 * 
+	 * @param title
+	 *            dialog title
+	 * @param message
+	 *            error message
+	 * @param icon
+	 *            message icon
+	 */
+	public static void showMessageDialog(final String title,
+			final String message, final int icon) {
+
+		PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
+			public void run() {
+				new CustomMessageDialog(PlatformUI.getWorkbench()
+						.getActiveWorkbenchWindow().getShell(), title, message,
+						icon).open();
+			}
+		});
 	}
 
 	/**
@@ -1122,7 +1208,6 @@
 						Constants.DIALOG_TITLE, message);
 			}
 		});
-
 	}
 
 	/**
@@ -1246,7 +1331,7 @@
 				} else {
 					return Constants.VERSION_NUMBERS_SECOND;
 				}
-
+			
 			} catch (NumberFormatException nfe) {
 				nfe.printStackTrace();
 				return Constants.VERSION_NUMBERS_INVALID;
@@ -1342,6 +1427,20 @@
 					"AnalyzeTool - Invalid data file.");
 			break;
 
+		case DATA_FILE_OLD_FORMAT:
+			Util.showMessageDialog(Constants.UNSUPPORTED_FORMAT_TITLE,
+					Constants.UNSUPPORTED_FORMAT_MESSAGE, SWT.ICON_ERROR);
+			Activator.getDefault().logInfo(IStatus.ERROR, IStatus.ERROR,
+					"AnalyzeTool - Unsupported format.");
+			break;
+
+		case DATA_FILE_UNSUPPORTED_TRACE_FORMAT:
+			Util.showMessageDialog(Constants.UNSUPPORTED_FORMAT_TITLE,
+					Constants.TRACE_FORMAT_VERSION_IS_HIGHER, SWT.ICON_ERROR);
+			Activator.getDefault().logInfo(IStatus.ERROR, IStatus.ERROR,
+					"AnalyzeTool - Unsupported trace format.");
+			break;
+
 		case RELEASABLES_ERROR:
 			Util
 					.showErrorMessage("AnalyzeTool can not copy needed files, therefore callstack can not be displayed when analyzing data."
@@ -1402,7 +1501,6 @@
 			Activator.getDefault().logInfo(IStatus.ERROR, IStatus.ERROR,
 					"AnalyzeTool - unknown error.");
 			break;
-
 		}
 	}
 
@@ -1423,4 +1521,4 @@
 		}
 		return COMMAND_LINE_ERROR_CODE.UNKNOWN_ERROR;
 	}
-}
+}
\ No newline at end of file
--- a/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/internal/engine/MemoryActivityModel.java	Tue Aug 24 12:10:03 2010 +0300
+++ b/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/internal/engine/MemoryActivityModel.java	Tue Aug 24 12:16:27 2010 +0300
@@ -28,7 +28,7 @@
 /**
  * AnalyseGraphModel
  * this class fills a model suitable for AnalyseTool graph
- * the model is initialised from the constructor.  
+ * the model is initialized from the constructor.  
  *
  */
 public class MemoryActivityModel implements IMemoryActivityModel {
--- a/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/internal/ui/graph/AnalyzeToolGraph.java	Tue Aug 24 12:10:03 2010 +0300
+++ b/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/internal/ui/graph/AnalyzeToolGraph.java	Tue Aug 24 12:16:27 2010 +0300
@@ -15,6 +15,7 @@
  *
  */
 package com.nokia.s60tools.analyzetool.internal.ui.graph;
+
 import java.beans.PropertyChangeEvent;
 import java.beans.PropertyChangeListener;
 import java.util.AbstractList;
@@ -78,10 +79,10 @@
 import com.nokia.s60tools.analyzetool.ui.ResourceVisitor;
 
 /**
- * A FigureCanvas containing the graph and X-axis area of the 
- * AnalyzeTool chart.
+ * A FigureCanvas containing the graph and X-axis area of the AnalyzeTool chart.
  */
-public class AnalyzeToolGraph extends FigureCanvas implements IMemoryActivityModelChangeListener {
+public class AnalyzeToolGraph extends FigureCanvas implements
+		IMemoryActivityModelChangeListener {
 
 	private static final int BOUNDARY_OFFSET = 3;
 	/** used for range model listener */
@@ -89,37 +90,47 @@
 	private static final int X_AXIS_HEIGHT = 50;
 	/** used for "Don't ask again" dialog */
 	private static final String PROMPT_KEY = "GraphOptimisationPrompt";//$NON-NLS-1$
-	
-	/** the scaling factor used for scaling the x-axis*/
+
+	/** the scaling factor used for scaling the x-axis */
 	private double scale = 1.0;
 
 	/** the model */
 	private IMemoryActivityModel model;
 
-	/** for synchronisation with the PropertySheet */
+	/** for synchronization with the PropertySheet */
 	private DotSelectionProvider iDotsSelecProv = new DotSelectionProvider();
 	private IWorkbenchPartSite site;
-	
+
 	/** used when user selects a dot on the graph, and moves with arrow keys */
 	private ISelection iCurrentSelectedDot = null;
-	
+
 	/** controls mouse and arrow key movements */
 	private MouseAndKeyController mc;
 	private SymReader iSymReader = null;
 	private IProject iCurrentProject = null;
 	/** Contains c++ files info for the current project. */
 	private final AbstractList<String> cppFileNames;
-	
-	/** "time ->" on axis*/
+
+	/** "time ->" on axis */
 	private Image timeImage;
 	private GraphPartServiceListener iGraphPartServiceListener;
 	private boolean optimisedDrawing;
 	private boolean userInformed;
 
+	/**
+	 * The threshold value for filtered drawing of dots. Only draw the dot if
+	 * the memory operation size is above or equals / below or equals the
+	 * threshold. Zero for no filtering.
+	 */
+	private long threshold;
+	/** indicates whether filtering is above or below the threshold */
+	private boolean aboveThreshold;
 
 	/**
 	 * Constructor
-	 * @param parent The parent composite
+	 * 
+	 * @param parent
+	 *            The parent composite
 	 */
 	public AnalyzeToolGraph(Composite parent) {
 		super(parent);
@@ -132,32 +143,40 @@
 	}
 
 	/**
-	 * Draws the graph on the canvas. Intended to be called on a paint event. 
+	 * Draws the graph on the canvas. Intended to be called on a paint event.
+	 * 
 	 * @param graphics
 	 */
 	public void paint(final Graphics graphics) {
-		if (optimisedDrawing && !userInformed){
+		if (optimisedDrawing && !userInformed) {
 			userInformed = true;
 			IPreferenceStore preferenceStore = Activator.getPreferences();
-            if (!preferenceStore.getString(PROMPT_KEY).equals(MessageDialogWithToggle.ALWAYS)) {
-                String dilaogTitle = "Optimised Graph";
-                String message = "The process contains too many memory operations to display efficiently. To optimise, only leaks will be indicated on the graph.";
-                String toggleMessage = "Don't show this again";
+			if (!preferenceStore.getString(PROMPT_KEY).equals(
+					MessageDialogWithToggle.ALWAYS)) {
+				String dilaogTitle = "Optimised Graph";
+				String message = "The process contains too many memory operations to display efficiently. To optimise, only leaks will be indicated on the graph.";
+				String toggleMessage = "Don't show this again";
 
-                MessageDialogWithToggle.openInformation(getShell(), dilaogTitle, message, toggleMessage, false, preferenceStore, PROMPT_KEY);
-            }
+				MessageDialogWithToggle.openInformation(getShell(),
+						dilaogTitle, message, toggleMessage, false,
+						preferenceStore, PROMPT_KEY);
+			}
 		}
-		Rectangle visibleRect = graphics.getClip(new org.eclipse.draw2d.geometry.Rectangle());
-		YConverter yConverter = new YConverter(getClientArea().height, model.getHighestCumulatedMemoryAlloc());
+		Rectangle visibleRect = graphics.getClip(new Rectangle());
+		YConverter yConverter = new YConverter(getClientArea().height, model
+				.getHighestCumulatedMemoryAlloc());
 
-		if (model.getSelectedProcess() != null && model.getSelectedProcess().getAllocsFrees().size() > 0){
-			PointList pts = new PointList((model.getSelectedProcess().getAllocsFrees().size()*2)-1);
+		if (model.getSelectedProcess() != null
+				&& model.getSelectedProcess().getAllocsFrees().size() > 0) {
+			PointList pts = new PointList((model.getSelectedProcess()
+					.getAllocsFrees().size() * 2) - 1);
 			Point prevPt = null;
 			List<Point> dotLocations = new ArrayList<Point>();
 			List<Integer> colorDotLocations = new ArrayList<Integer>();
 
 			for (BaseInfo info : model.getSelectedProcess().getAllocsFrees()) {
-				int x_point = (int) ((info.getTime() - model.getFirstProcessTime()) / getScale());
+				int x_point = (int) ((info.getTime() - model
+						.getFirstProcessTime()) / getScale());
 				int y_point = yConverter.bytesToY(info.getTotalMem());
 
 				if (y_point < 0) {
@@ -167,9 +186,13 @@
 					pts.addPoint(x_point, prevPt.y);
 				}
 				Point nextPt = new Point(x_point, y_point);
-				if (visibleRect.contains(nextPt) && (isLeak(info) || (!optimisedDrawing && !dotLocations.contains(nextPt)))){
-					//for improved performance, only draw dots that are in visible clip area
-					//and don't draw a dot if there is one already, unless it's a leak
+				if (visibleRect.contains(nextPt)
+						&& (isLeak(info) || (!optimisedDrawing
+								&& !dotLocations.contains(nextPt) && validInThreshold(info)))) {
+					// for improved performance, only draw dots that are in
+					// visible clip area
+					// and don't draw a dot if there is one already, unless it's
+					// a leak
 					dotLocations.add(nextPt);
 					colorDotLocations.add(getColorForAllocType(info));
 				}
@@ -177,51 +200,90 @@
 				prevPt = nextPt;
 			}
 
-			if (pts.size() > 0){
+			if (pts.size() > 0) {
 				graphics.pushState();
-				
-				graphics.setForegroundColor(Display.getDefault().getSystemColor(SWT.COLOR_DARK_YELLOW));
+
+				graphics.setForegroundColor(Display.getDefault()
+						.getSystemColor(SWT.COLOR_DARK_YELLOW));
 				graphics.setLineWidthFloat(optimisedDrawing ? 0.5f : 2.0f);
 				graphics.drawPolyline(pts);
-				
+
 				graphics.setLineWidthFloat(optimisedDrawing ? 0.5f : 1.0f);
 				graphics.setAntialias(SWT.ON);
-				graphics.setForegroundColor(Display.getDefault().getSystemColor(SWT.COLOR_RED));
-				graphics.setBackgroundColor(Display.getDefault().getSystemColor(SWT.COLOR_RED));
+				graphics.setForegroundColor(Display.getDefault()
+						.getSystemColor(SWT.COLOR_RED));
+				graphics.setBackgroundColor(Display.getDefault()
+						.getSystemColor(SWT.COLOR_RED));
 				int colourCode = SWT.COLOR_RED;
 				for (int j = 0; j < dotLocations.size(); j++) {
 					Point dotLocation = dotLocations.get(j);
-					if (!optimisedDrawing && colorDotLocations.get(j) != colourCode) {
+					if (!optimisedDrawing
+							&& colorDotLocations.get(j) != colourCode) {
 						colourCode = colorDotLocations.get(j);
-						graphics.setBackgroundColor(Display.getDefault().getSystemColor(colourCode));
+						graphics.setBackgroundColor(Display.getDefault()
+								.getSystemColor(colourCode));
 					}
 					// paint the dot
-					graphics.fillOval(dotLocation.x - 2, dotLocation.y - 2,	5, 5);
+					graphics.fillOval(dotLocation.x - 2, dotLocation.y - 2, 5,
+							5);
 					if (!optimisedDrawing && colourCode == SWT.COLOR_RED) {
 						// draw a red line
-						graphics.drawLine(dotLocation.x, dotLocation.y,	dotLocation.x, yConverter.bytesToY(0));
+						graphics.drawLine(dotLocation.x, dotLocation.y,
+								dotLocation.x, yConverter.bytesToY(0));
 					}
 				}
 				graphics.popState();
 			}
 		}
 	}
-	
-	
 
 	/**
-	 * Draws the background grid on the canvas. Intended to be called on a paint event.
+	 * Returns true of the size of the alloc or free is greater or equals / less
+	 * or equals the threshold. Returns true if no threshold is set.
+	 * 
+	 * @param info
+	 *            the memory operation to check
+	 * @return
+	 */
+	private boolean validInThreshold(BaseInfo info) {
+		if (threshold <= 0
+				|| info instanceof AllocInfo
+				&& (aboveThreshold ? (((AllocInfo) info).getSizeInt() >= threshold)
+						: (((AllocInfo) info).getSizeInt() <= threshold))) {
+			return true;
+		}
+
+		if (info instanceof FreeInfo
+				&& ((aboveThreshold && ((FreeInfo) info).getSizeInt() >= threshold) || (!aboveThreshold && ((FreeInfo) info)
+						.getSizeInt() <= threshold))) {
+			// check at least one of its alloc qualifies
+			for (AllocInfo allocInfo : ((FreeInfo) info).getFreedAllocs()) {
+				if ((aboveThreshold && allocInfo.getSizeInt() >= threshold)
+						|| (!aboveThreshold && allocInfo.getSizeInt() <= threshold)) {
+					return true;
+				}
+			}
+		}
+		return false;
+	}
+
+	/**
+	 * Draws the background grid on the canvas. Intended to be called on a paint
+	 * event.
+	 * 
 	 * @param graphics
 	 */
 	public void drawBackGroundLines(Graphics graphics) {
-		Rectangle canvasRect = graphics.getClip(new org.eclipse.draw2d.geometry.Rectangle());
+		Rectangle canvasRect = graphics
+				.getClip(new org.eclipse.draw2d.geometry.Rectangle());
 		graphics.setForegroundColor(ColorUtil.COLOR_100); // middle grey
 		graphics.setBackgroundColor(ColorUtil.COLOR_170); // lighter grey
 
 		int height = getClientArea().height;
 		int width = getClientArea().width;
 
-		graphics.fillRectangle(new Rectangle(canvasRect.x, 0, width, height - X_AXIS_HEIGHT));
+		graphics.fillRectangle(new Rectangle(canvasRect.x, 0, width, height
+				- X_AXIS_HEIGHT));
 
 		double visY = height - X_AXIS_HEIGHT;
 
@@ -237,13 +299,13 @@
 
 		graphics.setForegroundColor(ColorUtil.COLOR_100);
 		graphics.setBackgroundColor(ColorUtil.WHITE);
-		
-		int alignedLeftEdge = (canvasRect.x / 50)*50;
+
+		int alignedLeftEdge = (canvasRect.x / 50) * 50;
 
 		// vertical lines (one darker, one lighter vertical line in turns every
 		// 50 points in width)
 		if (width > 0) {
-			for (int x = alignedLeftEdge ; x <= canvasRect.x + canvasRect.width; x += 50) {
+			for (int x = alignedLeftEdge; x <= canvasRect.x + canvasRect.width; x += 50) {
 				if (x % 100 == 0)
 					graphics.setForegroundColor(ColorUtil.COLOR_100);
 				else
@@ -260,19 +322,23 @@
 		graphics.setBackgroundColor(ColorUtil.WHITE);
 
 		for (int x = alignedLeftEdge; x <= canvasRect.x + canvasRect.width; x += 50) {
-			String timeStringWithUnits = GraphUtils.getTimeStringWithUnits(x * scale);
+			String timeStringWithUnits = GraphUtils.getTimeStringWithUnits(x
+					* scale);
 			graphics.drawString(timeStringWithUnits, x + 5, height - 13);
 		}
-		if (timeImage == null){
-			timeImage = GraphUtils.getVerticalLabel("Time");			
+		if (timeImage == null) {
+			timeImage = GraphUtils.getVerticalLabel("Time");
 		}
 		graphics.drawImage(timeImage, width / 2, height - 30);
 	}
 
 	/**
 	 * Returns the content of the tooltip appropriate for the given coordinate
-	 * @param x the X-coordinate
-	 * @param y the Y-coordinate
+	 * 
+	 * @param x
+	 *            the X-coordinate
+	 * @param y
+	 *            the Y-coordinate
 	 * @return String containing the content of the tooltip
 	 */
 	public String getToolTipText(int x, int y) {
@@ -287,32 +353,37 @@
 
 		double timeInMs = (x * getScale());// x value in milliseconds
 
-		YConverter yConverter = new YConverter(getClientArea().height, model.getHighestCumulatedMemoryAlloc());
+		YConverter yConverter = new YConverter(getClientArea().height, model
+				.getHighestCumulatedMemoryAlloc());
 		double bytes = yConverter.yToBytes(y); // y value in bytes
 
-		text.append(GraphUtils.renderTime(timeInMs)); 
+		text.append(GraphUtils.renderTime(timeInMs));
 
-		BaseInfo allocInfo = findClosestAlloc((int) timeInMs, (int) ((x - BOUNDARY_OFFSET) * getScale()), (int) ((x + BOUNDARY_OFFSET) * getScale()),
-				(int) bytes, (int) yConverter.yToBytes(y + BOUNDARY_OFFSET), (int) yConverter.yToBytes(y - BOUNDARY_OFFSET));
+		BaseInfo allocInfo = findClosestAlloc((int) timeInMs,
+				(int) ((x - BOUNDARY_OFFSET) * getScale()),
+				(int) ((x + BOUNDARY_OFFSET) * getScale()), (int) bytes,
+				(int) yConverter.yToBytes(y + BOUNDARY_OFFSET),
+				(int) yConverter.yToBytes(y - BOUNDARY_OFFSET));
 		if (allocInfo != null) {
 			text.append(String.format("%n%s: %,d B%nTotal: %,d B",
-					getMemOpString(allocInfo), 
-					Math.abs(allocInfo.getSizeInt()), 
-					allocInfo.getTotalMem()));
+					getMemOpString(allocInfo),
+					Math.abs(allocInfo.getSizeInt()), allocInfo.getTotalMem()));
 		} else {
 			text.append(", " + GraphUtils.formatBytes(bytes));
 		}
-
 		return text.toString();
 	}
-	
+
 	/**
 	 * Returns a string representation of the type of the given memory operation
-	 * @param allocInfo the memory operation to use
-	 * @return 
+	 * 
+	 * @param allocInfo
+	 *            the memory operation to use
+	 * @return
 	 */
-	private String getMemOpString(BaseInfo allocInfo){
-		return allocInfo instanceof AllocInfo ? (((AllocInfo) allocInfo).isFreed() ? "Alloc" : "Leak"  ): "Free";
+	private String getMemOpString(BaseInfo allocInfo) {
+		return allocInfo instanceof AllocInfo ? (((AllocInfo) allocInfo)
+				.isFreed() ? "Alloc" : "Leak") : "Free";
 	}
 
 	/**
@@ -331,9 +402,14 @@
 			return null;
 		}
 
-		YConverter yConverter = new YConverter(getClientArea().height, model.getHighestCumulatedMemoryAlloc());
-		return findClosestAlloc((int) (x * getScale()), (int) ((x - BOUNDARY_OFFSET) * getScale()), (int) ((x + BOUNDARY_OFFSET) * getScale()),
-				(int) (yConverter.yToBytes(y)), (int) yConverter.yToBytes(y + BOUNDARY_OFFSET), (int) yConverter.yToBytes(y - BOUNDARY_OFFSET));
+		YConverter yConverter = new YConverter(getClientArea().height, model
+				.getHighestCumulatedMemoryAlloc());
+		return findClosestAlloc((int) (x * getScale()),
+				(int) ((x - BOUNDARY_OFFSET) * getScale()),
+				(int) ((x + BOUNDARY_OFFSET) * getScale()), (int) (yConverter
+						.yToBytes(y)), (int) yConverter.yToBytes(y
+						+ BOUNDARY_OFFSET), (int) yConverter.yToBytes(y
+						- BOUNDARY_OFFSET));
 	}
 
 	/**
@@ -355,13 +431,14 @@
 	 *            Right boundary for cumulative memory in bytes
 	 * @return
 	 */
-	private BaseInfo findClosestAlloc(int timeInMsMidPoint, int timeInMsBoundLeft, int timeInMsBoundRight, int bytesMidPoint, int bytesBoundLeft,
-			int bytesBoundRight) {
+	private BaseInfo findClosestAlloc(int timeInMsMidPoint,
+			int timeInMsBoundLeft, int timeInMsBoundRight, int bytesMidPoint,
+			int bytesBoundLeft, int bytesBoundRight) {
 		BaseInfo ret = null;
-		if (model.getSelectedProcess() == null){
+		if (model.getSelectedProcess() == null) {
 			return ret;
 		}
-		
+
 		int marginEnd = timeInMsBoundRight;
 		ProcessInfo process = model.getSelectedProcess();
 		AbstractList<BaseInfo> allocsFrees = process.getAllocsFrees();
@@ -370,15 +447,19 @@
 		for (BaseInfo info : allocsFrees) {
 			Long infoRelativeTime = info.getTime() - firstTime;
 			// check current alloc info is within given bounds
-			if (infoRelativeTime >= timeInMsBoundLeft && infoRelativeTime <= marginEnd && info.getTotalMem() >= bytesBoundLeft
+			if (infoRelativeTime >= timeInMsBoundLeft
+					&& infoRelativeTime <= marginEnd
+					&& info.getTotalMem() >= bytesBoundLeft
 					&& info.getTotalMem() <= bytesBoundRight) {
 				// check whether current alloc info is a better match than
 				// previously found
 				if (ret == null
-						|| (Math.abs(infoRelativeTime - timeInMsMidPoint) < Math.abs((ret.getTime() - firstTime) - timeInMsMidPoint))
-						|| ((ret.getTime() - firstTime) == infoRelativeTime && Math.abs(info.getTotalMem() - bytesMidPoint) < Math.abs(ret
-								.getTotalMem()
-								- bytesMidPoint))) {
+						|| (Math.abs(infoRelativeTime - timeInMsMidPoint) < Math
+								.abs((ret.getTime() - firstTime)
+										- timeInMsMidPoint))
+						|| ((ret.getTime() - firstTime) == infoRelativeTime && Math
+								.abs(info.getTotalMem() - bytesMidPoint) < Math
+								.abs(ret.getTotalMem() - bytesMidPoint))) {
 					ret = info;
 				}
 			} else if ((info.getTime() - firstTime) > timeInMsBoundRight) {
@@ -399,11 +480,11 @@
 	private BaseInfo findNextAlloc(BaseInfo allocInfo, boolean forward) {
 		BaseInfo ret = null;
 		ProcessInfo processInfo = model.getSelectedProcess();
-		if (processInfo == null){
+		if (processInfo == null) {
 			return ret;
 		}
-		
-		AbstractList<BaseInfo> allocsFrees = processInfo.getAllocsFrees(); 
+
+		AbstractList<BaseInfo> allocsFrees = processInfo.getAllocsFrees();
 		int i = allocsFrees.indexOf(allocInfo);
 		if (forward) {
 			if (i < allocsFrees.size() - 1) {
@@ -434,6 +515,7 @@
 
 	/**
 	 * Returns the current scaling factor for the graph's width
+	 * 
 	 * @return Scale
 	 */
 	public double getScale() {
@@ -442,7 +524,8 @@
 
 	/**
 	 * Sets the scaling factor for the graph's width
-	 * @param newScale 
+	 * 
+	 * @param newScale
 	 */
 	public void setScale(double newScale) {
 		this.scale = newScale;
@@ -450,7 +533,8 @@
 
 	/**
 	 * Returns the highest time value of the current graph in milliseconds
-	 * @return Last time 
+	 * 
+	 * @return Last time
 	 */
 	public long getLastTimeValueInMilliSeconds() {
 		return model.getLastProcessTime() - model.getFirstProcessTime();
@@ -462,24 +546,28 @@
 	 * @return
 	 */
 	private long getMaxTimeValueInMilliSeconds() {
-		return getLastTimeValueInMilliSeconds() + (int) (getLastTimeValueInMilliSeconds() * 0.01);
+		return getLastTimeValueInMilliSeconds()
+				+ (int) (getLastTimeValueInMilliSeconds() * 0.01);
 	}
 
 	/**
-	 * Adds a new model to this class 
-	 * @param newModel the IMemoryActivityModel to use
+	 * Adds a new model to this class
+	 * 
+	 * @param newModel
+	 *            the IMemoryActivityModel to use
 	 */
 	public void setInput(IMemoryActivityModel newModel) {
-		if (this.model != null){
+		if (this.model != null) {
 			this.model.removeListener(this);
 		}
+		threshold = 0; // reset threshold
 		this.model = newModel;
 		this.model.addListener(this);
 	}
 
 	/**
-	 * Creates the content of the FigureCanvas. Intended to be called
-	 * once in creating the ViewPart content. 
+	 * Creates the content of the FigureCanvas. Intended to be called once in
+	 * creating the ViewPart content.
 	 */
 	public void createContent() {
 		mc = new MouseAndKeyController();
@@ -508,7 +596,7 @@
 		horizontalBar.addSelectionListener(new SelectionListener() {
 
 			public void widgetDefaultSelected(SelectionEvent arg0) {
-				//do nothing by design
+				// do nothing by design
 			}
 
 			public void widgetSelected(SelectionEvent event) {
@@ -524,14 +612,14 @@
 				redraw();
 			}
 		});
-		
 	}
 
 	/**
 	 * Class containing code to deal with mouse and key events
-	 *
+	 * 
 	 */
-	private class MouseAndKeyController implements MouseMotionListener, MouseListener, KeyListener {
+	private class MouseAndKeyController implements MouseMotionListener,
+			MouseListener, KeyListener {
 
 		protected int mouseButton;
 		protected Point start;
@@ -559,66 +647,92 @@
 
 		public void render(Graphics graphics) {
 			graphics.pushState();
-			if (beingDragged){
-				graphics.setForegroundColor(Display.getDefault().getSystemColor(SWT.COLOR_BLACK));
+			if (beingDragged) {
+				graphics.setForegroundColor(Display.getDefault()
+						.getSystemColor(SWT.COLOR_BLACK));
 				graphics.setLineWidth(1);
-				
+
 				int dragEnd = lastMouse.x;
-				int dragLeftX = start.x <= dragEnd ? start.x : dragEnd;// drag area left edge
-				int dragRightX = start.x <= dragEnd ? dragEnd : start.x;// drag area right edge
-				graphics.drawRectangle(new Rectangle(dragLeftX, 0, (dragRightX-dragLeftX), getClientArea().height));
+				int dragLeftX = start.x <= dragEnd ? start.x : dragEnd;// drag
+				// area
+				// left
+				// edge
+				int dragRightX = start.x <= dragEnd ? dragEnd : start.x;// drag
+				// area
+				// right
+				// edge
+				graphics.drawRectangle(new Rectangle(dragLeftX, 0,
+						(dragRightX - dragLeftX), getClientArea().height));
 			}
-			
-			if (lastShownAlloc != null){
-				
-				//for the selected dot, try to mark related allocs and free
+
+			if (lastShownAlloc != null) {
+
+				// for the selected dot, try to mark related allocs and free
 				FreeInfo freeInfo = null;
-				if (lastShownAlloc instanceof FreeInfo){
-					freeInfo = (FreeInfo)lastShownAlloc;
-				} else{
-					freeInfo = ((AllocInfo)lastShownAlloc).getFreedBy();
+				if (lastShownAlloc instanceof FreeInfo) {
+					freeInfo = (FreeInfo) lastShownAlloc;
+				} else {
+					freeInfo = ((AllocInfo) lastShownAlloc).getFreedBy();
 				}
-				if (freeInfo != null){
-					YConverter yConverter = new YConverter(getClientArea().height, model.getHighestCumulatedMemoryAlloc());
-					Rectangle visibleRect = graphics.getClip(new org.eclipse.draw2d.geometry.Rectangle());
+				if (freeInfo != null) {
+					YConverter yConverter = new YConverter(
+							getClientArea().height, model
+									.getHighestCumulatedMemoryAlloc());
+					Rectangle visibleRect = graphics
+							.getClip(new org.eclipse.draw2d.geometry.Rectangle());
 					Point pfree = getLocationOnGraph(yConverter, freeInfo);
-					if (lastShownAlloc != freeInfo && visibleRect.contains(pfree)){
-						graphics.setForegroundColor(Display.getDefault().getSystemColor(SWT.COLOR_DARK_GREEN));
-						graphics.drawLine(pfree.x+1, pfree.y+3, pfree.x+1, yConverter.bytesToY(0));
-						if (optimisedDrawing){ //draw circle as well since we don't have dots
-							graphics.drawOval(pfree.x - 2, pfree.y - 2, 5, 5);							
+					if (lastShownAlloc != freeInfo
+							&& visibleRect.contains(pfree)) {
+						graphics.setForegroundColor(Display.getDefault()
+								.getSystemColor(SWT.COLOR_DARK_GREEN));
+						graphics.drawLine(pfree.x + 1, pfree.y + 3,
+								pfree.x + 1, yConverter.bytesToY(0));
+						if (optimisedDrawing) { // draw circle as well since we
+							// don't have dots
+							graphics.drawOval(pfree.x - 2, pfree.y - 2, 5, 5);
 						}
 					}
 					for (AllocInfo freedAlloc : freeInfo.getFreedAllocs()) {
-						Point pAlloc = getLocationOnGraph(yConverter, freedAlloc);
-						if (lastShownAlloc != freedAlloc && visibleRect.contains(pAlloc)){
-							graphics.setForegroundColor(Display.getDefault().getSystemColor(SWT.COLOR_DARK_BLUE));
-							graphics.drawLine(pAlloc.x+1, pAlloc.y+3, pAlloc.x+1, yConverter.bytesToY(0));
-							if (optimisedDrawing){ //draw circle as well since we don't have dots
-								graphics.drawOval(pAlloc.x - 2, pAlloc.y - 2, 5, 5);							
+						Point pAlloc = getLocationOnGraph(yConverter,
+								freedAlloc);
+						if (lastShownAlloc != freedAlloc
+								&& visibleRect.contains(pAlloc)) {
+							graphics.setForegroundColor(Display.getDefault()
+									.getSystemColor(SWT.COLOR_DARK_BLUE));
+							graphics.drawLine(pAlloc.x + 1, pAlloc.y + 3,
+									pAlloc.x + 1, yConverter.bytesToY(0));
+							if (optimisedDrawing) { // draw circle as well since
+								// we don't have dots
+								graphics.drawOval(pAlloc.x - 2, pAlloc.y - 2,
+										5, 5);
 							}
 						}
-						
+
 					}
 				}
-				//this should be the alloc that has its details displayed
-				//mark it in the graph
-				//draw a small circle around the alloc / dealloc, and a vertical line towards the X-axis
+				// this should be the alloc that has its details displayed
+				// mark it in the graph
+				// draw a small circle around the alloc / dealloc, and a
+				// vertical line towards the X-axis
 				Point p = getLocationOnGraph(lastShownAlloc);
-				graphics.setForegroundColor(Display.getDefault().getSystemColor(SWT.COLOR_CYAN));
+				graphics.setForegroundColor(Display.getDefault()
+						.getSystemColor(SWT.COLOR_CYAN));
 				graphics.setLineWidth(1);
 				graphics.drawOval(p.x - 2, p.y - 2, 5, 5);
-				if (optimisedDrawing || !isLeak(lastShownAlloc)){
-					graphics.drawLine(p.x+1, p.y+3, p.x+1, getClientArea().height - X_AXIS_HEIGHT);					
+				if (optimisedDrawing || !isLeak(lastShownAlloc)) {
+					graphics.drawLine(p.x + 1, p.y + 3, p.x + 1,
+							getClientArea().height - X_AXIS_HEIGHT);
 				}
 			}
 			graphics.popState();
 		}
 
 		private Point getLocationOnGraph(BaseInfo alloc) {
-			YConverter yConverter = new YConverter(getClientArea().height, model.getHighestCumulatedMemoryAlloc());
+			YConverter yConverter = new YConverter(getClientArea().height,
+					model.getHighestCumulatedMemoryAlloc());
 			return getLocationOnGraph(yConverter, alloc);
 		}
+
 		private Point getLocationOnGraph(YConverter yConverter, BaseInfo alloc) {
 			int x = (int) ((alloc.getTime() - model.getFirstProcessTime()) / getScale());
 			int y = yConverter.bytesToY(alloc.getTotalMem());
@@ -637,7 +751,7 @@
 		 * .MouseEvent)
 		 */
 		public void mouseEntered(MouseEvent e) {
-			//do nothing by design
+			// do nothing by design
 		}
 
 		/*
@@ -648,7 +762,7 @@
 		 * .MouseEvent)
 		 */
 		public void mouseExited(MouseEvent e) {
-			//do nothing by design
+			// do nothing by design
 		}
 
 		/*
@@ -673,7 +787,7 @@
 		 * .MouseEvent)
 		 */
 		public void mouseMoved(MouseEvent e) {
-			//do nothing by design
+			// do nothing by design
 		}
 
 		/*
@@ -716,13 +830,20 @@
 
 				// set new scale
 				int dragEnd = me.getLocation().x;
-				int dragLeftX = start.x <= dragEnd ? start.x : dragEnd;// drag area left edge
-				int dragRightX = start.x <= dragEnd ? dragEnd : start.x;// drag area right edge
+				int dragLeftX = start.x <= dragEnd ? start.x : dragEnd;// drag
+				// area
+				// left
+				// edge
+				int dragRightX = start.x <= dragEnd ? dragEnd : start.x;// drag
+				// area
+				// right
+				// edge
 				int dragWindowStartTime = (int) (dragLeftX * getScale());
 
-
 				int dragWidth = dragRightX - dragLeftX;// drag area width
-				int oldVisibleWidth = getViewport().getSize().width;// visible window width
+				int oldVisibleWidth = getViewport().getSize().width;// visible
+				// window
+				// width
 				double newScale = getScale() * dragWidth / oldVisibleWidth;
 				if (newScale < 1.0) {
 					// don't allow a scale smaller than 1 millisecond per pixel
@@ -736,12 +857,13 @@
 				setScale(newScale);
 				setZoomedSize(dragLeftXScaled);
 
-				//make sure the drag window disappears
-				AnalyzeToolGraph.this.redraw();				
+				// make sure the drag window disappears
+				AnalyzeToolGraph.this.redraw();
 			} else if (me.button == 3) {
 				// mouse right click - zoom out
 
-				double maxScale = getMaxTimeValueInMilliSeconds() / getClientArea().width;
+				double maxScale = getMaxTimeValueInMilliSeconds()
+						/ getClientArea().width;
 				if (getScale() < maxScale) {
 					double newScale = GraphUtils.nextScale(getScale(), true);
 					if (getScale() != newScale) {
@@ -750,7 +872,8 @@
 						}
 
 						// get left window edge is ms to be set to after zooming
-						double leftEdgeInMs = getViewport().getViewLocation().x * getScale();
+						double leftEdgeInMs = getViewport().getViewLocation().x
+								* getScale();
 						setScale(newScale);
 						setZoomedSize((int) (leftEdgeInMs / newScale));
 					}
@@ -758,48 +881,60 @@
 			} else if (me.button == 1) {
 				BaseInfo info = findClosest(me.x, me.y);
 				if (info != null) {
-					iDotsSelecProv.setSelection(new StructuredSelection(new MemOpDescriptor(model.getFirstProcessTime(), info, iCurrentProject, iSymReader, cppFileNames, model.getCallstackManager())));
+					iDotsSelecProv
+							.setSelection(new StructuredSelection(
+									new MemOpDescriptor(model
+											.getFirstProcessTime(), info,
+											iCurrentProject, iSymReader,
+											cppFileNames, model
+													.getCallstackManager())));
 					lastShownAlloc = info;
 				}
-				}
-
 			}
-
+		}
 
 		public void keyPressed(KeyEvent ke) {
-			//do nothing by design
+			// do nothing by design
 		}
 
 		public void keyReleased(KeyEvent ke) {
 			if (ke.keycode == SWT.ARROW_RIGHT || ke.keycode == SWT.ARROW_LEFT) {
 				if (lastShownAlloc != null) {
-					BaseInfo info = findNextAlloc(lastShownAlloc, ke.keycode == SWT.ARROW_RIGHT);
+					BaseInfo info = findNextAlloc(lastShownAlloc,
+							ke.keycode == SWT.ARROW_RIGHT);
 					if (info != null) {
-						iDotsSelecProv.setSelection(new StructuredSelection(new MemOpDescriptor(model.getFirstProcessTime(), info, iCurrentProject, iSymReader, cppFileNames, model.getCallstackManager())));
+						iDotsSelecProv.setSelection(new StructuredSelection(
+								new MemOpDescriptor(
+										model.getFirstProcessTime(), info,
+										iCurrentProject, iSymReader,
+										cppFileNames, model
+												.getCallstackManager())));
 						lastShownAlloc = info;
-						
-						//if info is hidden from the visible graph area, scroll to reveal
+
+						// if info is hidden from the visible graph area, scroll
+						// to reveal
 						int x = getLocationOnGraph(info).x;
-						int leftEdge = getViewport().getHorizontalRangeModel().getValue();
-						int width = getViewport().getHorizontalRangeModel().getExtent();
-						if (x < leftEdge){
-							if (x > 10){
-								x -=10;
+						int leftEdge = getViewport().getHorizontalRangeModel()
+								.getValue();
+						int width = getViewport().getHorizontalRangeModel()
+								.getExtent();
+						if (x < leftEdge) {
+							if (x > 10) {
+								x -= 10;
 							}
 							getViewport().getHorizontalRangeModel().setValue(x);
-						} else if (x > (leftEdge + width)){
+						} else if (x > (leftEdge + width)) {
 							x -= (width - 10);
-							getViewport().getHorizontalRangeModel().setValue(x);							
+							getViewport().getHorizontalRangeModel().setValue(x);
 						}
 						AnalyzeToolGraph.this.redraw();
 					}
 				}
 			}
-
 		}
 
 		/**
-		 * resets any state
+		 * Resets any state.
 		 */
 		public void clearState() {
 			mouseButton = 0;
@@ -807,22 +942,22 @@
 			beingDragged = false;
 			lastShownAlloc = null;
 			lastMouse = null;
-			if (iDotsSelecProv != null){
-				iDotsSelecProv.setSelection(StructuredSelection.EMPTY);				
+			if (iDotsSelecProv != null) {
+				iDotsSelecProv.setSelection(StructuredSelection.EMPTY);
 			}
 		}
-		
 	}
-	
+
 	/**
-	 * Returns an SWT system color code depending on the type of the paramter passed.
-	 * </br> SWT.COLOR_DARK_BLUE for a alloc (that is not a leak)
-	 * </br> SWT.COLOR_RED for a leak
-	 * </br> SWT.COLOR_DARK_GREEN for a free
-	 * @param info the allocation to evaluate
+	 * Returns an SWT system color code depending on the type of the paramter
+	 * passed. </br> SWT.COLOR_DARK_BLUE for a alloc (that is not a leak) </br>
+	 * SWT.COLOR_RED for a leak </br> SWT.COLOR_DARK_GREEN for a free
+	 * 
+	 * @param info
+	 *            the allocation to evaluate
 	 * @return the appropriate SWT system color code
 	 */
-	private int getColorForAllocType(BaseInfo info){
+	private int getColorForAllocType(BaseInfo info) {
 		int color;
 		if (info instanceof AllocInfo) {
 			if (((AllocInfo) info).isFreed()) {
@@ -835,16 +970,18 @@
 		}
 		return color;
 	}
-	
+
 	/**
-	 * Returns true if the passed info is a leak, false otherwise.
-	 * AllocInfo that haven't been freed are considered leaks.
+	 * Returns true if the passed info is a leak, false otherwise. AllocInfo
+	 * that haven't been freed are considered leaks.
 	 * 
-	 * @param info the BaseInfo to test
+	 * @param info
+	 *            the BaseInfo to test
 	 * @return true if leak, false otherwise
 	 */
-	private static boolean isLeak(BaseInfo info){
-		return info instanceof AllocInfo && !(((AllocInfo) info).isFreed()) ? true : false;
+	private static boolean isLeak(BaseInfo info) {
+		return info instanceof AllocInfo && !(((AllocInfo) info).isFreed()) ? true
+				: false;
 	}
 
 	/**
@@ -870,11 +1007,15 @@
 		}
 	}
 
-	/* (non-Javadoc)
-	 * @see com.nokia.s60tools.analyzetool.engine.IMemoryActivityModelChangeListener#onProcessesAdded()
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * com.nokia.s60tools.analyzetool.engine.IMemoryActivityModelChangeListener
+	 * #onProcessesAdded()
 	 */
 	public void onProcessesAdded() {
-		//the model is now ready to use - call a redraw on the graph
+		// the model is now ready to use - call a redraw on the graph
 		PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
 			public void run() {
 				mc.clearState();
@@ -884,31 +1025,39 @@
 		});
 	}
 
-	/* (non-Javadoc)
-	 * @see com.nokia.s60tools.analyzetool.engine.IMemoryActivityModelChangeListener#onProcessSelected(com.nokia.s60tools.analyzetool.engine.statistic.ProcessInfo)
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * com.nokia.s60tools.analyzetool.engine.IMemoryActivityModelChangeListener
+	 * #onProcessSelected
+	 * (com.nokia.s60tools.analyzetool.engine.statistic.ProcessInfo)
 	 */
 	public void onProcessSelected(ProcessInfo p) {
 		PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
 			public void run() {
 				mc.clearState();
-				optimisedDrawing = model.getSelectedProcess().getAllocsFrees().size() > 25000 ? true : false;
+				optimisedDrawing = model.getSelectedProcess().getAllocsFrees()
+						.size() > ChartContainer.OPT_DRAWING_LIMIT ? true
+						: false;
 				userInformed = false;
 				zoomGraph();
 				redraw();
 			}
 		});
 	}
-	
+
 	@Override
 	public void dispose() {
-		//there is no dispose() entry point in this class; we may have to call this via MainView.dispose()
+		// there is no dispose() entry point in this class; we may have to call
+		// this via MainView.dispose()
 		site.setSelectionProvider(null);
 		iDotsSelecProv = null;
-		if (timeImage != null){
+		if (timeImage != null) {
 			timeImage.dispose();
 		}
 		IPartService partService = PlatformUI.getWorkbench()
-		.getActiveWorkbenchWindow().getPartService();
+				.getActiveWorkbenchWindow().getPartService();
 		partService.removePartListener(iGraphPartServiceListener);
 		iGraphPartServiceListener = null;
 		if (iSymReader != null) {
@@ -916,7 +1065,7 @@
 			iSymReader = null;
 		}
 	}
-	
+
 	private void setZoomedSize(final int newXLocation) {
 		int prefSize = (int) (getMaxTimeValueInMilliSeconds() / getScale());
 
@@ -927,106 +1076,132 @@
 		panel.setPreferredSize(prefSize, 0);
 
 		if (prefSize > getClientArea().width) {
-			getViewport().getHorizontalRangeModel().addPropertyChangeListener(new PropertyChangeListener() {
-				public void propertyChange(PropertyChangeEvent e) {
-					if (e.getPropertyName().equals(PROP_MAXIMUM)) {
-						getViewport().getHorizontalRangeModel().removePropertyChangeListener(this);
-						getViewport().getHorizontalRangeModel().setValue(newXLocation);
-					}
-				}
+			getViewport().getHorizontalRangeModel().addPropertyChangeListener(
+					new PropertyChangeListener() {
+						public void propertyChange(PropertyChangeEvent e) {
+							if (e.getPropertyName().equals(PROP_MAXIMUM)) {
+								getViewport().getHorizontalRangeModel()
+										.removePropertyChangeListener(this);
+								getViewport().getHorizontalRangeModel()
+										.setValue(newXLocation);
+							}
+						}
 
-			});
+					});
 			panel.setSize(prefSize, 0);
 
 		} else {
-			// this only works if the canvas is large enough, otherwise use property listener
-			getViewport().getHorizontalRangeModel().setValue(newXLocation); 
+			// this only works if the canvas is large enough, otherwise use
+			// property listener
+			getViewport().getHorizontalRangeModel().setValue(newXLocation);
 		}
 	}
-	
+
 	/**
-	 * DotSelectionProvider :  when a user selects a Dot on the graph, this class delivers the associated
-	 * descriptor MemOpDescriptor to the views interested in it mainly the Properties View. 
-	 *
+	 * DotSelectionProvider : when a user selects a Dot on the graph, this class
+	 * delivers the associated descriptor MemOpDescriptor to the views
+	 * interested in it mainly the Properties View.
+	 * 
 	 */
-	private class DotSelectionProvider implements ISelectionProvider, SelectionListener {
+	private class DotSelectionProvider implements ISelectionProvider,
+			SelectionListener {
 		private ListenerList iSelectionChangedListeners = new ListenerList();
 
-		/* (non-Javadoc)
-		 * @see org.eclipse.jface.viewers.ISelectionProvider#addSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener)
+		/*
+		 * (non-Javadoc)
+		 * 
+		 * @see
+		 * org.eclipse.jface.viewers.ISelectionProvider#addSelectionChangedListener
+		 * (org.eclipse.jface.viewers.ISelectionChangedListener)
 		 */
-		public void addSelectionChangedListener(ISelectionChangedListener listener) {
-			//TODO is there a way to allow only properties view to register.
+		public void addSelectionChangedListener(
+				ISelectionChangedListener listener) {
+			// TODO is there a way to allow only properties view to register.
 			iSelectionChangedListeners.add(listener);
-
 		}
 
-		/* (non-Javadoc)
+		/*
+		 * (non-Javadoc)
+		 * 
 		 * @see org.eclipse.jface.viewers.ISelectionProvider#getSelection()
 		 */
 		public ISelection getSelection() {
 			return iCurrentSelectedDot;
 		}
 
-		/* (non-Javadoc)
-		 * @see org.eclipse.jface.viewers.ISelectionProvider#removeSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener)
+		/*
+		 * (non-Javadoc)
+		 * 
+		 * @seeorg.eclipse.jface.viewers.ISelectionProvider#
+		 * removeSelectionChangedListener
+		 * (org.eclipse.jface.viewers.ISelectionChangedListener)
 		 */
-		public void removeSelectionChangedListener(ISelectionChangedListener listener) {
+		public void removeSelectionChangedListener(
+				ISelectionChangedListener listener) {
 			iSelectionChangedListeners.remove(listener);
-
 		}
 
-		/* (non-Javadoc)
-		 * @see org.eclipse.jface.viewers.ISelectionProvider#setSelection(org.eclipse.jface.viewers.ISelection)
+		/*
+		 * (non-Javadoc)
+		 * 
+		 * @see
+		 * org.eclipse.jface.viewers.ISelectionProvider#setSelection(org.eclipse
+		 * .jface.viewers.ISelection)
 		 */
 		public void setSelection(ISelection selection) {
 			iCurrentSelectedDot = selection;
-			//notify the listeners mainly the property view
+			// notify the listeners mainly the property view
 			for (final Object listenerObj : iSelectionChangedListeners
-					.getListeners())
-			{
+					.getListeners()) {
 				((ISelectionChangedListener) listenerObj)
-					.selectionChanged(new SelectionChangedEvent(this, getSelection()));
+						.selectionChanged(new SelectionChangedEvent(this,
+								getSelection()));
 			}
 		}
 
-		/* (non-Javadoc)
-		 * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent)
+		/*
+		 * (non-Javadoc)
+		 * 
+		 * @see
+		 * org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org
+		 * .eclipse.swt.events.SelectionEvent)
 		 */
 		public void widgetDefaultSelected(SelectionEvent event) {
 			widgetSelected(event);
-			
 		}
 
-		/* (non-Javadoc)
-		 * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+		/*
+		 * (non-Javadoc)
+		 * 
+		 * @see
+		 * org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse
+		 * .swt.events.SelectionEvent)
 		 */
 		public void widgetSelected(SelectionEvent arg0) {
 			for (final Object listenerObj : iSelectionChangedListeners
-					.getListeners())
-			{
+					.getListeners()) {
 				((ISelectionChangedListener) listenerObj)
-					.selectionChanged(new SelectionChangedEvent(this, getSelection()));
+						.selectionChanged(new SelectionChangedEvent(this,
+								getSelection()));
 			}
-			
 		}
-
 	}
-	
-	
+
 	/**
-	 * GraphPartServiceListener is for convenience only. It serves to find an appropriate time to
-	 * add DotSelectionProvider to the part site. It also covers that case where the properties View is already
-	 * open before opening AnalyzeTool View.
-	 *
+	 * GraphPartServiceListener is for convenience only. It serves to find an
+	 * appropriate time to add DotSelectionProvider to the part site. It also
+	 * covers that case where the properties View is already open before opening
+	 * AnalyzeTool View.
+	 * 
 	 */
-	private class GraphPartServiceListener implements IPartListener, IWindowListener {
+	private class GraphPartServiceListener implements IPartListener,
+			IWindowListener {
 
 		public void partActivated(IWorkbenchPart part) {
 			if (part instanceof MainView || part instanceof PropertySheet) {
-				
+
 				site = part.getSite();
-				//set property sheet selection provider.
+				// set property sheet selection provider.
 				site.setSelectionProvider(iDotsSelecProv);
 				if (part instanceof MainView && iSymReader != null) {
 					iSymReader.reOpenCachedSymbolFiles();
@@ -1035,21 +1210,22 @@
 		}
 
 		public void partBroughtToTop(IWorkbenchPart part) {
-			//do nothing
+			// do nothing
 		}
 
 		public void partClosed(IWorkbenchPart part) {
-			//TODO this is not working. why?
-			if (part instanceof MainView || part instanceof PropertySheet) {			
+			// TODO this is not working. why?
+			if (part instanceof MainView || part instanceof PropertySheet) {
 				site = part.getSite();
-				iDotsSelecProv.setSelection(StructuredSelection.EMPTY);	
-				//set property sheet selection provider.
+				iDotsSelecProv.setSelection(StructuredSelection.EMPTY);
+				// set property sheet selection provider.
 				site.setSelectionProvider(null);
 			}
 		}
 
 		public void partDeactivated(IWorkbenchPart part) {
-			//the user might want to rebuild the project, so close the sumbol files
+			// the user might want to rebuild the project, so close the sumbol
+			// files
 			if (part instanceof MainView && iSymReader != null) {
 				iSymReader.closeCachedSymbolFiles();
 			}
@@ -1058,43 +1234,47 @@
 		public void partOpened(IWorkbenchPart part) {
 			if (part instanceof MainView) {
 				try {
-					part.getSite().getPage().showView("org.eclipse.ui.views.PropertySheet");//$NON-NLS-1$
+					part.getSite().getPage().showView(
+							"org.eclipse.ui.views.PropertySheet");//$NON-NLS-1$
 				} catch (PartInitException e) {
-					//just log the exception
-					Activator.getDefault().log(IStatus.ERROR, e.getMessage(), e);
+					// just log the exception
+					Activator.getDefault()
+							.log(IStatus.ERROR, e.getMessage(), e);
 				}
 			}
 		}
 
 		public void windowActivated(IWorkbenchWindow window) {
-			if (iSymReader != null && window.getActivePage().getActivePart() instanceof MainView) {
+			if (iSymReader != null
+					&& window.getActivePage().getActivePart() instanceof MainView) {
 				iSymReader.reOpenCachedSymbolFiles();
-			}			
+			}
 		}
 
 		public void windowClosed(IWorkbenchWindow window) {
-			//do nothing
-			
+			// do nothing
+
 		}
 
 		public void windowDeactivated(IWorkbenchWindow window) {
 			// the user might do a re-build from the command line
 			if (iSymReader != null) {
 				iSymReader.closeCachedSymbolFiles();
-			}		
+			}
 		}
 
 		public void windowOpened(IWorkbenchWindow window) {
-			//do nothing	
+			// do nothing
 		}
 	}
-	
+
 	/**
 	 * set a new project
+	 * 
 	 * @param aProject
 	 */
 	public void setProject(IProject aProject) {
-		if(iCurrentProject != aProject) {
+		if (iCurrentProject != aProject) {
 			iCurrentProject = aProject;
 			iSymReader = new SymReader(aProject);
 			iSymReader.loadProjectTargetsInfo();
@@ -1102,16 +1282,16 @@
 			try {
 				iCurrentProject.accept(visitor);
 			} catch (CoreException ce) {
-				//just log the exception
+				// just log the exception
 				Activator.getDefault().log(IStatus.ERROR, ce.getMessage(), ce);
 			}
 		}
 	}
-	
+
 	/**
-	 * Load all cpp files from the project
-	 * This is callback to ResourcceVisitor.
-	 *
+	 * Load all cpp files from the project. This is callback to
+	 * ResourcceVisitor.
+	 * 
 	 * @param resource
 	 */
 	public final void loadFileInfo(IResource resource) {
@@ -1124,4 +1304,21 @@
 		}
 	}
 
+	/**
+	 * Sets the threshold. Only memory operations of a size greater or equals /
+	 * lower or equals the threshold will be drawn on the graph.
+	 * 
+	 * @param value
+	 *            the threshold value in bytes
+	 * @param above
+	 *            true if filtering "above", false if "below" the threshold
+	 */
+	public void setThreshold(long value, boolean above) {
+		if (value < 0) {
+			throw new IllegalArgumentException(
+					"The threshold cannot be less than 0");
+		}
+		threshold = value;
+		aboveThreshold = above;
+	}
 }
--- a/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/internal/ui/graph/ChartContainer.java	Tue Aug 24 12:10:03 2010 +0300
+++ b/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/internal/ui/graph/ChartContainer.java	Tue Aug 24 12:16:27 2010 +0300
@@ -22,6 +22,7 @@
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
 import org.eclipse.draw2d.ColorConstants;
+import org.eclipse.jface.window.Window;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.ControlAdapter;
 import org.eclipse.swt.events.ControlEvent;
@@ -51,20 +52,28 @@
 import com.nokia.s60tools.analyzetool.engine.statistic.ProcessInfo;
 
 /**
- *  Container for the complete AnalyzeTool chart (x and y axis as well as graph)
- *
+ * Container for the complete AnalyzeTool chart (x and y axis as well as graph)
+ * 
  */
-public class ChartContainer extends Composite implements IMemoryActivityModelChangeListener{
-	
+public class ChartContainer extends Composite implements
+		IMemoryActivityModelChangeListener {
+
+	static final int OPT_DRAWING_LIMIT = 25000;
 	private static final String ICON_PROPVIEW = "icons/properties.gif";//$NON-NLS-1$
 	private static final String ICON_HELP = "icons/linkto_help.gif";//$NON-NLS-1$
-	
+	private static final String ICON_GRAPH_SETTINGS = "icons/graph_settings.png";//$NON-NLS-1$
+
 	private AnalyzeToolGraph graphCanvas;
 	private YAxis yAxis;
 	private Combo processCombo;
 	private IMemoryActivityModel model;
 	private UIJob iRefreshUIJob;
-	
+
+	/** threshold for display of allocations */
+	private String thresholdVal;
+	private boolean thresholdAbove;
+	private ToolItem settingsButton;
+
 	/**
 	 * Constructor
 	 * 
@@ -79,174 +88,213 @@
 		setBackground(parent.getBackground());
 		constructChartArea();
 	}
-	
+
 	/**
 	 * Builds up the main composite when opening for the first time
 	 */
-	private void constructChartArea(){
+	private void constructChartArea() {
 		setLayout(new FormLayout());
-			
+
 		Label processLabel = new Label(this, SWT.CENTER);
 		processLabel.setText("Process:");
 		processCombo = new Combo(this, SWT.READ_ONLY | SWT.DROP_DOWN);
 
-		
-		ToolBar toolBar = new ToolBar (this, SWT.RIGHT | SWT.FLAT);
-		
-		//toolbar button to open the Eclipse Properties view
-		ToolItem propViewItem = new ToolItem (toolBar, SWT.PUSH | SWT.FLAT );
-		propViewItem.addSelectionListener(new SelectionListener(){
+		ToolBar toolBar = new ToolBar(this, SWT.RIGHT | SWT.FLAT);
+
+		settingsButton = new ToolItem(toolBar, SWT.PUSH | SWT.FLAT);
+		settingsButton.addSelectionListener(new SelectionListener() {
 
 			public void widgetDefaultSelected(SelectionEvent e) {
-				//do nothing by design
+				// do nothing by design
 			}
 
 			public void widgetSelected(SelectionEvent e) {
-                try {
-                    PlatformUI.getWorkbench()
-                    .getActiveWorkbenchWindow().getActivePage()
-                    .showView("org.eclipse.ui.views.PropertySheet");//$NON-NLS-1$
-            } catch (PartInitException ex) {
-                    Activator.getDefault().log(IStatus.ERROR, ex.getMessage(), ex);
-            }
+				// SettingsInputDialog dialog = new
+				// SettingsInputDialog(thresholdVal, getShell());
+				GraphSettingsDialog dialog = new GraphSettingsDialog(
+						getShell(), thresholdVal, thresholdAbove);
+				if (dialog.open() == Window.OK) {
+					thresholdVal = dialog.getThresholdString();
+					thresholdAbove = dialog.getAbove();
+					graphCanvas.setThreshold(dialog.getThreshold(),
+							thresholdAbove);
+					graphCanvas.redraw();
+				}
 			}
-			
+		});
+		settingsButton.setImage(Activator.getDefault().getImage(
+				ICON_GRAPH_SETTINGS));
+		settingsButton.setToolTipText("Graph Settings");
+		thresholdAbove = true; // initial value
+
+		// toolbar button to open the Eclipse Properties view
+		ToolItem propViewItem = new ToolItem(toolBar, SWT.PUSH | SWT.FLAT);
+		propViewItem.addSelectionListener(new SelectionListener() {
+
+			public void widgetDefaultSelected(SelectionEvent e) {
+				// do nothing by design
+			}
+
+			public void widgetSelected(SelectionEvent e) {
+				try {
+					PlatformUI.getWorkbench().getActiveWorkbenchWindow()
+							.getActivePage().showView(
+									"org.eclipse.ui.views.PropertySheet");//$NON-NLS-1$
+				} catch (PartInitException ex) {
+					Activator.getDefault().log(IStatus.ERROR, ex.getMessage(),
+							ex);
+				}
+			}
+
 		});
 		propViewItem.setImage(Activator.getDefault().getImage(ICON_PROPVIEW));
 		propViewItem.setToolTipText("Show Properties View");
 
-		//toolbar button to show some navigation help and open the F1 help
-		ToolItem helpItem = new ToolItem (toolBar, SWT.PUSH | SWT.FLAT );
-		helpItem.addSelectionListener(new SelectionListener(){
+		// toolbar button to show some navigation help and open the F1 help
+		ToolItem helpItem = new ToolItem(toolBar, SWT.PUSH | SWT.FLAT);
+		helpItem.addSelectionListener(new SelectionListener() {
 
 			public void widgetDefaultSelected(SelectionEvent e) {
-				//do nothing by design
+				// do nothing by design
 			}
 
 			public void widgetSelected(SelectionEvent e) {
-				PlatformUI.getWorkbench().getHelpSystem().displayHelp(AnalyzeToolHelpContextIDs.ANALYZE_GRAPH);
+				PlatformUI.getWorkbench().getHelpSystem().displayHelp(
+						AnalyzeToolHelpContextIDs.ANALYZE_GRAPH);
 			}
-			
+
 		});
 		helpItem.setImage(Activator.getDefault().getImage(ICON_HELP));
-		helpItem.setToolTipText("Quick navigtion help\n-------------------------\nZoom in: select a region of the graph (mouse left-click and drag).\nZoom out: mouse right-click.\n\nSelect memory operation: mouse left-click in the graph.\nMove selection to next or previous using arrow left and arrow right keys.\n\nFor more help press F1");
-		
+		helpItem
+				.setToolTipText("Quick navigtion help\n-------------------------\nZoom in: select a region of the graph (mouse left-click and drag).\nZoom out: mouse right-click.\n\nSelect memory operation: mouse left-click in the graph.\nMove selection to next or previous using arrow left and arrow right keys.\n\nFor more help press F1");
+
 		yAxis = new YAxis(this);
 		yAxis.createContent();
 		graphCanvas = new AnalyzeToolGraph(this);
 		graphCanvas.setSize(500, 450);
-		
+
 		FormData formData = new FormData();
-		formData.top = new FormAttachment(0,2);
-		formData.left   = new FormAttachment(0, 2);
+		formData.top = new FormAttachment(0, 2);
+		formData.left = new FormAttachment(0, 2);
 		formData.height = processCombo.getBounds().height;
 		processLabel.setLayoutData(formData);
-		
+
 		formData = new FormData();
 		formData.top = new FormAttachment(0);
-		formData.left   = new FormAttachment(processLabel, 10, SWT.BOTTOM);
+		formData.left = new FormAttachment(processLabel, 10, SWT.BOTTOM);
 		processCombo.setLayoutData(formData);
 
 		formData = new FormData();
 		formData.top = new FormAttachment(0, 2);
-		formData.right   = new FormAttachment(100, 2);
+		formData.right = new FormAttachment(100, 2);
 		toolBar.setLayoutData(formData);
-		
+
 		formData = new FormData();
 		formData.top = new FormAttachment(processCombo, 5, SWT.BOTTOM);
 		formData.bottom = new FormAttachment(100);
-		formData.left   = new FormAttachment(0);
-		formData.width  = 60;
+		formData.left = new FormAttachment(0);
+		formData.width = 60;
 		yAxis.setLayoutData(formData);
-		
+
 		formData = new FormData();
 		formData.top = new FormAttachment(processCombo, 5, SWT.BOTTOM);
 		formData.bottom = new FormAttachment(100);
-		formData.left   = new FormAttachment(yAxis, 0, SWT.RIGHT);
-		formData.right  = new FormAttachment(100);
+		formData.left = new FormAttachment(yAxis, 0, SWT.RIGHT);
+		formData.right = new FormAttachment(100);
 		graphCanvas.setLayoutData(formData);
-		
+
 		yAxis.setBackground(ColorConstants.white);
-		yAxis.addPaintListener(new PaintListener()
-		{
+		yAxis.addPaintListener(new PaintListener() {
 
 			public void paintControl(PaintEvent event) {
-				
-				if(yAxis != null)
+
+				if (yAxis != null)
 					yAxis.paintYAxis(event.gc);
-			}		
+			}
 		});
-		
-		graphCanvas.setBackground(new Color(Display.getDefault(), new RGB(255,255,255)));
+
+		graphCanvas.setBackground(new Color(Display.getDefault(), new RGB(255,
+				255, 255)));
 		graphCanvas.createContent();
 		graphCanvas.addControlListener(new ControlAdapter() {
 			@Override
 			public void controlResized(ControlEvent e) {
-				//the client area of the graph panel might change if a scrollbar gets added/removed 
-				//this needs to be passed on to the y axis
-				if (yAxis.getHeight() !=  graphCanvas.getClientArea().height){
+				// the client area of the graph panel might change if a
+				// scrollbar gets added/removed
+				// this needs to be passed on to the y axis
+				if (yAxis.getHeight() != graphCanvas.getClientArea().height) {
 					yAxis.setHeight(graphCanvas.getClientArea().height);
 					yAxis.redraw();
 				}
 			}
-			
+
 		});
-		
-		iRefreshUIJob = new UIJob("Updating process combo box"){
+
+		iRefreshUIJob = new UIJob("Updating process combo box") {
 
 			@Override
 			public IStatus runInUIThread(IProgressMonitor arg0) {
 				processCombo.removeAll();
 				// Update combo box
-				if (model.getProcesses().size() == 0){
+				if (model.getProcesses().size() == 0) {
 					processCombo.add("No data available");
 					processCombo.select(0);
+					settingsButton.setEnabled(false);
 				} else {
 					for (ProcessInfo p : model.getProcesses()) {
-						processCombo.add(String.format("%s with %d leak(s)",p.getProcessName() != null ? p.getProcessName() : p.getProcessID(), p.getMemLeaksNumber()));
+						processCombo.add(String.format("%s with %d leak(s)", p
+								.getProcessName() != null ? p.getProcessName()
+								: p.getProcessID(), p.getMemLeaksNumber()));
 					}
 					processCombo.setVisibleItemCount(10);
 				}
 				processCombo.pack();
 				return Status.OK_STATUS;
 			}
-			
+
 		};
 		iRefreshUIJob.setSystem(true);
-		
-		processCombo.addSelectionListener(new SelectionListener(){
+
+		processCombo.addSelectionListener(new SelectionListener() {
 
 			public void widgetDefaultSelected(SelectionEvent e) {
-				//do nothing by design
+				// do nothing by design
 			}
 
 			public void widgetSelected(SelectionEvent e) {
 				int sel = processCombo.getSelectionIndex();
-				if (model.getProcesses().size()>sel){
-					ProcessInfo process = model.getProcesses().get(processCombo.getSelectionIndex());
+				if (model.getProcesses().size() > sel) {
+					ProcessInfo process = model.getProcesses().get(
+							processCombo.getSelectionIndex());
 					model.setSelectedProcess(process);
-					processCombo.setSize(processCombo.computeSize(SWT.DEFAULT, SWT.DEFAULT));
+					processCombo.setSize(processCombo.computeSize(SWT.DEFAULT,
+							SWT.DEFAULT));
+					int ops = model.getSelectedProcess().getAllocsFrees()
+							.size();
+					settingsButton.setEnabled(ops > 0
+							&& ops <= OPT_DRAWING_LIMIT ? true : false);
 				}
 			}
-			
 		});
-		
-				
+
 		layout();
-		PlatformUI.getWorkbench().getHelpSystem().setHelp(
-				this,
+		PlatformUI.getWorkbench().getHelpSystem().setHelp(this,
 				AnalyzeToolHelpContextIDs.ANALYZE_GRAPH);
 	}
 
 	/**
-	 * Sets a new model. Note the redraw of the new content only happens on 
+	 * Sets a new model. Note the redraw of the new content only happens on
 	 * callbacks to model change listeners.
-	 * @param aProject The currently selected project in the IDE, used for pinpointing
 	 * 
-	 * @param newModel the new IMemoryActivityModel to set
+	 * @param aProject
+	 *            The currently selected project in the IDE, used for
+	 *            pinpointing
+	 * 
+	 * @param newModel
+	 *            the new IMemoryActivityModel to set
 	 */
 	public void setInput(IProject aProject, IMemoryActivityModel newModel) {
-		if (this.model != null){
+		if (this.model != null) {
 			this.model.removeListener(this);
 		}
 		this.model = newModel;
@@ -259,24 +307,32 @@
 		}
 	}
 
-	/* (non-Javadoc)
-	 * @see com.nokia.s60tools.analyzetool.engine.IMemoryActivityModelChangeListener#onProcessSelected(com.nokia.s60tools.analyzetool.engine.statistic.ProcessInfo)
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * com.nokia.s60tools.analyzetool.engine.IMemoryActivityModelChangeListener
+	 * #onProcessSelected
+	 * (com.nokia.s60tools.analyzetool.engine.statistic.ProcessInfo)
 	 */
 	public void onProcessSelected(ProcessInfo p) {
-		//do nothing by design
+		// do nothing by design
 	}
 
-	/* (non-Javadoc)
-	 * @see com.nokia.s60tools.analyzetool.engine.IMemoryActivityModelChangeListener#onProcessesAdded()
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * com.nokia.s60tools.analyzetool.engine.IMemoryActivityModelChangeListener
+	 * #onProcessesAdded()
 	 */
 	public void onProcessesAdded() {
 		iRefreshUIJob.cancel();
 		iRefreshUIJob.schedule();
-		
-	}	
-	
+	}
+
 	@Override
-	public void update(){
+	public void update() {
 		graphCanvas.zoomGraph();
 		graphCanvas.redraw();
 		yAxis.redraw();
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/internal/ui/graph/GraphSettingsDialog.java	Tue Aug 24 12:16:27 2010 +0300
@@ -0,0 +1,154 @@
+/*
+ * Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:  Definitions for the class AnalyzeToolGraph
+ *
+ */
+package com.nokia.s60tools.analyzetool.internal.ui.graph;
+
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.layout.GridDataFactory;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Shell;
+
+/**
+ * Dialog for AnalyzeTool Graph Settings
+ */
+public class GraphSettingsDialog extends Dialog {
+	private static final String DIALOG_TITLE = "Graph Settings";
+
+	// initial values
+	private String initialValueThreshold;
+	private boolean initialValueAbove;
+
+	/** Composite for entering threshold value */
+	private GraphSettingsThresholdComposite thresholdGroup;
+
+	/** the OK button */
+	private Button okButton;
+
+	/**
+	 * Constructor
+	 * 
+	 * @param parentShell
+	 *            The shell for this dialog to open in
+	 * @param oldThreshold
+	 *            threshold as previously entered by user
+	 * @param oldAbove
+	 *            true if previous threshold was filtering "above" the threshold
+	 */
+	public GraphSettingsDialog(Shell parentShell, String oldThreshold,
+			boolean oldAbove) {
+		super(parentShell);
+		initialValueThreshold = oldThreshold;
+		initialValueAbove = oldAbove;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
+	 */
+	@Override
+	protected Control createDialogArea(Composite parent) {
+		Composite container = (Composite) super.createDialogArea(parent);
+
+		thresholdGroup = new GraphSettingsThresholdComposite(container, this,
+				initialValueThreshold, initialValueAbove);
+		thresholdGroup.createControl();
+		GridDataFactory.fillDefaults().grab(true, true).applyTo(thresholdGroup);
+
+		return container;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets
+	 * .Shell)
+	 */
+	@Override
+	protected void configureShell(Shell shell) {
+		super.configureShell(shell);
+		shell.setText(DIALOG_TITLE);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.jface.dialogs.Dialog#createButtonsForButtonBar(org.eclipse
+	 * .swt.widgets.Composite)
+	 */
+	@Override
+	protected void createButtonsForButtonBar(Composite parent) {
+		okButton = createButton(parent, IDialogConstants.OK_ID,
+				IDialogConstants.OK_LABEL, true);
+		createButton(parent, IDialogConstants.CANCEL_ID,
+				IDialogConstants.CANCEL_LABEL, false);
+	}
+
+	/**
+	 * Returns the ok button.
+	 * 
+	 * @return the ok button
+	 */
+	Button getOkButton() {
+		return okButton;
+	}
+
+	/**
+	 * Returns the threshold value String as typed by user.
+	 * 
+	 * @return the input string for threshold value
+	 */
+	public String getThresholdString() {
+		return thresholdGroup.getThresholdString();
+	}
+
+	/**
+	 * Returns the threshold value in bytes
+	 * 
+	 * @return the threshold value in bytes
+	 */
+	public long getThreshold() {
+		return thresholdGroup.getThreshold();
+	}
+
+	/**
+	 * Returns filtering direction for threshold, true for
+	 * "above and equals threshold", false for ""below and equals threshold
+	 * 
+	 * @return
+	 */
+	public boolean getAbove() {
+		return thresholdGroup.getAbove();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.jface.dialogs.Dialog#buttonPressed(int)
+	 */
+	@Override
+	protected void buttonPressed(int buttonId) {
+		thresholdGroup.buttonPressed(buttonId);
+		super.buttonPressed(buttonId);
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/internal/ui/graph/GraphSettingsThresholdComposite.java	Tue Aug 24 12:16:27 2010 +0300
@@ -0,0 +1,274 @@
+/*
+ * Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:  Definitions for the class AnalyzeToolGraph
+ *
+ */
+package com.nokia.s60tools.analyzetool.internal.ui.graph;
+
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.IInputValidator;
+import org.eclipse.jface.layout.GridDataFactory;
+import org.eclipse.jface.layout.GridLayoutFactory;
+import org.eclipse.jface.resource.StringConverter;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+
+/**
+ * Composite for entering the graph's threshold value. This is intended to go
+ * onto the GraphSettingsDialog.
+ */
+public class GraphSettingsThresholdComposite extends Composite {
+	private static final String B = "b";
+	private static final String GB = "gb";
+	private static final String BYTE = "byte";
+	private static final String BYTES = "bytes";
+	private static final String MB = "mb";
+	private static final String KB = "kb";
+	private static final String DIALOG_MESSAGE = "Only show allocations on the graph which are";
+	private static final String ABOVE = "above or equals the threshold";
+	private static final String BELOW = "below or equals the threshold";
+	private static final String DIALOG_MESSAGE2 = "Examples for valid entries are 20B, 4KB, or 1MB.  Leaving the value empty will clear the threshold.";
+	private static final String THRESHOLD_LABEL = "Threshold:";
+	private static final String INVALID_INPUT_VALUE = "Invalid input value.";
+	private static final String OUT_OF_RANGE_VALUE = "The value is out of range.";
+
+	private GraphSettingsDialog parentDialog;
+	private boolean aboveValue;
+	private IInputValidator validator;
+
+	/** Threshold Value text entry widget */
+	private Text text;
+	private String value;
+	/** Error message label widget. */
+	private Text errorMessageText;
+	private Button radioAbove;
+
+	/**
+	 * Constructor
+	 * 
+	 * @param parent
+	 *            the parent composite
+	 * @param parentDialog
+	 *            The calling dialog
+	 * @param oldThreshold
+	 *            previous threshold value as user entered it
+	 * @param above
+	 *            true if previous threshold was filtering "above" the threshold
+	 */
+	public GraphSettingsThresholdComposite(Composite parent,
+			GraphSettingsDialog parentDialog, String oldThreshold, boolean above) {
+		super(parent, SWT.NONE);
+		this.parentDialog = parentDialog;
+		value = oldThreshold == null ? "" : oldThreshold;
+		aboveValue = above;
+		validator = new ThresholdEntryValidator();
+	}
+
+	/**
+	 * Creates the content of this composite
+	 */
+	public void createControl() {
+		setLayout(GridLayoutFactory.fillDefaults().create());
+
+		Group group = new Group(this, SWT.NONE);
+		group.setText("Graph Threshold");
+		group.setLayout(GridLayoutFactory.fillDefaults().numColumns(3).margins(
+				10, 10).equalWidth(false).create());
+		GridDataFactory.fillDefaults().hint(350, SWT.DEFAULT).applyTo(group);
+
+		Label message = new Label(group, SWT.WRAP);
+		message.setText(DIALOG_MESSAGE);
+		GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).span(3, 1)
+				.grab(true, true).applyTo(message);
+
+		radioAbove = new Button(group, SWT.RADIO);
+		radioAbove.setText(ABOVE);
+		radioAbove.setSelection(aboveValue);
+		GridDataFactory.fillDefaults().span(3, 1).indent(10, 0).applyTo(
+				radioAbove);
+
+		Button radioBelow = new Button(group, SWT.RADIO);
+		radioBelow.setText(BELOW);
+		radioBelow.setSelection(!aboveValue);
+		GridDataFactory.fillDefaults().span(3, 1).indent(10, 0).applyTo(
+				radioBelow);
+
+		Label thresholdLabel = new Label(group, SWT.NONE);
+		thresholdLabel.setText(THRESHOLD_LABEL);
+		GridDataFactory.swtDefaults().align(SWT.BEGINNING, SWT.CENTER).grab(
+				false, false).indent(0, 10).applyTo(thresholdLabel);
+
+		text = new Text(group, SWT.SINGLE | SWT.BORDER);
+		GridDataFactory.fillDefaults().indent(0, 7).align(SWT.BEGINNING,
+				SWT.END).hint(80, SWT.DEFAULT).applyTo(text);
+		text.addModifyListener(new ModifyListener() {
+			public void modifyText(ModifyEvent e) {
+				validateInput();
+			}
+		});
+		text.setText(value);
+		text.setFocus();
+		text.selectAll();
+
+		errorMessageText = new Text(group, SWT.READ_ONLY | SWT.WRAP);
+		GridDataFactory.fillDefaults().grab(true, false).indent(0, 10).applyTo(
+				errorMessageText);
+		errorMessageText.setBackground(errorMessageText.getDisplay()
+				.getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));
+		errorMessageText.setForeground(Display.getDefault().getSystemColor(
+				SWT.COLOR_RED));
+
+		Label examplesLabel = new Label(group, SWT.WRAP);
+		examplesLabel.setText(DIALOG_MESSAGE2);
+		GridDataFactory.fillDefaults().span(3, 1).grab(true, false).indent(0,
+				10).applyTo(examplesLabel);
+
+		validateInput();
+	}
+
+	private void validateInput() {
+		setErrorMessage(validator.isValid(text.getText()));
+	}
+
+	/**
+	 * Sets or clears the error message. If not <code>null</code>, the OK button
+	 * is disabled.
+	 * 
+	 * @param errorMessage
+	 *            the error message, or <code>null</code> to clear
+	 * @since 3.0
+	 */
+	public void setErrorMessage(String errorMessage) {
+		if (errorMessageText != null && !errorMessageText.isDisposed()) {
+			errorMessageText.setText(errorMessage == null ? "" : errorMessage); //$NON-NLS-1$
+
+			// Disable the error message text control if there is no error, or
+			// no error text (empty or whitespace only). Hide it also to avoid
+			// color change.
+			// See https://bugs.eclipse.org/bugs/show_bug.cgi?id=130281
+			boolean hasError = errorMessage != null
+					&& (StringConverter.removeWhiteSpaces(errorMessage))
+							.length() > 0;
+			errorMessageText.setEnabled(hasError);
+			errorMessageText.setVisible(hasError);
+			errorMessageText.getParent().update();
+
+			Control button = parentDialog.getOkButton();
+			if (button != null) {
+				button.setEnabled(errorMessage == null);
+			}
+		}
+	}
+
+	private static long parseValue(String value) throws NumberFormatException {
+		String tmpVal = value.trim().toLowerCase();
+		int factor = 1;
+		if (tmpVal.endsWith(KB)) {
+			tmpVal = tmpVal.substring(0, tmpVal.lastIndexOf(KB)).trim();
+			factor = 1024;
+		} else if (tmpVal.endsWith(MB)) {
+			tmpVal = tmpVal.substring(0, tmpVal.lastIndexOf(MB)).trim();
+			factor = 1024 * 1024;
+		} else if (tmpVal.endsWith(BYTES)) {
+			tmpVal = tmpVal.substring(0, tmpVal.lastIndexOf(BYTES)).trim();
+		} else if (tmpVal.endsWith(BYTE)) {
+			tmpVal = tmpVal.substring(0, tmpVal.lastIndexOf(BYTE)).trim();
+		} else if (tmpVal.endsWith(GB)) {
+			tmpVal = tmpVal.substring(0, tmpVal.lastIndexOf(GB)).trim();
+			factor = 1024 * 1024 * 1024;
+		} else if (tmpVal.endsWith(B)) {
+			tmpVal = tmpVal.substring(0, tmpVal.lastIndexOf(B)).trim();
+		}
+		return Long.parseLong(tmpVal) * factor;
+	}
+
+	/**
+	 * Returns the threshold value as entered by the user
+	 * 
+	 * @return the threshold value as entered by the user
+	 */
+	public String getThresholdString() {
+		return value;
+	};
+
+	/**
+	 * Returns the threshold value in bytes
+	 * 
+	 * @return the threshold value in bytes
+	 */
+	public long getThreshold() {
+		if (value == null || value.length() == 0) {
+			return 0;
+		}
+		return parseValue(value);
+	}
+
+	/**
+	 * Returns filtering direction for threshold, true for
+	 * "above and equals threshold", false for "below and equals threshold"
+	 * 
+	 * @return
+	 */
+	public boolean getAbove() {
+		return aboveValue;
+	}
+
+	/**
+	 * Called from the dialog's buttonPressed() method
+	 * 
+	 * @param buttonId
+	 *            the ID of the button that was pressed
+	 */
+	public void buttonPressed(int buttonId) {
+		value = buttonId == IDialogConstants.OK_ID ? text.getText() : null;
+		aboveValue = radioAbove.getSelection();
+	}
+
+	/**
+	 * This class validates the user-entered threshold value
+	 * 
+	 */
+	class ThresholdEntryValidator implements IInputValidator {
+
+		/*
+		 * (non-Javadoc)
+		 * 
+		 * @see
+		 * org.eclipse.jface.dialogs.IInputValidator#isValid(java.lang.String)
+		 */
+		public String isValid(String newText) {
+			if (newText.length() == 0) {
+				return null;
+			}
+
+			try {
+				long value = parseValue(newText);
+				if (value < 0 || value > 4294967296L) {
+					return OUT_OF_RANGE_VALUE;
+				}
+			} catch (NumberFormatException e) {
+				return INVALID_INPUT_VALUE;
+			}
+			return null;
+		}
+	}
+}
--- a/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/internal/ui/graph/MemOpDescriptor.java	Tue Aug 24 12:10:03 2010 +0300
+++ b/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/internal/ui/graph/MemOpDescriptor.java	Tue Aug 24 12:16:27 2010 +0300
@@ -66,46 +66,61 @@
 import com.nokia.s60tools.analyzetool.internal.ui.util.GraphUtils;
 
 /**
- * MemOpDescriptor provides properties of any Alloc/Leak/Free suitable to be displayed in eclipse
- * Properties View.
+ * MemOpDescriptor provides properties of any Alloc/Leak/Free suitable to be
+ * displayed in eclipse Properties View.
  * 
  */
 @SuppressWarnings("restriction")
 class MemOpDescriptor implements IPropertySource {
 	BaseInfo memInfo;
-	
+
 	/** process Id descriptor */
 	private static final String PID_ID = "pid"; //$NON-NLS-1$
-	private final DotTextPropertyDescriptor PID_DESCRIPTOR = new DotTextPropertyDescriptor(PID_ID, Messages.MemOpDescriptor_1);
+	private final DotTextPropertyDescriptor PID_DESCRIPTOR = new DotTextPropertyDescriptor(
+			PID_ID, Messages.MemOpDescriptor_1);
 
 	/** Memory operation type Allocation/Leak/Free descriptor */
 	private static final String TYPE_ID = "type"; //$NON-NLS-1$
-	private final DotTextPropertyDescriptor TYPE_DESCRIPTOR = new DotTextPropertyDescriptor(TYPE_ID, Messages.MemOpDescriptor_3);
+	private final DotTextPropertyDescriptor TYPE_DESCRIPTOR = new DotTextPropertyDescriptor(
+			TYPE_ID, Messages.MemOpDescriptor_3);
 
 	/** Time descriptor */
 	private static final String TIME_ID = "time"; //$NON-NLS-1$
-	private final DotTextPropertyDescriptor TIME_DESCRIPTOR = new DotTextPropertyDescriptor(TIME_ID, Messages.MemOpDescriptor_5);
+	private final DotTextPropertyDescriptor TIME_DESCRIPTOR = new DotTextPropertyDescriptor(
+			TIME_ID, Messages.MemOpDescriptor_5);
 
 	/** size descriptor */
 	private static final String SIZE_ID = "size"; //$NON-NLS-1$
-	private final DotTextPropertyDescriptor SIZE_DESCRIPTOR = new DotTextPropertyDescriptor(SIZE_ID, Messages.MemOpDescriptor_7);
+	private final DotTextPropertyDescriptor SIZE_DESCRIPTOR = new DotTextPropertyDescriptor(
+			SIZE_ID, Messages.MemOpDescriptor_7);
 
 	/** memory address descriptor */
 	private static final String ADDR_ID = "address"; //$NON-NLS-1$
-	private final DotTextPropertyDescriptor ADDR_DESCRIPTOR = new DotTextPropertyDescriptor(ADDR_ID, Messages.MemOpDescriptor_9);
+	private final DotTextPropertyDescriptor ADDR_DESCRIPTOR = new DotTextPropertyDescriptor(
+			ADDR_ID, Messages.MemOpDescriptor_9);
 
 	/** total memory size consumed by the process descriptor */
 	private static final String TSIZE_ID = "total"; //$NON-NLS-1$
-	private final DotTextPropertyDescriptor TSIZE_DESCRIPTOR = new DotTextPropertyDescriptor(TSIZE_ID, Messages.MemOpDescriptor_11);
+	private final DotTextPropertyDescriptor TSIZE_DESCRIPTOR = new DotTextPropertyDescriptor(
+			TSIZE_ID, Messages.MemOpDescriptor_11);
+
+	/** thread id descriptor */
+	private static final String THREAD_ID = "thread"; //$NON-NLS-1$
+	private final DotTextPropertyDescriptor THREAD_DESCRIPTOR = new DotTextPropertyDescriptor(
+			THREAD_ID, Messages.MemOpDescriptor_10);
 
-	/** life time of an allocation descriptor. This applies only to non Leaked allocations  */
+	/**
+	 * life time of an allocation descriptor. This applies only to non Leaked
+	 * allocations
+	 */
 	private static final String LIFETIME_ID = "lifetime"; //$NON-NLS-1$
-	private final DotTextPropertyDescriptor LIFETIME_DESCRIPTOR = new DotTextPropertyDescriptor(LIFETIME_ID, Messages.MemOpDescriptor_13);
+	private final DotTextPropertyDescriptor LIFETIME_DESCRIPTOR = new DotTextPropertyDescriptor(
+			LIFETIME_ID, Messages.MemOpDescriptor_13);
 	private static final String ATTRIBUTES_GROUP = "Attributes"; //$NON-NLS-1$
 	/** used for making absolute time values relative */
 	private long baseTime;
 
-	/** callstack item descriptor id*/
+	/** callstack item descriptor id */
 	private static final String CALL_STACK_ID = "callstack"; //$NON-NLS-1$
 
 	/** current project */
@@ -115,38 +130,50 @@
 	/** c++ files from the current project */
 	AbstractList<String> cppFileNames;
 	static final String LINE_SEPARATOR = " :: "; //$NON-NLS-1$
-	
+
 	private ICallstackManager callstackManager;
+
 	/**
 	 * Constructor
-	 * @param newBaseTime usually process start time, used for making absolute time values relative   
-	 * @param info the alloc or free info
-	 * @param project IProject to use for locating source file 
-	 * @param symReader the SymReader to use for pinpointing
-	 * @param cppFiles 
-	 * @param callstackManager CallstackManager for reading callstacks from BaseInfo
+	 * 
+	 * @param newBaseTime
+	 *            usually process start time, used for making absolute time
+	 *            values relative
+	 * @param info
+	 *            the alloc or free info
+	 * @param project
+	 *            IProject to use for locating source file
+	 * @param symReader
+	 *            the SymReader to use for pinpointing
+	 * @param cppFiles
+	 * @param callstackManager
+	 *            CallstackManager for reading callstacks from BaseInfo
 	 */
-	public MemOpDescriptor(Long newBaseTime, BaseInfo info, IProject project, SymReader symReader, AbstractList<String> cppFiles, ICallstackManager callstackManager) {
+	public MemOpDescriptor(Long newBaseTime, BaseInfo info, IProject project,
+			SymReader symReader, AbstractList<String> cppFiles,
+			ICallstackManager callstackManager) {
 		memInfo = info;
 		iCurrentProject = project;
 		iSymReader = symReader;
 		cppFileNames = cppFiles;
-		this.baseTime = newBaseTime;	
+		this.baseTime = newBaseTime;
 		this.callstackManager = callstackManager;
 	}
 
-	/* (non-Javadoc)
+	/*
+	 * (non-Javadoc)
+	 * 
 	 * @see org.eclipse.ui.views.properties.IPropertySource#getEditableValue()
 	 */
 	public Object getEditableValue() {
 		return null; // no edit
 	}
 
-
-
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.ui.views.properties.IPropertySource#getPropertyDescriptors()
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.ui.views.properties.IPropertySource#getPropertyDescriptors()
 	 */
 	public IPropertyDescriptor[] getPropertyDescriptors() {
 		final List<IPropertyDescriptor> completeList = new ArrayList<IPropertyDescriptor>();
@@ -162,131 +189,187 @@
 		completeList.add(ADDR_DESCRIPTOR);
 		TSIZE_DESCRIPTOR.setCategory(ATTRIBUTES_GROUP);
 		completeList.add(TSIZE_DESCRIPTOR);
-		if (memInfo instanceof AllocInfo && ((AllocInfo)memInfo).isFreed()) {
+		THREAD_DESCRIPTOR.setCategory(ATTRIBUTES_GROUP);
+		completeList.add(THREAD_DESCRIPTOR);
+		if (memInfo instanceof AllocInfo && ((AllocInfo) memInfo).isFreed()) {
 			LIFETIME_DESCRIPTOR.setCategory(ATTRIBUTES_GROUP);
-			completeList.add(LIFETIME_DESCRIPTOR); //only non leaks
+			completeList.add(LIFETIME_DESCRIPTOR); // only non leaks
 		}
 		// add callstack descriptors
-		if (callstackManager != null && callstackManager.hasCallstack(memInfo)){
+		if (callstackManager != null && callstackManager.hasCallstack(memInfo)) {
 			try {
-				List<AllocCallstack> callstack = callstackManager.readCallstack(memInfo);
-				if (callstack != null){
+				List<AllocCallstack> callstack = callstackManager
+						.readCallstack(memInfo);
+				if (callstack != null) {
 					for (int i = 0; i < callstack.size(); i++) {
-						
-						final DotTextPropertyDescriptor propDesc = new DotTextPropertyDescriptor(i, CALL_STACK_ID);
+
+						final DotTextPropertyDescriptor propDesc = new DotTextPropertyDescriptor(
+								i, CALL_STACK_ID);
 						propDesc.setCategory("CallStack"); //$NON-NLS-1$
 						completeList.add(propDesc);
-					}					
+					}
 				}
 			} catch (IOException e) {
-				//since callstacks aren't fatal and we can't handle it usefully here, log this to the error log
-				Activator.getDefault().log(IStatus.ERROR, Messages.MemOpDescriptor_18, e);
-			}			
+				// since callstacks aren't fatal and we can't handle it usefully
+				// here, log this to the error log
+				Activator.getDefault().log(IStatus.ERROR,
+						Messages.MemOpDescriptor_18, e);
+			}
 		}
-		return completeList.toArray(new TextPropertyDescriptor[completeList.size()]);
+		return completeList.toArray(new TextPropertyDescriptor[completeList
+				.size()]);
 	}
 
-	/* (non-Javadoc)
-	 * @see org.eclipse.ui.views.properties.IPropertySource#getPropertyValue(java.lang.Object)
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.ui.views.properties.IPropertySource#getPropertyValue(java
+	 * .lang.Object)
 	 */
 	public Object getPropertyValue(Object id) {
-		//Note, this method must return String values for the CellEditor to work
+		// Note, this method must return String values for the CellEditor to
+		// work
 		if (PID_ID.equals(id)) {
-			return String.valueOf(memInfo.getProcessID());//process ids are usually decimal values
+			return String.valueOf(memInfo.getProcessID());// process ids are
+			// usually decimal
+			// values
 		}
 		if (TYPE_ID.equals(id))
-			return memInfo instanceof AllocInfo ? ((AllocInfo)memInfo).isFreed() ? Messages.MemOpDescriptor_19 : Messages.MemOpDescriptor_20 : Messages.MemOpDescriptor_21;
+			return memInfo instanceof AllocInfo ? ((AllocInfo) memInfo)
+					.isFreed() ? Messages.MemOpDescriptor_19
+					: Messages.MemOpDescriptor_20 : Messages.MemOpDescriptor_21;
 		if (TIME_ID.equals(id))
 			return GraphUtils.renderTime(memInfo.getTime() - baseTime);
 		if (SIZE_ID.equals(id))
-			return String.format(Messages.MemOpDescriptor_22,memInfo.getSizeInt());
+			return String.format(Messages.MemOpDescriptor_22, memInfo
+					.getSizeInt());
 		if (ADDR_ID.equals(id))
-			return Long.toString(memInfo.getMemoryAddress(),16);
+			return Long.toString(memInfo.getMemoryAddress(), 16);
 		if (TSIZE_ID.equals(id))
-			return String.format(Messages.MemOpDescriptor_23,memInfo.getTotalMem());
+			return String.format(Messages.MemOpDescriptor_23, memInfo
+					.getTotalMem());
+		if (THREAD_ID.equals(id))
+			return String.valueOf(memInfo.getThreadId());
 		if (LIFETIME_ID.equals(id)) {
-			if (memInfo instanceof AllocInfo && ((AllocInfo)memInfo).isFreed()) {
+			if (memInfo instanceof AllocInfo && ((AllocInfo) memInfo).isFreed()) {
 				AllocInfo info = (AllocInfo) memInfo;
-				return GraphUtils.renderTime(info.getFreedBy().getTime() - info.getTime()); 
+				return GraphUtils.renderTime(info.getFreedBy().getTime()
+						- info.getTime());
 			}
-			throw new IllegalStateException("Should not happen because we did not provide a lifetime descriptor for leak and free"); //$NON-NLS-1$
+			throw new IllegalStateException(
+					"Should not happen because we did not provide a lifetime descriptor for leak and free."); //$NON-NLS-1$
 		}
-		if (id instanceof Integer && callstackManager.hasCallstack(memInfo)){
-			int callstackId = (Integer)id;
+		if (id instanceof Integer && callstackManager.hasCallstack(memInfo)) {
+			int callstackId = (Integer) id;
 			try {
-				List<AllocCallstack> callstackList = callstackManager.readCallstack(memInfo);
-				if (callstackId < callstackList.size()){
-					AllocCallstack callstackItem = callstackList.get(callstackId);
+				List<AllocCallstack> callstackList = callstackManager
+						.readCallstack(memInfo);
+				if (callstackId < callstackList.size()) {
+					AllocCallstack callstackItem = callstackList
+							.get(callstackId);
 					DllLoad tempLoad = callstackItem.getDllLoad();
 					long addr = callstackItem.getMemoryAddress();
-					
-					String name = String.format(Messages.MemOpDescriptor_25,addr);
-					if (tempLoad != null && callstackItem.getMemoryAddress()!= tempLoad.getStartAddress()) {
-						SourceFile aSourcefile = pinpoint(callstackItem.getMemoryAddress(),
-								callstackItem.getDllLoad());
-						if (aSourcefile != null) { //callstack resolved to a file-function-line
-							return name + LINE_SEPARATOR + callstackItem.getDllLoad().getName() + LINE_SEPARATOR + aSourcefile.getFileName()+ LINE_SEPARATOR + aSourcefile.getFunctionName() + LINE_SEPARATOR + aSourcefile.getLineNumber();
+
+					String name = String.format(Messages.MemOpDescriptor_25,
+							addr);
+					if (tempLoad != null
+							&& callstackItem.getMemoryAddress() != tempLoad
+									.getStartAddress()) {
+						SourceFile aSourcefile = pinpoint(callstackItem
+								.getMemoryAddress(), callstackItem.getDllLoad());
+						if (aSourcefile != null) { // callstack resolved to a
+							// file-function-line
+							return name + LINE_SEPARATOR
+									+ callstackItem.getDllLoad().getName()
+									+ LINE_SEPARATOR
+									+ aSourcefile.getFileName()
+									+ LINE_SEPARATOR
+									+ aSourcefile.getFunctionName()
+									+ LINE_SEPARATOR
+									+ aSourcefile.getLineNumber();
 						}
 					}
-					return name + (tempLoad != null ? LINE_SEPARATOR + tempLoad.getName() : ""); //$NON-NLS-1$
+					return name
+							+ (tempLoad != null ? LINE_SEPARATOR
+									+ tempLoad.getName() : ""); //$NON-NLS-1$
 				}
 			} catch (IOException e) {
-				//since callstacks aren't fatal and we can't handle it usefully here, log this to the error log
-				Activator.getDefault().log(IStatus.ERROR, Messages.MemOpDescriptor_27, e);
+				// since callstacks aren't fatal and we can't handle it usefully
+				// here, log this to the error log
+				Activator.getDefault().log(IStatus.ERROR,
+						Messages.MemOpDescriptor_27, e);
 			}
 		}
 		return null;
 	}
 
-	/* (non-Javadoc)
-	 * @see org.eclipse.ui.views.properties.IPropertySource#isPropertySet(java.lang.Object)
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.ui.views.properties.IPropertySource#isPropertySet(java.lang
+	 * .Object)
 	 */
 	public boolean isPropertySet(Object id) {
 		return false;
 	}
 
-	/* (non-Javadoc)
-	 * @see org.eclipse.ui.views.properties.IPropertySource#resetPropertyValue(java.lang.Object)
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.ui.views.properties.IPropertySource#resetPropertyValue(java
+	 * .lang.Object)
 	 */
 	public void resetPropertyValue(Object id) {
 		// do nothing
 	}
 
-	/* (non-Javadoc)
-	 * @see org.eclipse.ui.views.properties.IPropertySource#setPropertyValue(java.lang.Object, java.lang.Object)
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * org.eclipse.ui.views.properties.IPropertySource#setPropertyValue(java
+	 * .lang.Object, java.lang.Object)
 	 */
 	public void setPropertyValue(Object id, Object value) {
 		// do nothing
 	}
 
-	
 	/**
-	 * DotTextPropertyDescriptor  defines a read only TextPropertyDescriptor
-	 * It also add a customised key/mouse listener.
-	 * This listener will be useful for pinpointing the source.
-	 *
+	 * DotTextPropertyDescriptor defines a read only TextPropertyDescriptor It
+	 * also add a customised key/mouse listener. This listener will be useful
+	 * for pinpointing the source.
+	 * 
 	 */
 	private class DotTextPropertyDescriptor extends TextPropertyDescriptor {
 
 		/**
 		 * Constructor
-		 * @param id Descriptor Id
-		 * @param displayName Descriptor display name
+		 * 
+		 * @param id
+		 *            Descriptor Id
+		 * @param displayName
+		 *            Descriptor display name
 		 */
 		public DotTextPropertyDescriptor(Object id, String displayName) {
 			super(id, displayName);
 		}
 
 		/**
-		 * create a Read Only TextCellEditor and add the defined listener to its Control.
+		 * create a Read Only TextCellEditor and add the defined listener to its
+		 * Control.
+		 * 
 		 * @see org.eclipse.ui.views.properties.TextPropertyDescriptor#createPropertyEditor(org.eclipse.swt.widgets.Composite)
 		 */
 		@Override
 		public CellEditor createPropertyEditor(Composite parent) {
-			TextCellEditor editor = new SimpleTextCellEditor(parent,SWT.READ_ONLY);
+			TextCellEditor editor = new SimpleTextCellEditor(parent,
+					SWT.READ_ONLY);
 			Text control = (Text) editor.getControl();
 			control.setEditable(false);
-			
+
 			DotPropKeyMouseListener listener = new DotPropKeyMouseListener();
 			control.addKeyListener(listener);
 			control.addMouseListener(listener);
@@ -296,52 +379,50 @@
 			return editor;
 		}
 	}
-		
-		
+
 	private class SimpleTextCellEditor extends TextCellEditor {
 		public SimpleTextCellEditor(Composite parent, int readOnly) {
-			super(parent,readOnly);
+			super(parent, readOnly);
 		}
 
 		@Override
 		public boolean isCopyEnabled() {
 			return false;
 		}
-		
+
 		@Override
 		public boolean isCutEnabled() {
 			return false;
 		}
-		
+
 		@Override
 		public boolean isPasteEnabled() {
 			return false;
 		}
-		
+
 		@Override
 		public boolean isFindEnabled() {
 			return false;
 		}
 	}
-	
-	
+
 	/**
-	 * This class is only for convenience for the moment.
-	 * It's very likely that the listener will be provided by AnalyzeToolGraph
-	 *
+	 * This class is only for convenience for the moment. It's very likely that
+	 * the listener will be provided by AnalyzeToolGraph
+	 * 
 	 */
 	private class DotPropKeyMouseListener implements KeyListener, MouseListener {
 
-		//key
+		// Key
 
 		public void keyPressed(org.eclipse.swt.events.KeyEvent e) {
-			//do nothing by design
+			// do nothing by design
 		}
 
 		public void keyReleased(org.eclipse.swt.events.KeyEvent keyEvent) {
-			//System.out.println("key released.");
+			// System.out.println("key released.");
 			if (keyEvent.character == '\r') {
-				String text = ((Text)keyEvent.getSource()).getText();
+				String text = ((Text) keyEvent.getSource()).getText();
 				if (text != null) {
 					String[] segs = text.split(LINE_SEPARATOR);
 					if (segs.length == 5) {
@@ -349,13 +430,12 @@
 					}
 				}
 			}
-			
 		}
 
-		//Mouse
-		
+		// Mouse
+
 		public void mouseDoubleClick(MouseEvent e) {
-			String text = ((Text)e.getSource()).getText();
+			String text = ((Text) e.getSource()).getText();
 			if (text != null) {
 				String[] segs = text.split(LINE_SEPARATOR);
 				if (segs.length == 5) {
@@ -365,40 +445,39 @@
 		}
 
 		public void mouseDown(MouseEvent e) {
-			//do nothing by design
+			// do nothing by design
 		}
 
 		public void mouseUp(MouseEvent e) {
-			//do nothing by design
+			// do nothing by design
 		}
 	}
-	
-	
+
 	/**
 	 * Pinpoints one memory address to source code line.
-	 *
+	 * 
 	 * @param memoryAddress
 	 *            Memory address
 	 * @param dllLoad
-	 *           DllLoad item
+	 *            DllLoad item
 	 * @return SourceFile if found otherwise null
 	 */
 	private SourceFile pinpoint(Long memoryAddress, DllLoad dllLoad) {
 
 		if (dllLoad != null) {
 
-			ISymbolFile symbolFile = iSymReader.getSymbolFile(dllLoad.getName(),
-					false);
-			if( symbolFile != null ) {
+			ISymbolFile symbolFile = iSymReader.getSymbolFile(
+					dllLoad.getName(), false);
+			if (symbolFile != null) {
 				return pinpointToSrcLine(symbolFile, memoryAddress, dllLoad);
 			}
 		}
 		return null;
 	}
-	
+
 	/**
 	 * Pinpoints memory address to source code line
-	 *
+	 * 
 	 * @param symbolFile
 	 *            Opened symbol file
 	 * @param memoryAddress
@@ -426,7 +505,8 @@
 			}
 
 			// calculate memory address in symbol file
-			long calculated = (memoryAddress - dllLoad.getStartAddress()) + defaultLinkAddress;
+			long calculated = (memoryAddress - dllLoad.getStartAddress())
+					+ defaultLinkAddress;
 
 			java.math.BigInteger bigAddress = new java.math.BigInteger(Long
 					.toHexString(calculated), 16);
@@ -434,15 +514,13 @@
 			ISourceLocation loc = symbolFile.findSourceLocation(bigAddress);
 			if (func != null && loc != null) {
 				String sourceFile = loc.getSourceFile();
-				if (sourceFile == null
-						|| sourceFile.equalsIgnoreCase("")) //$NON-NLS-1$
+				if (sourceFile == null || sourceFile.equalsIgnoreCase("")) //$NON-NLS-1$
 					return null;
 				int lineNumber = loc.getLineNumber();
 				if (lineNumber == 0)
 					return null;
 				String name = func.getName();
-				if (name == null
-						|| name.equalsIgnoreCase("")) //$NON-NLS-1$
+				if (name == null || name.equalsIgnoreCase("")) //$NON-NLS-1$
 					return null;
 				/*
 				 * if( onlyForProjectFiles &&
@@ -454,7 +532,6 @@
 				file.setFunctionName(name);
 				return file;
 			}
-
 		} catch (java.lang.NumberFormatException nfe) {
 			// do nothing by design
 			nfe.printStackTrace();
@@ -462,15 +539,13 @@
 			// do nothing by design
 			e.printStackTrace();
 		}
-
 		return null;
 	}
-	
-	
+
 	/**
 	 * Opens current callstack item on default editor and pinpoints memory leak
 	 * line
-	 *
+	 * 
 	 * @param cppFileName
 	 *            Cpp file name
 	 * @param lineNumber
@@ -478,15 +553,14 @@
 	 */
 	private void openEditor(String cppFileName, String lineNumber) {
 
-		//check that used information is given
-		//we need to know file name and file line number
-		//that we could open the right line in editor
+		// check that used information is given
+		// we need to know file name and file line number
+		// that we could open the right line in editor
 		if (cppFileName == null || ("").equals(cppFileName) //$NON-NLS-1$
 				|| lineNumber == null || ("").equals(lineNumber)) { //$NON-NLS-1$
 			return;
 		}
 		try {
-
 			IFile file = null;
 			String usedFileName = null;
 			usedFileName = getFileNames(cppFileName);
@@ -511,7 +585,6 @@
 						break;
 					}
 				}
-
 			}
 
 			// if file still not found
@@ -543,20 +616,20 @@
 			e.printStackTrace();
 		}
 	}
-	
+
 	/**
 	 * Find symbol reader api pinpointed class file for project class files.
-	 *
+	 * 
 	 * @param fileName
-	 *            Cpp file name
-	 * @return Found cpp file location
+	 *            cpp file name
+	 * @return found cpp file location
 	 */
 	private String getFileNames(String fileName) {
 		int slash = Util.getLastSlashIndex(fileName);
 		String tempFile = fileName.substring(slash + 1, fileName.length());
 
 		String realFileName = fileName;
-		for(String tempFileName : cppFileNames){
+		for (String tempFileName : cppFileNames) {
 			int slashTemp = Util.getLastSlashIndex(tempFileName);
 			String tempFileWithoutExt = tempFileName.substring(slashTemp + 1,
 					tempFileName.length());
@@ -565,7 +638,6 @@
 				break;
 			}
 		}
-
 		return realFileName;
 	}
 }
--- a/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/internal/ui/graph/Messages.java	Tue Aug 24 12:10:03 2010 +0300
+++ b/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/internal/ui/graph/Messages.java	Tue Aug 24 12:16:27 2010 +0300
@@ -5,6 +5,7 @@
 public class Messages extends NLS {
 	private static final String BUNDLE_NAME = "com.nokia.s60tools.analyzetool.internal.ui.graph.messages"; //$NON-NLS-1$
 	public static String MemOpDescriptor_1;
+	public static String MemOpDescriptor_10;
 	public static String MemOpDescriptor_11;
 	public static String MemOpDescriptor_13;
 	public static String MemOpDescriptor_18;
--- a/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/internal/ui/graph/messages.properties	Tue Aug 24 12:10:03 2010 +0300
+++ b/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/internal/ui/graph/messages.properties	Tue Aug 24 12:16:27 2010 +0300
@@ -1,4 +1,5 @@
 MemOpDescriptor_1=Process Id
+MemOpDescriptor_10=Thread Id
 MemOpDescriptor_11=Total Size
 MemOpDescriptor_13=Life Time
 MemOpDescriptor_18=Error while reading callstacks from file.
--- a/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/internal/ui/util/ColorUtil.java	Tue Aug 24 12:10:03 2010 +0300
+++ b/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/internal/ui/util/ColorUtil.java	Tue Aug 24 12:16:27 2010 +0300
@@ -20,39 +20,41 @@
 import org.eclipse.swt.widgets.Display;
 
 /**
- * Utilities for generating the same (unique) colour for a given String every
+ * Utilities for generating the same (unique) color for a given String every
  * time.
  */
-public final class ColorUtil
-{
+public final class ColorUtil {
 	private static final int[] RGB_WHITE = { 255, 255, 255 };
-	private static final int[] RGB_GREY  = { 180, 180, 180 };//light grey
+	private static final int[] RGB_GREY = { 180, 180, 180 };// light grey
 	private static final int[] RGB_BLACK = { 0, 0, 0 };
-	private static final int[] RGB_100 = {100, 100, 100};//middle grey
-	private static final int[] RGB_170 = {170, 170, 170};//light grey
-	private static final int[] RGB_200 = {200, 200, 200};//very light grey
+	private static final int[] RGB_100 = { 100, 100, 100 };// middle grey
+	private static final int[] RGB_170 = { 170, 170, 170 };// light grey
+	private static final int[] RGB_200 = { 200, 200, 200 };// very light grey
 
-	/** Color representing the colour white */
-	public static final Color WHITE =
-		new Color(Display.getDefault(), RGB_WHITE[0], RGB_WHITE[1], RGB_WHITE[2]);
+	/** Color representing the color white */
+	public static final Color WHITE = new Color(Display.getDefault(),
+			RGB_WHITE[0], RGB_WHITE[1], RGB_WHITE[2]);
 
-	/** Color representing the colour grey */
-	public static final Color GREY =
-		new Color(Display.getDefault(), RGB_GREY[0], RGB_GREY[1], RGB_GREY[2]);
+	/** Color representing the color grey */
+	public static final Color GREY = new Color(Display.getDefault(),
+			RGB_GREY[0], RGB_GREY[1], RGB_GREY[2]);
+
+	/** Color representing the color black */
+	public static final Color BLACK = new Color(Display.getDefault(),
+			RGB_BLACK[0], RGB_BLACK[1], RGB_BLACK[2]);
 
-	/** Color representing the colour black */
-	public static final Color BLACK =
-		new Color(Display.getDefault(), RGB_BLACK[0], RGB_BLACK[1], RGB_BLACK[2]);
-	
 	/** Color representing middle grey */
-	public static final Color COLOR_100 = new Color(Display.getDefault(), RGB_100[0], RGB_100[1], RGB_100[2]);
+	public static final Color COLOR_100 = new Color(Display.getDefault(),
+			RGB_100[0], RGB_100[1], RGB_100[2]);
 	/** Color representing very light grey */
-	public static final Color COLOR_200 = new Color(Display.getDefault(), RGB_200[0], RGB_200[1], RGB_200[2]);
+	public static final Color COLOR_200 = new Color(Display.getDefault(),
+			RGB_200[0], RGB_200[1], RGB_200[2]);
 	/** Color representing light grey */
-	public static final Color COLOR_170 = new Color(Display.getDefault(), RGB_170[0], RGB_170[1], RGB_170[2]);
-	
+	public static final Color COLOR_170 = new Color(Display.getDefault(),
+			RGB_170[0], RGB_170[1], RGB_170[2]);
+
 	// Guard against instantiation
 	private ColorUtil() {
-		//do nothing by design
+		// do nothing by design
 	}
 }
--- a/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/internal/ui/util/GraphUtils.java	Tue Aug 24 12:10:03 2010 +0300
+++ b/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/internal/ui/util/GraphUtils.java	Tue Aug 24 12:16:27 2010 +0300
@@ -15,6 +15,7 @@
  *
  */
 package com.nokia.s60tools.analyzetool.internal.ui.util;
+
 import java.text.DecimalFormat;
 
 import org.eclipse.swt.SWT;
@@ -25,7 +26,7 @@
 
 /**
  * Utilities class for the graph
- *
+ * 
  */
 public final class GraphUtils {
 	private static final String MILLISECONDS = "ms"; //$NON-NLS-1$
@@ -35,17 +36,17 @@
 	private static final String DAYS = "d"; //$NON-NLS-1$
 	private static final String SPACE = " "; //$NON-NLS-1$
 	private static final int KILOBYTE = 1024;
-	private static final int MEGABYTE = 1024*1024;
-	private static final int GIGABYTE = 1024*1024*1024;
+	private static final int MEGABYTE = 1024 * 1024;
+	private static final int GIGABYTE = 1024 * 1024 * 1024;
 	private static final DecimalFormat MB_FORMAT = new DecimalFormat("#####.0");
-	private static final DecimalFormat BYTES_FORMAT = new DecimalFormat("#####.##");
-	
-	
-	//make constructor private so class doesn't get instantiated
-	private GraphUtils(){
-		//do nothing by design
+	private static final DecimalFormat BYTES_FORMAT = new DecimalFormat(
+			"#####.##");
+
+	// make constructor private so class doesn't get instantiated
+	private GraphUtils() {
+		// do nothing by design
 	}
-	
+
 	/**
 	 * 
 	 * @param aBytes
@@ -100,78 +101,88 @@
 
 		return bytes;
 	}
+
 	/**
 	 * Draws the given String and an arrow on an image and returns it.
-	 * @param name The string to display
+	 * 
+	 * @param name
+	 *            The string to display
 	 * @return the newly created image
 	 */
-	public static Image getVerticalLabel(final String name)
-	{
+	public static Image getVerticalLabel(final String name) {
 		final Image image = new Image(Display.getDefault(), 90, 14);
-	    final GC gc = new GC(image);
-	    final Font font = new Font(Display.getDefault(), Display.getDefault().getSystemFont().getFontData()[0].getName(), 9, SWT.BOLD);
-	    gc.setFont(font);
-	    gc.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_WHITE));
-	    gc.fillRectangle(0, 0, 90, 15);
-	    gc.setForeground(Display.getDefault().getSystemColor(SWT.COLOR_BLACK));
-	    gc.drawText(name + " ->", 0, 0, true);
-	    font.dispose();
-	    gc.dispose();
-	    return image;
+		final GC gc = new GC(image);
+		final Font font = new Font(Display.getDefault(), Display.getDefault()
+				.getSystemFont().getFontData()[0].getName(), 9, SWT.BOLD);
+		gc.setFont(font);
+		gc.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_WHITE));
+		gc.fillRectangle(0, 0, 90, 15);
+		gc.setForeground(Display.getDefault().getSystemColor(SWT.COLOR_BLACK));
+		gc.drawText(name + " ->", 0, 0, true);
+		font.dispose();
+		gc.dispose();
+		return image;
 	}
+
 	/**
-	 * Calculates the next larger or smaller scale. Used typically when zooming in / out.
-	 * @param scale the current scale
-	 * @param bigger flag to indicate whether to increase or decrease the scale
+	 * Calculates the next larger or smaller scale. Used typically when zooming
+	 * in / out.
+	 * 
+	 * @param scale
+	 *            the current scale
+	 * @param bigger
+	 *            flag to indicate whether to increase or decrease the scale
 	 * @return the new scale
 	 */
-	public static double nextScale(final double scale, final boolean bigger)
-    {
-    	double logScale = Math.log10(scale);
-    	double floorLogScale = Math.floor(Math.log10(scale));
-    	double mostSignificantDigit =  Math.rint(Math.pow(10, (logScale - floorLogScale)));
-    	double powerOfTen = Math.pow(10, floorLogScale);
-   	
-    	if (bigger) {
-    		if (mostSignificantDigit < 2) {
-    			mostSignificantDigit = 2;
-    		} else if (mostSignificantDigit < 5) {
-    			mostSignificantDigit = 5;
-    		} else {
-    			mostSignificantDigit = 10;
-    		}
-    	} else {
-    		if (mostSignificantDigit > 5) {
-    			mostSignificantDigit = 5;
-    		} else if (mostSignificantDigit > 2) {
-    			mostSignificantDigit = 2;
-    		} else if (mostSignificantDigit > 1) {
-    			mostSignificantDigit = 1;
-    		} else {
-    			mostSignificantDigit = 0.5;
-    		}
-    	}
+	public static double nextScale(final double scale, final boolean bigger) {
+		double logScale = Math.log10(scale);
+		double floorLogScale = Math.floor(Math.log10(scale));
+		double mostSignificantDigit = Math.rint(Math.pow(10,
+				(logScale - floorLogScale)));
+		double powerOfTen = Math.pow(10, floorLogScale);
 
-    	double result = mostSignificantDigit * powerOfTen;
- 
-    	if (result < 0.1)
-        	result = 0.1;
+		if (bigger) {
+			if (mostSignificantDigit < 2) {
+				mostSignificantDigit = 2;
+			} else if (mostSignificantDigit < 5) {
+				mostSignificantDigit = 5;
+			} else {
+				mostSignificantDigit = 10;
+			}
+		} else {
+			if (mostSignificantDigit > 5) {
+				mostSignificantDigit = 5;
+			} else if (mostSignificantDigit > 2) {
+				mostSignificantDigit = 2;
+			} else if (mostSignificantDigit > 1) {
+				mostSignificantDigit = 1;
+			} else {
+				mostSignificantDigit = 0.5;
+			}
+		}
 
-    	return result;
-    }
+		double result = mostSignificantDigit * powerOfTen;
+
+		if (result < 0.1)
+			result = 0.1;
+
+		return result;
+	}
+
 	/**
-	 * Returns the given amount of microseconds as user-friendly formatted string,
-	 * for example "3d 5h 20min 2d 3ms"
-	 * The returned string can be quite long. Use {@link #renderTime(double)} for
-	 * a short version
-	 * @param aTotalMicroSeconds the given amount of microseconds to convert
+	 * Returns the given amount of microseconds as user-friendly formatted
+	 * string, for example "3d 5h 20min 2d 3ms" The returned string can be quite
+	 * long. Use {@link #renderTime(double)} for a short version
+	 * 
+	 * @param aTotalMicroSeconds
+	 *            the given amount of microseconds to convert
 	 * @return the formatted time string
 	 */
 	@SuppressWarnings("nls")
-	public static String renderTime(final double aTotalMicroSeconds) { 
+	public static String renderTime(final double aTotalMicroSeconds) {
 		double totalMicroSeconds = aTotalMicroSeconds;
 		long days, hours, minutes, seconds, ms;
-		days= (long) (totalMicroSeconds / 86400000000L);
+		days = (long) (totalMicroSeconds / 86400000000L);
 		totalMicroSeconds -= days * 86400000000L;
 		hours = (long) (totalMicroSeconds / 3600000000L);
 		totalMicroSeconds -= hours * 3600000000L;
@@ -179,53 +190,55 @@
 		totalMicroSeconds -= minutes * 60000000;
 		seconds = (long) totalMicroSeconds / 1000000;
 		totalMicroSeconds -= seconds * 1000000;
-		ms = (long)totalMicroSeconds / 1000;
-		
-		StringBuilder result= new StringBuilder();
-		if(days > 0) {
+		ms = (long) totalMicroSeconds / 1000;
+
+		StringBuilder result = new StringBuilder();
+		if (days > 0) {
 			result.append(days).append(DAYS);
-		} 
-		if(hours > 0) {
-			if (result.length() > 0){
+		}
+		if (hours > 0) {
+			if (result.length() > 0) {
 				result.append(SPACE);
 			}
 			result.append(hours).append(HOURS);
-		} 
-		if(minutes > 0) {
-			if (result.length() > 0){
+		}
+		if (minutes > 0) {
+			if (result.length() > 0) {
 				result.append(SPACE);
 			}
 			result.append(minutes).append(MINUTES);
-		} 
-		if(seconds > 0) {
-			if (result.length() > 0){
+		}
+		if (seconds > 0) {
+			if (result.length() > 0) {
 				result.append(SPACE);
 			}
 			result.append(seconds).append(SECONDS);
 		}
-		if (ms > 0){
-			if (result.length() > 0){
+		if (ms > 0) {
+			if (result.length() > 0) {
 				result.append(SPACE);
 			}
 			result.append(ms).append(MILLISECONDS);
 		}
-		
-		if (result.length() == 0){
-			result.append(0).append(MILLISECONDS);			
+
+		if (result.length() == 0) {
+			result.append(0).append(MILLISECONDS);
 		}
 		return result.toString();
 	}
-	
+
 	/**
-	 * Formats the given number of bytes into an easily readable format 
-	 * @param bytes The number of bytes to format
-	 * @return String containing a formatted version of the input data 
+	 * Formats the given number of bytes into an easily readable format
+	 * 
+	 * @param bytes
+	 *            The number of bytes to format
+	 * @return String containing a formatted version of the input data
 	 */
 	public static String formatBytes(final double bytes) {
 		String scaledY;
 
 		if (bytes < 10000) {
-			scaledY = BYTES_FORMAT.format((long)bytes) + " B"; 
+			scaledY = BYTES_FORMAT.format((long) bytes) + " B";
 		} else if (bytes <= 500 * 1024) {
 			scaledY = BYTES_FORMAT.format(bytes / 1024) + " KB";
 		} else {
@@ -235,63 +248,67 @@
 	}
 
 	/**
-	 * Formats given time value to String with units. The resulting String
-	 * is formatted quite short, e.g.:
-	 * <br>"30s" 
-	 * <br>"1m 30s" 
-	 * <br>"40m"
-	 * <br>"1h 30m"
-	 * @param aTime Time in microseconds
+	 * Formats given time value to String with units. The resulting String is
+	 * formatted quite short, e.g.: <br>
+	 * "30s" <br>
+	 * "1m 30s" <br>
+	 * "40m" <br>
+	 * "1h 30m"
+	 * 
+	 * @param aTime
+	 *            Time in microseconds
 	 * @return time String with units
 	 */
 	public static String getTimeStringWithUnits(final double aTime) {
-		long time = (long) aTime / 1000; //convert from microseconds to milliseconds
-		String formatted ;
-		
-		//If we have only less than 10 seconds, show seconds and milliseconds
-		if(time < 6000){
-			//"s.S's'"
+		long time = (long) aTime / 1000; // convert from microseconds to
+											// milliseconds
+		String formatted;
+
+		// If we have only less than 10 seconds, show seconds and milliseconds
+		if (time < 6000) {
+			// "s.S's'"
 			int seconds = (int) time / 1000;
 			long ms = time - (seconds * 1000);
-			if (ms == 0 ){
-				formatted = String.format("%ds", seconds);				
+			if (ms == 0) {
+				formatted = String.format("%ds", seconds);
 			} else {
-				formatted = String.format("%ds%03d", seconds, ms);				
+				formatted = String.format("%ds%03d", seconds, ms);
 			}
 		}
-		//If we have 10s or more, but less than 1min, show seconds
-		else if(time < 60000){
-			//"s's'"
+		// If we have 10s or more, but less than 1min, show seconds
+		else if (time < 60000) {
+			// "s's'"
 			formatted = String.format("%ds", (int) time / 1000);
 		}
-		//If we have more than one minute, but less than one 5min, showing the seconds as well
-		else if(time >= 60000 && time < (60000*5)){
-			//"m'm' s's'"
+		// If we have more than one minute, but less than one 5min, showing the
+		// seconds as well
+		else if (time >= 60000 && time < (60000 * 5)) {
+			// "m'm' s's'"
 			long minutes = (int) time / 60000;
 			long seconds = (time - minutes * 60000) / 1000;
-			if (seconds == 0 ){
+			if (seconds == 0) {
 				formatted = String.format("%dm", minutes);
 			} else {
 				formatted = String.format("%dm %ds", minutes, seconds);
 			}
 		}
-		//If we have more than five minute, but less than one hour, we show only minutes
-		else if(time >= (60000*5) && time < (60*60*1000)){
-			//"m'm'"
+		// If we have more than five minute, but less than one hour, we show
+		// only minutes
+		else if (time >= (60000 * 5) && time < (60 * 60 * 1000)) {
+			// "m'm'"
 			formatted = String.format("%dm", (int) time / 60000);
-		}		
-		else{
-			//"H'h' m'm'"
+		} else {
+			// "H'h' m'm'"
 			long hours = (time / 3600000);
 			long minutes = (time - hours * 3600000) / 60000;
-			
-			if (minutes == 0){
-				formatted = String.format("%dh", hours);				
+
+			if (minutes == 0) {
+				formatted = String.format("%dh", hours);
 			} else {
-				formatted = String.format("%dh %dm", hours, minutes);				
+				formatted = String.format("%dh %dm", hours, minutes);
 			}
 
-		}		
+		}
 		return formatted;
 	}
 }
--- a/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/preferences/AdvancedPreferencePage.java	Tue Aug 24 12:10:03 2010 +0300
+++ b/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/preferences/AdvancedPreferencePage.java	Tue Aug 24 12:16:27 2010 +0300
@@ -29,16 +29,15 @@
 
 /**
  * This class implements AnalyzeTool advanced preference page.
- *
+ * 
  * @author kihe
- *
+ * 
  */
 public class AdvancedPreferencePage extends PreferencePage implements
 		IWorkbenchPreferencePage {
 
-	/** Label to display info text  */
+	/** Label to display info text */
 	private Label infoText;
-	
 
 	/**
 	 * Constructor.
@@ -47,10 +46,9 @@
 		super();
 	}
 
-
 	/**
 	 * Creates this preference page content.
-	 *
+	 * 
 	 * @param parent
 	 *            This preference page parent
 	 */
@@ -74,16 +72,18 @@
 		composite.setLayout(gridLayout);
 
 		infoText = new Label(composite, INFORMATION);
-		infoText.setText("AnalyzeTool rom symbol definition is changed to project related definition. \nSelect project - properties - " +
-				"Carbide extensions - AnalyzeTool to define symbol file(s).");
+		infoText
+				.setText("AnalyzeTool rom symbol definition is changed to project related definition. \nSelect project - properties - "
+						+ "Carbide extensions - AnalyzeTool to define symbol file(s).");
 
 		return composite;
 	}
 
 	/*
 	 * (non-Javadoc)
-	 *
-	 * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
+	 * 
+	 * @see
+	 * org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
 	 */
 	public void init(final IWorkbench workbench) {
 		// MethodDeclaration/Block[count(BlockStatement) = 0 and
--- a/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/preferences/AnalyzeToolPreferencePage.java	Tue Aug 24 12:10:03 2010 +0300
+++ b/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/preferences/AnalyzeToolPreferencePage.java	Tue Aug 24 12:16:27 2010 +0300
@@ -17,6 +17,9 @@
 
 package com.nokia.s60tools.analyzetool.preferences;
 
+import java.io.File;
+import java.text.MessageFormat;
+
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.Path;
 import org.eclipse.jface.preference.FieldEditorPreferencePage;
@@ -38,6 +41,7 @@
 import org.eclipse.ui.IWorkbenchPreferencePage;
 import org.eclipse.ui.PlatformUI;
 
+import com.nokia.carbide.cpp.epoc.engine.image.ISVGSource;
 import com.nokia.s60tools.analyzetool.Activator;
 import com.nokia.s60tools.analyzetool.AnalyzeToolHelpContextIDs;
 import com.nokia.s60tools.analyzetool.global.Constants;
@@ -46,8 +50,8 @@
 
 /**
  * This class represents a preference page that is contributed to the
- * Preferences dialog. By subclassing <samp>FieldEditorPreferencePage</samp>,
- * we can use the field support built into JFace that allows us to create a page
+ * Preferences dialog. By subclassing <samp>FieldEditorPreferencePage</samp>, we
+ * can use the field support built into JFace that allows us to create a page
  * that is small and knows how to save, restore and apply itself.
  * <p>
  * This page is used to modify preferences only. They are stored in the
@@ -56,7 +60,7 @@
  */
 
 public class AnalyzeToolPreferencePage extends FieldEditorPreferencePage
-		implements IWorkbenchPreferencePage, Listener{
+		implements IWorkbenchPreferencePage, Listener {
 
 	/** Button to ask always. */
 	Button askButton = null;
@@ -73,9 +77,6 @@
 	/** Browse button to active file selection dialog. */
 	Button browseButton = null;
 
-	/** Button to activate/deactivate statistic generation */
-	//Button generateStatistic = null;
-
 	/** Group for callstack size buttons. */
 	Group csSizeGroup;
 
@@ -88,12 +89,6 @@
 	/** Hundred items button */
 	Button hundredButton;
 
-	/** Button to use process data. */
-	Button processButton = null;
-
-	/** Button to refresh atool.exe version. */
-	Button refreshAtoolVersion = null;
-
 	/** Radio group for report level. */
 	RadioGroupFieldEditor reportLevels = null;
 
@@ -112,24 +107,22 @@
 	 */
 	Button useDefaultLocation = null;
 
-	/** Button to use user specified data file name. */
-	Button userButton = null;
-
 	/** Use user specified location. */
 	Button useUserSpecified = null;
 
 	/** Button to verbose atool.exe output. */
 	Button verboseButton = null;
 
-	/** Button to select TraceViewer connection. */
-	Button externalButton = null;
-
 	/** Button to select fast external data gathering mode */
 	Button externalFastButton = null;
 
 	/** No items button. */
 	Button zeroButton;
 
+	Label logPath;
+	Text logPathText;
+	Label fileName;
+	Text fileNameText;
 
 	/**
 	 * Constructor.
@@ -146,7 +139,7 @@
 	 */
 	public final void checkInitValues() {
 		IPreferenceStore store = Activator.getPreferences();
-		
+
 		// get stored atool folder
 		String atoolFolder = store.getString(Constants.ATOOL_FOLDER);
 		atoolVerLabel.setText(Constants.PREFS_ATOOL_VER_NOT_FOUND);
@@ -155,7 +148,7 @@
 		if (atoolFolder.equals(Constants.DEFAULT_ATOOL_FOLDER)) {
 
 			// check that stored atool location exists
-			java.io.File file = new java.io.File(atoolFolder);
+			File file = new File(atoolFolder);
 			if (file.exists()) { // if exists use this location and update
 				// preference page buttons
 				useDefaultLocation.setSelection(false);
@@ -164,12 +157,10 @@
 			} else { // location could not found => use internal atool
 				useDefaultLocation.setSelection(true);
 				store.setValue(Constants.USE_INTERNAL, true);
-
 			}
 		} else {
 			boolean useDef = store.getBoolean(Constants.USE_INTERNAL);
 			useDefaultLocation.setSelection(useDef);
-
 		}
 
 		// get atool.exe path and set it atool.exe path field
@@ -179,28 +170,17 @@
 		// update preference page buttons
 		handleDefaultLocationChange();
 
-		// update atool.exe version number
-		if (useDefaultLocation.getSelection()) {
-			updateAtoolVersion(null);
-		} else {
-			updateAtoolVersion(atoolDirText.getText());
-		}
-
 		// get logging mode and update buttons
 		String fileMode = store.getString(Constants.LOGGING_MODE);
 		setGroupButtons(fileMode);
 
-		String loggingMode = store.getString(Constants.S60_LOG_FILE_MODE);
-		if (loggingMode.equals(Constants.LOGGING_S60_USER_SPECIFIED)) {
-			processButton.setSelection(false);
-			userButton.setSelection(true);
-		} else {
-			processButton.setSelection(true);
-			userButton.setSelection(false);
-		}
+		logPathText.setText(store.getString(Constants.DEVICE_LOG_FILE_PATH));
+		fileNameText.setText(store.getString(Constants.DEVICE_LOG_FILE_NAME));
+
+		logPathText.setText(store.getString(Constants.DEVICE_LOG_FILE_PATH));
+		fileNameText.setText(store.getString(Constants.DEVICE_LOG_FILE_NAME));
 
 		verboseButton.setSelection(store.getBoolean(Constants.ATOOL_VERBOSE));
-		//generateStatistic.setSelection(store.getBoolean(Constants.CREATE_STATISTIC));
 
 		// get stored callstack size
 		int callstackSize = store.getInt(Constants.CALLSTACK_SIZE);
@@ -220,12 +200,11 @@
 			spinner.setEnabled(true);
 			spinner.setSelection(callstackSize);
 		}
-		
 	}
 
 	/**
 	 * Check if user entered folder location is available.
-	 *
+	 * 
 	 * @param folderLocation
 	 *            User entered folder location
 	 * @return True if folder exists otherwise False
@@ -301,8 +280,7 @@
 	/**
 	 * Creates data gathering group items
 	 */
-	private void createGatheringGroup()
-	{
+	private void createGatheringGroup() {
 		// create new button group for logging mode
 		Group groupGatheringMode = new Group(getFieldEditorParent(), SWT.NULL);
 		groupGatheringMode.setText(Constants.PREFS_LOGGING_MODE_TITLE);
@@ -316,12 +294,6 @@
 		gridData.horizontalSpan = 1;
 		groupGatheringMode.setLayoutData(gridData);
 
-		// External mode button
-		externalButton = new Button(groupGatheringMode, SWT.RADIO);
-		externalButton.setToolTipText(Constants.PREFS_EXT_TOOLTIP);
-		externalButton.setText(Constants.PREFS_EXT);
-		externalButton.addListener(SWT.Selection, this);
-
 		// External fast mode button
 		externalFastButton = new Button(groupGatheringMode, SWT.RADIO);
 		externalFastButton.setToolTipText(Constants.PREFS_EXT_FAST_TOOLTIP);
@@ -334,32 +306,40 @@
 		s60Button.setText(Constants.PREFS_S60);
 		s60Button.addListener(SWT.Selection, this);
 
-		Composite compStoreMode = new Composite(groupGatheringMode, SWT.NULL);
+		Composite compS60 = new Composite(groupGatheringMode, SWT.NULL);
 
-		final GridLayout layoutStoreMode = new GridLayout();
-		layoutStoreMode.marginLeft = 15;
-		layoutStoreMode.numColumns = 1;
-		compStoreMode.setLayout(layoutStoreMode);
+		final GridLayout layoutS60 = new GridLayout();
+		layoutS60.marginLeft = 15;
+		layoutS60.numColumns = 2;
+		compS60.setLayout(layoutS60);
+
+		// path label
+		logPath = new Label(compS60, SWT.NONE);
+		logPath.setToolTipText("Log file path in the device.");
+		logPath.setText("Log file path:");
 
-		// use process name button
-		processButton = new Button(compStoreMode, SWT.RADIO);
-		processButton.setToolTipText(Constants.PREFS_USE_PROCESS_NAME_TOOLTIP);
-		processButton.setText(Constants.PREFS_USE_PROCESS_NAME);
-		processButton.addListener(SWT.Selection, this);
+		// path field
+		logPathText = new Text(compS60, SWT.BORDER);
+		logPathText.setLayoutData(new GridData(280, SWT.DEFAULT));
+		logPathText.setText("C:\\logs\\atool\\");
 
-		// user specified button
-		userButton = new Button(compStoreMode, SWT.RADIO);
-		userButton.setToolTipText(Constants.PREFS_USER_SPEC_TOOLTIP);
-		userButton.setText(Constants.PREFS_USER_SPEC);
-		userButton.addListener(SWT.Selection, this);
+		// filename label
+		fileName = new Label(compS60, SWT.NONE);
+		fileName.setToolTipText("Log file name.");
+		fileName.setText("Filename:");
+
+		// filename field
+		fileNameText = new Text(compS60, SWT.BORDER);
+		fileNameText.setLayoutData(new GridData(280, SWT.DEFAULT));
+		fileNameText.setText("%processname%.dat");
 
 		// ask always button
 		askButton = new Button(groupGatheringMode, SWT.RADIO);
 		askButton.setToolTipText(Constants.PREFS_ASK_ALWAYS_TOOLTIP);
 		askButton.setText(Constants.PREFS_ASK_ALWAYS);
 		askButton.addListener(SWT.Selection, this);
+	}
 
-	}
 	/**
 	 * Creates the field editors. Field editors are abstractions of the common
 	 * GUI blocks needed to manipulate various types of preferences. Each field
@@ -367,7 +347,7 @@
 	 */
 	@Override
 	public final void createFieldEditors() {
-		
+
 		Composite composite = new Composite(getFieldEditorParent(), SWT.NULL);
 		final GridLayout gridLayout = new GridLayout();
 		gridLayout.numColumns = 3;
@@ -415,6 +395,7 @@
 
 		// directory field
 		atoolDirText = new Text(compAtool, SWT.BORDER);
+		atoolDirText.setEditable(false);
 		atoolDirText.setLayoutData(new GridData(200, SWT.DEFAULT));
 
 		// button which opens the folder selection dialog
@@ -423,12 +404,6 @@
 		browseButton.setText(Constants.PREFS_BROWSE);
 		browseButton.addListener(SWT.Selection, this);
 
-		// generate statistics for the test run
-		/*
-		generateStatistic = new Button(groupAtool, SWT.CHECK);
-		generateStatistic.setText("Generate statistics");
-		generateStatistic.setToolTipText("Generate statistics");
-		*/
 		// verbose atool.exe output
 		verboseButton = new Button(groupAtool, SWT.CHECK);
 		verboseButton.setText(Constants.PREFS_VERBOSE);
@@ -456,11 +431,6 @@
 		vergd13.horizontalSpan = 2;
 		atoolVerLabel.setLayoutData(vergd13);
 
-		// create button to refresh atool.exe version
-		refreshAtoolVersion = new Button(groupVersion, SWT.NONE);
-		refreshAtoolVersion.setText(Constants.PREFS_REFRESH_VERSION);
-		refreshAtoolVersion.addListener(SWT.Selection, this);
-
 		// create data gathering group
 		createGatheringGroup();
 
@@ -477,16 +447,43 @@
 				getFieldEditorParent(), true);
 
 		addField(reportLevels);
-		
+
 		checkInitValues();
 		PlatformUI.getWorkbench().getHelpSystem().setHelp(super.getControl(),
 				AnalyzeToolHelpContextIDs.ANALYZE_TOOL_VIEW_MEM_LEAKS);
+	}
 
+	@Override
+	protected void checkState() {
+		super.checkState();
+
+		String path;
+
+		if (useDefaultLocation.getSelection()) {
+			path = null;
+		} else {
+			path = atoolDirText.getText();
+		}
+
+		if (Util.getAtoolVersionNumber(path).equals(
+				Constants.PREFS_ATOOL_VER_NOT_FOUND)) {
+			setErrorMessage(Constants.PREFS_CLE_NOT_AVAILABLE);
+			setValid(false);
+		} else if (Util.compareVersionNumber(Util.getAtoolVersionNumber(path),
+				Constants.MIN_CLE_SUPPORTED) == Constants.VERSION_NUMBERS_SECOND) {
+			setErrorMessage(MessageFormat.format(
+					Constants.PREFS_CLE_OLDER_THAN_MIN,
+					Constants.MIN_CLE_SUPPORTED));
+			setValid(false);
+		} else {
+			setErrorMessage(null);
+			setValid(true);
+		}
 	}
 
 	/**
-	 * Handles atool.exe location selection changes Update corresponding buttons
-	 * states.
+	 * Handles atool.exe location selection changes. Update corresponding
+	 * buttons states.
 	 */
 	public final void handleDefaultLocationChange() {
 		if (useDefaultLocation.getSelection()) {
@@ -494,36 +491,34 @@
 			browseButton.setEnabled(false);
 			atoolDir.setEnabled(false);
 			useUserSpecified.setSelection(false);
+			updateAtoolVersion(null);
 		} else {
 			atoolDirText.setEnabled(true);
 			browseButton.setEnabled(true);
 			atoolDir.setEnabled(true);
 			useUserSpecified.setSelection(true);
+			updateAtoolVersion(atoolDirText.getText());
 		}
 	}
-	
+
 	/*
 	 * (non-Javadoc)
-	 * @see org.eclipse.swt.widgets.Listener#handleEvent(org.eclipse.swt.widgets.Event)
+	 * 
+	 * @see
+	 * org.eclipse.swt.widgets.Listener#handleEvent(org.eclipse.swt.widgets.
+	 * Event)
 	 */
 	public final void handleEvent(final Event event) {
 		if (event.widget == browseButton) {
 			openFolderDialog();
-		} else if (event.widget == externalButton || event.widget == externalFastButton || event.widget == askButton ) {
-			userButton.setEnabled(false);
-			processButton.setEnabled(false);
+		} else if (event.widget == externalFastButton
+				|| event.widget == askButton) {
+			setFileModeEnabled(false);
 		} else if (event.widget == s60Button) {
-			userButton.setEnabled(true);
-			processButton.setEnabled(true);
+			setFileModeEnabled(true);
 		} else if (event.widget == useDefaultLocation
 				|| event.widget == atoolDir) {
 			handleDefaultLocationChange();
-		} else if (event.widget == refreshAtoolVersion) {
-			if (useDefaultLocation.getSelection()) {
-				updateAtoolVersion(null);
-			} else {
-				updateAtoolVersion(atoolDirText.getText());
-			}
 		} else if (event.widget == zeroButton || event.widget == fortyButton
 				|| event.widget == hundredButton) {
 			spinner.setEnabled(false);
@@ -534,8 +529,9 @@
 
 	/*
 	 * (non-Javadoc)
-	 *
-	 * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
+	 * 
+	 * @see
+	 * org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
 	 */
 	public void init(final IWorkbench workbench) {
 		// MethodDeclaration/Block[count(BlockStatement) = 0 and
@@ -553,6 +549,7 @@
 		String folderPath = folderDialog.open();
 		if (folderPath != null) {
 			atoolDirText.setText(folderPath);
+			updateAtoolVersion(atoolDirText.getText());
 		}
 	}
 
@@ -561,26 +558,19 @@
 	 */
 	@Override
 	public final void performDefaults() {
-		//check that AT prefs page is displayed
-		//if( getControl() != null && getControl().isVisible() ) {
-
-			processButton.setSelection(true);
-			userButton.setSelection(false);
-			setGroupButtons(Constants.LOGGING_EXT);
+		setGroupButtons(Constants.LOGGING_EXT_FAST);
+		atoolDirText.setText(Constants.DEFAULT_ATOOL_FOLDER);
+		useDefaultLocation.setSelection(true);
+		handleDefaultLocationChange();
+		verboseButton.setSelection(false);
+		zeroButton.setSelection(false);
+		fortyButton.setSelection(true);
+		hundredButton.setSelection(false);
+		customButton.setSelection(false);
+		spinner.setEnabled(false);
 
-			atoolDirText.setText(Constants.DEFAULT_ATOOL_FOLDER);
-			useDefaultLocation.setSelection(true);
-			handleDefaultLocationChange();
-			verboseButton.setSelection(false);
-			zeroButton.setSelection(false);
-			fortyButton.setSelection(true);
-			hundredButton.setSelection(false);
-			customButton.setSelection(false);
-			spinner.setEnabled(false);
-			
-			//generateStatistic.setSelection(false);
-			super.performDefaults();	
-		//}
+		logPathText.setText("C:\\logs\\atool\\");
+		fileNameText.setText("%processname%.dat");
 	}
 
 	/**
@@ -589,208 +579,132 @@
 	 */
 	@Override
 	public final boolean performOk() {
-		
-		//check that AT prefs page is displayed
-		//if( getControl() != null && getControl().isVisible() ) {
-			IPreferenceStore store = Activator.getPreferences();
-			String atoolFolder = atoolDirText.getText();
+
+		IPreferenceStore store = Activator.getPreferences();
 
-			// use default location is selected
-			if (useDefaultLocation.getSelection()) {
-				store.setValue(Constants.ATOOL_FOLDER, Util
-						.getDefaultAtoolLocation());
-				store.setValue(Constants.USE_INTERNAL, true);
-			}
-			// using user specified atool.exe location and the folder contains
-			// atool.exe
-			else if (checkIfFolderExists(atoolFolder)) {
-				store.setValue(Constants.ATOOL_FOLDER, atoolFolder);
-				store.setValue(Constants.USER_SELECTED_FOLDER, atoolFolder);
-				store.setValue(Constants.USE_INTERNAL, false);
-			}
-			// user selected folder does not contain atool.exe
-			// ask confirmation to use this folder anyway
-			else {
-				boolean ret = Util
-						.openConfirmationDialog(Constants.CONFIRM_DIR_DOES_NOT_CONTAIN_ATOOL);
-				if (ret) {
+		// use default location is selected
+		if (useDefaultLocation.getSelection()) {
+			store.setValue(Constants.ATOOL_FOLDER, Util
+					.getDefaultAtoolLocation());
+			store.setValue(Constants.USE_INTERNAL, true);
+		}
+		// using user specified atool.exe location and the folder contains
+		// atool.exe
+		else {
+			store.setValue(Constants.ATOOL_FOLDER, atoolDirText.getText());
+			store.setValue(Constants.USER_SELECTED_FOLDER, atoolDirText
+					.getText());
+			store.setValue(Constants.USE_INTERNAL, false);
+		}
 
-					store.setValue(Constants.ATOOL_FOLDER, atoolFolder);
-					store.setValue(Constants.USER_SELECTED_FOLDER, atoolFolder);
-					store.setValue(Constants.USE_INTERNAL, false);
-				} else {
-					return false;
-				}
-			}
+		// store logging mode
+		if (askButton.getSelection()) {
+			store.setValue(Constants.LOGGING_MODE,
+					Constants.LOGGING_ASK_ALLWAYS);
+		} else if (s60Button.getSelection()) {
+			store.setValue(Constants.LOGGING_MODE, Constants.LOGGING_S60);
+		} else if (externalFastButton.getSelection()) {
+			store.setValue(Constants.LOGGING_MODE, Constants.LOGGING_EXT_FAST);
+		}
+		store.setValue(Constants.DEVICE_LOG_FILE_PATH, logPathText.getText());
+		store.setValue(Constants.DEVICE_LOG_FILE_NAME, fileNameText.getText());
 
-			// store logging mode
-			if (askButton.getSelection()) {
-				store.setValue(Constants.LOGGING_MODE,
-						Constants.LOGGING_ASK_ALLWAYS);
-			} else if (s60Button.getSelection()) {
-				store.setValue(Constants.LOGGING_MODE, Constants.LOGGING_S60);
-			} else if( externalFastButton.getSelection() ) {
-				store.setValue(Constants.LOGGING_MODE, Constants.LOGGING_EXT_FAST);
-			} else {
-				store.setValue(Constants.LOGGING_MODE, Constants.LOGGING_EXT);
-			}
+		// store value of verbose atool.exe output
+		store.setValue(Constants.ATOOL_VERBOSE, verboseButton.getSelection());
 
-			// store log file option
-			if (userButton.getSelection()) {
-				store.setValue(Constants.S60_LOG_FILE_MODE,
-						Constants.LOGGING_S60_USER_SPECIFIED);
-			} else {
-				store.setValue(Constants.S60_LOG_FILE_MODE,
-						Constants.LOGGING_S60_PROCESS_NAME);
-			}
-
-			// store value of verbose atool.exe output
-			store.setValue(Constants.ATOOL_VERBOSE, verboseButton.getSelection());
-
-			// update preference value
-			// this values is used later when UI creates/update toolbar options and when building project with "ask always" option
-			if( externalFastButton.isEnabled() ) {
-				store.setValue(Constants.LOGGING_FAST_ENABLED, true);
-			}
-			else {
-				store.setValue(Constants.LOGGING_FAST_ENABLED, false);
-			}
-			// store.setValue(Constants.CREATE_STATISTIC,
-			// generateStatistic.getSelection());
+		// update preference value
+		// this values is used later when UI creates/update toolbar options and
+		// when building project with "ask always" option
+		if (externalFastButton.isEnabled()) {
+			store.setValue(Constants.LOGGING_FAST_ENABLED, true);
+		} else {
+			store.setValue(Constants.LOGGING_FAST_ENABLED, false);
+		}
 
-			// get callstack size
-			int size = 0;
-			boolean userDefinedCSSize = false;
-			if (zeroButton.getSelection() && zeroButton.isEnabled()) {
-				userDefinedCSSize = true;
-			} else if (fortyButton.getSelection() && fortyButton.isEnabled()) {
-				size = 40;
-				userDefinedCSSize = true;
-			} else if (hundredButton.getSelection() && hundredButton.isEnabled()) {
-				size = 100;
-				userDefinedCSSize = true;
-			} else if (customButton.getSelection() && customButton.isEnabled()) {
-				size = spinner.getSelection();
-				userDefinedCSSize = true;
-			}
+		// get callstack size
+		int size = 0;
+		boolean userDefinedCSSize = false;
+		if (zeroButton.getSelection() && zeroButton.isEnabled()) {
+			userDefinedCSSize = true;
+		} else if (fortyButton.getSelection() && fortyButton.isEnabled()) {
+			size = 40;
+			userDefinedCSSize = true;
+		} else if (hundredButton.getSelection() && hundredButton.isEnabled()) {
+			size = 100;
+			userDefinedCSSize = true;
+		} else if (customButton.getSelection() && customButton.isEnabled()) {
+			size = spinner.getSelection();
+			userDefinedCSSize = true;
+		}
 
-			// store callstack size
-			store.setValue(Constants.USE_CALLSTACK_SIZE, userDefinedCSSize);
-			store.setValue(Constants.CALLSTACK_SIZE, size);
-			
-			// update view with new settings
-			IActionListener listener = Activator.getActionListener();
-			if (listener != null) {
-				listener.preferenceChanged();
-			}
-		//}
-		
+		// store callstack size
+		store.setValue(Constants.USE_CALLSTACK_SIZE, userDefinedCSSize);
+		store.setValue(Constants.CALLSTACK_SIZE, size);
+
+		// update view with new settings
+		IActionListener listener = Activator.getActionListener();
+		if (listener != null) {
+			listener.preferenceChanged();
+		}
+
 		// store report detail level prefs
 		return super.performOk();
 	}
 
 	/**
 	 * Sets S60 file options visible.
-	 *
+	 * 
 	 * @param enabled
 	 *            Is buttons enabled.
 	 */
 	private void setFileModeEnabled(final boolean enabled) {
-		processButton.setEnabled(enabled);
-		userButton.setEnabled(enabled);
+		logPath.setEnabled(enabled);
+		logPathText.setEnabled(enabled);
+		fileName.setEnabled(enabled);
+		fileNameText.setEnabled(enabled);
 	}
 
 	/**
 	 * Changes logging mode buttons.
-	 *
+	 * 
 	 * @param mode
 	 *            Which mode is used
 	 */
 	private void setGroupButtons(final String mode) {
 		if (mode.equals(Constants.LOGGING_S60)) {
-			externalButton.setSelection(false);
 			externalFastButton.setSelection(false);
 			s60Button.setSelection(true);
 			askButton.setSelection(false);
 			setFileModeEnabled(true);
 		} else if (mode.equals(Constants.LOGGING_ASK_ALLWAYS)) {
-			externalButton.setSelection(false);
 			externalFastButton.setSelection(false);
 			s60Button.setSelection(false);
 			askButton.setSelection(true);
 			setFileModeEnabled(false);
-		} else if( mode.equals(Constants.LOGGING_EXT_FAST)) {
-			externalButton.setSelection(false);
+		} else if (mode.equals(Constants.LOGGING_EXT_FAST)) {
 			externalFastButton.setSelection(true);
 			s60Button.setSelection(false);
 			askButton.setSelection(false);
 			setFileModeEnabled(false);
-		} else {
-			externalButton.setSelection(true);
-			externalFastButton.setSelection(false);
-			s60Button.setSelection(false);
-			askButton.setSelection(false);
-			setFileModeEnabled(false);
 		}
+		// else {
+		// externalButton.setSelection(true);
+		// externalFastButton.setSelection(false);
+		// s60Button.setSelection(false);
+		// askButton.setSelection(false);
+		// setFileModeEnabled(false);
+		// }
 	}
 
 	/**
 	 * Update atool.exe version number.
-	 *
+	 * 
 	 * @param path
 	 *            Atool.exe location
 	 */
 	private void updateAtoolVersion(final String path) {
 		atoolVerLabel.setText(Util.getAtoolVersionNumber(path));
 		atoolVerLabel.update();
-		updateCSGroup(path);
-	}
-
-	/**
-	 * Checks what version of command line is used, if the version is 1.7.4 or
-	 * higher enables callstack size selection otherwise disables callstack size
-	 * selection.
-	 *
-	 * @param path
-	 *            Command line engine path
-	 */
-	private void updateCSGroup(final String path) {
-		int compared = Constants.VERSION_NUMBERS_INVALID;
-
-		// compare version numbers
-		compared = Util.compareVersionNumber(Constants.CS_SUPPORT_MIN_VERSION,
-				Util.getAtoolVersionNumber(path));
-
-		// if used command line version is 1.7.4 or higher enable callstack size
-		// selection
-		if (compared == Constants.VERSION_NUMBERS_SECOND
-				|| compared == Constants.VERSION_NUMBERS_EQUALS) {
-			zeroButton.setEnabled(true);
-			fortyButton.setEnabled(true);
-			hundredButton.setEnabled(true);
-			customButton.setEnabled(true);
-			spinner.setEnabled(true);
-			csSizeGroup.setToolTipText("");
-			externalFastButton.setEnabled(true);
-			externalFastButton.setToolTipText("");
-		} else {
-			zeroButton.setEnabled(false);
-			fortyButton.setEnabled(false);
-			hundredButton.setEnabled(false);
-			customButton.setEnabled(false);
-			spinner.setEnabled(false);
-			csSizeGroup
-					.setToolTipText(Constants.PREFS_CS_SIZE_DISABLED_TOOLTIP);
-
-			if( externalFastButton.getSelection() ) {
-				externalButton.setSelection(true);
-			}
-			externalFastButton.setSelection(false);
-			externalFastButton.setEnabled(false);
-			externalFastButton.setToolTipText(Constants.PREFS_CS_SIZE_DISABLED_TOOLTIP);
-
-
-		}
-
+		checkState();
 	}
 }
\ No newline at end of file
--- a/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/preferences/PreferenceInitializer.java	Tue Aug 24 12:10:03 2010 +0300
+++ b/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/preferences/PreferenceInitializer.java	Tue Aug 24 12:16:27 2010 +0300
@@ -1,21 +1,19 @@
 /*
-* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Definitions for the class PreferenceInitializer
-*
-*/
-
-
+ * Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:  Definitions for the class PreferenceInitializer
+ *
+ */
 
 package com.nokia.s60tools.analyzetool.preferences;
 
@@ -31,22 +29,25 @@
 public class PreferenceInitializer extends AbstractPreferenceInitializer {
 
 	/*
-	 * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences()
+	 * @seeorg.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#
+	 * initializeDefaultPreferences()
 	 */
 	@Override
 	public void initializeDefaultPreferences() {
 
 		IPreferenceStore store = Activator.getPreferences();
 
-		store.setDefault(Constants.LOGGING_MODE, Constants.LOGGING_EXT);
+		store.setDefault(Constants.LOGGING_MODE, Constants.LOGGING_EXT_FAST);
 		store.setDefault(Constants.REPORT_LEVEL, Constants.REPORT_KNOWN);
 		store.setDefault(Constants.USE_INTERNAL, false);
-		store.setDefault(Constants.ATOOL_FOLDER, Constants.DEFAULT_ATOOL_FOLDER);
-		store.setDefault(Constants.USER_SELECTED_FOLDER, Constants.DEFAULT_ATOOL_FOLDER);
+		store
+				.setDefault(Constants.ATOOL_FOLDER,
+						Constants.DEFAULT_ATOOL_FOLDER);
+		store.setDefault(Constants.USER_SELECTED_FOLDER,
+				Constants.DEFAULT_ATOOL_FOLDER);
 		store.setDefault(Constants.CREATE_STATISTIC, false);
 		store.setDefault(Constants.USE_ROM_SYMBOL, false);
 		store.setDefault(Constants.CALLSTACK_SIZE, 40);
 		store.setDefault(Constants.LOGGING_FAST_ENABLED, false);
 	}
 }
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/ui/CustomMessageDialog.java	Tue Aug 24 12:16:27 2010 +0300
@@ -0,0 +1,107 @@
+/*
+ * Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:  Definitions for the class CustomErrorDialog
+ *
+ */
+
+package com.nokia.s60tools.analyzetool.ui;
+
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.PlatformUI;
+
+import com.nokia.s60tools.analyzetool.AnalyzeToolHelpContextIDs;
+import com.nokia.s60tools.analyzetool.global.Util;
+
+public class CustomMessageDialog extends Dialog {
+
+	private String title;
+	private String message;
+	private int icon;
+
+	public CustomMessageDialog(Shell shell, String title, String message,
+			int icon) {
+		super(shell);
+		this.title = title;
+		this.message = message;
+		this.icon = icon;
+	}
+
+	@Override
+	protected void configureShell(Shell shell) {
+		shell.setText(title);
+		super.configureShell(shell);
+	}
+
+	@Override
+	protected Control createDialogArea(Composite parent) {
+
+		final Composite container = (Composite) super.createDialogArea(parent);
+		container.setLayout(new GridLayout(2, false));
+
+		Composite imageComposite = new Composite(container, SWT.NONE);
+		imageComposite.setLayoutData(new GridData(SWT.LEFT, SWT.TOP, false,
+				false));
+		imageComposite.setLayout(new GridLayout());
+
+		Label imageLabel = new Label(imageComposite, SWT.NONE);
+		imageLabel.setImage(getShell().getDisplay().getSystemImage(icon));
+
+		Composite messageComposite = new Composite(container, SWT.NONE);
+		GridLayout gridLayout = new GridLayout();
+		gridLayout.verticalSpacing = 0;
+		messageComposite.setLayout(gridLayout);
+
+		Label messageLabel = new Label(messageComposite, SWT.NONE);
+		messageLabel.setText(message);
+
+		PlatformUI.getWorkbench().getHelpSystem().setHelp(getShell(),
+				AnalyzeToolHelpContextIDs.ANALYZE_TROUBLESHOOTING);
+
+		return container;
+	}
+
+	@Override
+	protected Control createButtonBar(Composite parent) {
+		Composite composite = new Composite(parent, SWT.NONE);
+		GridLayout layout = new GridLayout();
+		layout.marginWidth = 0;
+		layout.marginHeight = 0;
+		layout.horizontalSpacing = 0;
+		composite.setLayout(layout);
+		composite
+				.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false));
+		composite.setFont(parent.getFont());
+
+		Control helpControl = Util.createHelpControl(composite);
+		((GridData) helpControl.getLayoutData()).horizontalIndent = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
+
+		Control buttonSection = super.createButtonBar(composite);
+		((GridData) buttonSection.getLayoutData()).grabExcessHorizontalSpace = true;
+		return composite;
+	}
+
+	@Override
+	protected void createButtonsForButtonBar(Composite parent) {
+		createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL,
+				true);
+	}
+}
--- a/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/ui/MainView.java	Tue Aug 24 12:10:03 2010 +0300
+++ b/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/ui/MainView.java	Tue Aug 24 12:16:27 2010 +0300
@@ -337,7 +337,6 @@
 				// module not belong to selected project
 				return outside;
 			}
-
 			return element;
 		}
 
@@ -374,40 +373,58 @@
 
 	/** Double click action. */
 	private Action doubleClickAction;
+
 	/** Click action. */
 	private Action clickAction;
+
 	/** Change detail level action. */
 	public Action changeDetails;
+
 	/** Select S60 log file action. */
 	private Action s60LogTargetAction;
+
 	/** Select TraceViewer connection action. */
-	private Action externalLogTargetAction;
+	// private Action externalLogTargetAction;
+
 	/** Select fast data gathering mode */
 	private Action externalFastLogTargetAction;
+
 	/** Select Ask always action. */
 	private Action askLogTargetAction;
+
 	/** Save report file action. */
 	private Action saveReportAction;
+
 	/** Save test run action. */
 	private Action saveDataFileAction;
+
 	/** AnalyzeTool results action. */
 	private Action analyzeResults;
+
 	/** Activate AnalyzeTool build action. */
 	public Action buildWithAtool;
+
 	/** Clean AnalyzeTool changes action. */
 	private Action cleanAtoolChanges;
+
 	/** Start/Stop trace action. */
 	public Action traceAction;
+
 	/** Start subtest action. */
 	private Action startSubtest;
+
 	/** Stop subtest action. */
 	private Action stopSubtest;
+
 	/** Refresh(re-creates) project results */
 	private Action refreshResults;
+
 	/** Copies selected memory leak item info to the clipboard. */
 	private Action copyAction;
+
 	/** Action to open AnalyzeTool preference page. */
 	private Action openPrefs;
+
 	/**
 	 * Clears selected project results without removing temporary files
 	 */
@@ -510,12 +527,9 @@
 			} else {
 				bUtil.enableNatures(project);
 			}
-
 		}
-
 		// update build state
 		updateBuildState(project);
-
 	}
 
 	/*
@@ -538,7 +552,6 @@
 			// need to check is data file available in the disk
 			FileInputStream fis = null;
 			try {
-
 				// get existing file stream
 				fis = new FileInputStream(datafile);
 
@@ -583,7 +596,6 @@
 					}
 				});
 			}
-
 		}
 	}
 
@@ -636,9 +648,9 @@
 			projectModules.put(project, modules);
 
 			boolean xmlFile = Util.isFileXML(selectedFile);
-			// if file is xml file
+			// if file is XML file
 			// no need to analyze data file
-			// => just create results from xml file
+			// => just create results from XML file
 			if (xmlFile) {
 				Job analyzingXMLJob = new Job(Constants.ANALYZE_TOOL_TITLE) {
 					@Override
@@ -710,11 +722,11 @@
 			analyzeJob = new Job(Constants.ANALYZE_TOOL_TITLE) {
 				@Override
 				protected IStatus run(IProgressMonitor monitor) {
-					// inform progressdialog that task execution starts
-					// this make progressdialog visible on the UI
+					// inform progress dialog that task execution starts
+					// this make progress dialog visible on the UI
 					monitor.beginTask(Constants.PROGRESSDIALOG_ATOOL,
 							IProgressMonitor.UNKNOWN);
-					
+
 					fileOpenHistory.setFileName(usedFile);
 					// add2UserActionHistory( "File opened: " + usedFile );
 
@@ -724,22 +736,24 @@
 					if (chart != null) {
 						resetGraphView();// clear out the graph view
 					}
-					
+
 					// create atool object and execute atool
 					UseAtool atool = new UseAtool();
 
-					// create xml file
+					// create XML file
 					Constants.COMMAND_LINE_ERROR_CODE errorCode = atool
-							.createXMLFileToCarbide(monitor, projectRef,
-									usedFile, "-a");
-					String xmlFileLocation = null;
-					xmlFileLocation = atool.getDataFileName();
+							.createXmlAndCleanDatFilesToCarbide(monitor,
+									projectRef, usedFile, "-a");
+
+					String xmlFileLocation = atool.getXmlFilePath();
+					String cleanDatFileLocation = atool.getCleanDatFilePath();
 
 					// if some error occurs display it to user.
 					if (errorCode != Constants.COMMAND_LINE_ERROR_CODE.OK) {
 						fileOpenHistory.removeFileName(usedFile);
 						Util.displayCommandLineError(errorCode);
 					}
+
 					// if XML file generation failed => info to the user
 					else if (xmlFileLocation == null) {
 						fileOpenHistory.removeFileName(usedFile);
@@ -747,7 +761,7 @@
 							showErrorMessage(Constants.INFO_FILE_INVALID);
 						}
 					} else {
-						// Parse the xml file
+						// Parse the XML file
 						ParseXMLFileSAX dataFileParser = new ParseXMLFileSAX(
 								project, xmlFileLocation, projectResults);
 						boolean error = dataFileParser.parse();
@@ -767,36 +781,11 @@
 
 					updateChangeDetailState(projectRef);
 
-					// //this only generates statistics and this feature is
-					// currently disabled
-					// if( !monitor.isCanceled() ) {
-					//
-					// IPreferenceStore store = Activator.getPreferences();
-					// boolean generateStatistic =
-					// store.getBoolean(Constants.CREATE_STATISTIC);
-					// //used file data file create statistic also
-					// if( generateStatistic && UseAtool.checkFileType(usedFile)
-					// == Constants.DATAFILE_TRACE )
-					// {
-					// monitor.setTaskName(Constants.STATISTICS_GENERATING_PROG_TITLE);
-					//
-					// ReadFile fileReader = new ReadFile();
-					// boolean error = fileReader.readFile(usedFile);
-					// if( error && statisticView != null) {
-					// AbstractList<ProcessInfo> processes =
-					// fileReader.getStatistic();
-					// statisticView.setData( project, processes);
-					// fileReader.finish();
-					// }
-					//
-					// }
-					// }
 					if (!monitor.isCanceled()) {
-
 						// create the job for loading the graph model
 						// but only schedule it when the user gets to the graph
 						// tab
-						graphLoadJob = new GraphLoadJob(usedFile);
+						graphLoadJob = new GraphLoadJob(cleanDatFileLocation);
 						graphLoadJob.setUser(true);// set progress bar
 						graphLoadJob.setPriority(Job.LONG);
 
@@ -806,8 +795,11 @@
 								new Runnable() {
 									public void run() {
 										if (((CTabFolder) chart.getParent())
-												.getSelection() != null && ((CTabFolder) chart.getParent())
-												.getSelection().getControl() == chart) {
+												.getSelection() != null
+												&& ((CTabFolder) chart
+														.getParent())
+														.getSelection()
+														.getControl() == chart) {
 											// chart tab is currently selected
 											// so we can run the load job
 											// straight away
@@ -822,17 +814,18 @@
 							Constants.PROGRESSDIALOG_ANALYZE_COMPLETE, null);
 				}
 			};
-			
+
 			if (graphLoadJob != null && graphLoadJob.getState() == Job.RUNNING) {
 				graphLoadJob.cancel();
 			}
-			graphLoadJob = null;			
+			graphLoadJob = null;
 
 			analyzeJob.setUser(true);
 			analyzeJob.setPriority(Job.LONG);
 			analyzeJob.schedule();
 
-		} else { // if existing job is running display info to user
+		} else {
+			// if existing job is running display info to user
 			showMessage(Constants.INFO_ALLREADY_RUNNING);
 		}
 	}
@@ -884,7 +877,6 @@
 						runView.setSelection(new StructuredSelection(
 								activeTreeItem), true);
 					}
-
 				}
 
 				if (callstackView != null) {
@@ -895,13 +887,10 @@
 					callstackView.expandAll();
 
 				}
-
 				// change tooltip
 				changeReportActionTooltip();
-
 			}
 		});
-
 	}
 
 	/**
@@ -920,7 +909,7 @@
 		IPreferenceStore store = Activator.getPreferences();
 		String usedLoggingMode = "";
 
-		// if no loggingmode given get it from the AnalyzeTool preferences
+		// if no logging mode given get it from the AnalyzeTool preferences
 		if (loggingMode == null) {
 			usedLoggingMode = store.getString(Constants.LOGGING_MODE);
 		}
@@ -930,41 +919,23 @@
 			usedLoggingMode = loggingMode;
 		}
 
-		// current logging mode is external change it to external
-		if (Constants.LOGGING_EXT.equals(usedLoggingMode)) {
-			logTargetMenu.setImageDescriptor(Activator
-					.getImageDescriptor(Constants.BUTTON_COMPUTER));
-			logTargetMenu
-					.setToolTipText(Constants.ACTION_CHANGE_LOGGING_MODE_TOOLTIP_EXT);
-			if (loggingMode == null) {
-				externalLogTargetAction.setChecked(true);
-				s60LogTargetAction.setChecked(false);
-				externalFastLogTargetAction.setChecked(false);
-				askLogTargetAction.setChecked(false);
-			}
-		}
-		// current logging mode is s60 change it to s60
-		else if (Constants.LOGGING_S60.equals(usedLoggingMode)) {
+		if (Constants.LOGGING_S60.equals(usedLoggingMode)) {
 
 			logTargetMenu.setImageDescriptor(Activator
 					.getImageDescriptor(Constants.BUTTON_CELLURAR));
 			logTargetMenu
 					.setToolTipText(Constants.ACTION_CHANGE_LOGGING_MODE_TOOLTIP_S60);
 			if (loggingMode == null) {
-				externalLogTargetAction.setChecked(false);
 				s60LogTargetAction.setChecked(true);
 				externalFastLogTargetAction.setChecked(false);
 				askLogTargetAction.setChecked(false);
 			}
-		}
-
-		else if (Constants.LOGGING_EXT_FAST.equals(usedLoggingMode)) {
+		} else if (Constants.LOGGING_EXT_FAST.equals(usedLoggingMode)) {
 			logTargetMenu.setImageDescriptor(Activator
 					.getImageDescriptor(Constants.BUTTON_COMPUTER_FAST));
 			logTargetMenu
 					.setToolTipText(Constants.ACTION_CHANGE_LOGGING_MODE_TOOLTIP_FAST);
 			if (loggingMode == null) {
-				externalLogTargetAction.setChecked(false);
 				s60LogTargetAction.setChecked(false);
 				externalFastLogTargetAction.setChecked(true);
 				askLogTargetAction.setChecked(false);
@@ -977,7 +948,6 @@
 			logTargetMenu
 					.setToolTipText(Constants.ACTION_CHANGE_LOGGING_MODE_TOOLTIP_ASK);
 			if (loggingMode == null) {
-				externalLogTargetAction.setChecked(false);
 				s60LogTargetAction.setChecked(false);
 				externalFastLogTargetAction.setChecked(false);
 				askLogTargetAction.setChecked(true);
@@ -1022,7 +992,6 @@
 			changeDetails
 					.setToolTipText(Constants.ACTION_CHANGE_REPORT_LEVEL_TOPMOST);
 		}
-
 	}
 
 	/**
@@ -1134,7 +1103,6 @@
 		} else if (clearProjectResults != null) {
 			updateChangeDetailState(projectRef);
 		}
-
 	}
 
 	/**
@@ -1154,7 +1122,6 @@
 				}
 			}
 		});
-
 	}
 
 	/**
@@ -1176,14 +1143,12 @@
 	@Override
 	public void createPartControl(Composite parent) {
 
-		// create new Tab
+		// create a new Tab
 		final CTabFolder mainFolder = new CTabFolder(parent, SWT.TOP);
 
 		// create main view and add it tab
 		createMainView(mainFolder);
 
-		// create new statistic view
-		// createMemoryView( mainFolder );
 		// create graph
 		createGraphView(mainFolder);
 
@@ -1197,7 +1162,8 @@
 			}
 
 			public void widgetSelected(SelectionEvent e) {
-				// if we changed to the graph tab and the graph load job isn't already running
+				// if we changed to the graph tab and the graph load job isn't
+				// already running
 				// schedule it now
 				if (graphLoadJob != null
 						&& graphLoadJob.getState() != Job.RUNNING
@@ -1206,30 +1172,27 @@
 					graphLoadJob.schedule();
 				}
 
-				
 				if (mainFolder.getSelectionIndex() == 1) {
 					changeDetails.setEnabled(false);
 				} else {
 					changeDetails.setEnabled(true);
-					
 				}
 			}
 		});
-		
+
 		// stop any jobs that may be scheduled
-		mainFolder.addDisposeListener(new DisposeListener(){
+		mainFolder.addDisposeListener(new DisposeListener() {
 			public void widgetDisposed(DisposeEvent e) {
-				if (graphLoadJob != null){
-					graphLoadJob.cancel();		
+				if (graphLoadJob != null) {
+					graphLoadJob.cancel();
 					graphLoadJob = null;
 				}
-				if (analyzeJob != null){
+				if (analyzeJob != null) {
 					analyzeJob.cancel();
 					analyzeJob = null;
 				}
 			}
 		});
-		
 	}
 
 	/**
@@ -1258,7 +1221,6 @@
 	private void resetGraphView() {
 		if (chart != null) {
 			chart.setInput(project, AnalyzeFactory.getEmptyModel());
-			// chart.update();
 		}
 	}
 
@@ -1299,7 +1261,7 @@
 		// set content and label providers
 		runView.setContentProvider(new ViewContentProvider());
 		runView.setLabelProvider(new ViewLabelProvider());
-		// runView.addFilter( new ATFilter() );
+
 		// get init content
 		runView.setInput(getStartupContent());
 
@@ -1368,23 +1330,8 @@
 		ResourcesPlugin.getWorkspace().addResourceChangeListener(
 				new ATResourceListener());
 
-		// get used command line engine version
-		String version = Util.getAtoolVersionNumber(Util
-				.getAtoolInstallFolder());
-
-		// compare current version to min version
-		int comp = Util.compareVersionNumber(Constants.CS_SUPPORT_MIN_VERSION,
-				version);
-
 		IPreferenceStore store = Activator.getPreferences();
-		// if current version is same or higher than required version => set
-		// flag to true
-		if (comp == Constants.VERSION_NUMBERS_EQUALS
-				|| comp == Constants.VERSION_NUMBERS_SECOND) {
-			store.setValue(Constants.LOGGING_FAST_ENABLED, true);
-		} else {
-			store.setValue(Constants.LOGGING_FAST_ENABLED, false);
-		}
+		store.setValue(Constants.LOGGING_FAST_ENABLED, true);
 
 		// get default value for logging mode
 		preferenceChanged();
@@ -1400,7 +1347,6 @@
 	 *            Boolean state of trace action
 	 */
 	public void disableTraceActions(final boolean disable) {
-
 		if (traceAction != null && disable) {
 			// enable trace action
 			traceAction.setToolTipText(Constants.ACTION_START_TRACE);
@@ -1410,7 +1356,6 @@
 			traceAction.setToolTipText(Constants.TRACE_NOT_FOUND);
 			traceAction.setEnabled(disable);
 		}
-
 		traceActive = false;
 	}
 
@@ -1421,7 +1366,6 @@
 	 *            Menu manager
 	 */
 	private void fillContextMenu(IMenuManager manager) {
-
 		manager.add(buildWithAtool);
 		manager.add(new Separator());
 		manager.add(traceAction);
@@ -1470,9 +1414,8 @@
 		logTargetMenu = new DropDownMenu(Constants.ACTION_SAVE, this, false,
 				false);
 		makeLogTargetActions();
+		logTargetMenu.addAction(externalFastLogTargetAction);
 		logTargetMenu.addAction(s60LogTargetAction);
-		logTargetMenu.addAction(externalLogTargetAction);
-		logTargetMenu.addAction(externalFastLogTargetAction);
 		logTargetMenu.addAction(askLogTargetAction);
 		manager.add(logTargetMenu);
 
@@ -1613,7 +1556,6 @@
 						tempProject.accept(visitor);
 					}
 				}
-
 			} else { // project is selected
 				// if project is open => accept resource visitor
 				if (projectRef.isOpen()) {
@@ -1622,7 +1564,6 @@
 			}
 		} catch (CoreException e) {
 			e.printStackTrace();
-
 		}
 	}
 
@@ -1678,7 +1619,7 @@
 	private Object getResults(final boolean showErrorInfo) {
 
 		try {
-			// create new tree paretn
+			// create a new tree parent
 			TreeParent testRuns = new TreeParent(Constants.TEST_RUNS_TREE_TITLE);
 			invisibleRoot = null;
 			invisibleRoot = new TreeParent(Constants.TREE_TITLE);
@@ -1717,7 +1658,6 @@
 				if (showErrorInfo) {
 					showErrorMessage(Constants.INFO_FILE_INVALID);
 				}
-
 				return getStartupContent();
 			}
 
@@ -1752,14 +1692,11 @@
 				// because it can be filtered out when creating new tree model
 				activeTreeItem = helper.getActiveItem();
 				testRuns.addChild(oneRunTree);
-
 			}
-
 		} catch (java.lang.NullPointerException npe) {
 			npe.printStackTrace();
 			return null;
 		}
-
 		// expand to runs level
 		runView.setAutoExpandLevel(2);
 
@@ -1804,7 +1741,6 @@
 		if (getSite() != null) {
 			getSite().registerContextMenu(menuMgr, runView);
 		}
-
 	}
 
 	/**
@@ -1837,7 +1773,6 @@
 					&& oneSubtest.getTargetName().equals(target)) {
 				return true;
 			}
-
 		}
 		return false;
 	}
@@ -1898,7 +1833,6 @@
 						callstackView.setInput(resultObject);
 						copyAction.setEnabled(true);
 					}
-
 				}
 
 				// expand all the trees on call stack view
@@ -2208,19 +2142,6 @@
 		s60LogTargetAction.setImageDescriptor(Activator
 				.getImageDescriptor(Constants.BUTTON_CELLURAR));
 
-		externalLogTargetAction = new Action(Constants.LOGGING_EXT,
-				IAction.AS_RADIO_BUTTON) {
-			@Override
-			public void run() {
-				changeLogTarget(Constants.LOGGING_EXT);
-			}
-		};
-		externalLogTargetAction.setText(Constants.PREFS_EXT);
-		externalLogTargetAction
-				.setToolTipText(Constants.ACTION_CHANGE_LOGGING_MODE_TOOLTIP_EXT);
-		externalLogTargetAction.setImageDescriptor(Activator
-				.getImageDescriptor(Constants.BUTTON_COMPUTER));
-
 		externalFastLogTargetAction = new Action(Constants.LOGGING_EXT_FAST,
 				IAction.AS_RADIO_BUTTON) {
 			@Override
@@ -2241,13 +2162,11 @@
 				changeLogTarget(Constants.LOGGING_ASK_ALLWAYS);
 			}
 		};
-
 		askLogTargetAction.setText(Constants.PREFS_ASK_ALWAYS);
 		askLogTargetAction
 				.setToolTipText(Constants.ACTION_CHANGE_LOGGING_MODE_TOOLTIP_ASK);
 		askLogTargetAction.setImageDescriptor(Activator
 				.getImageDescriptor(Constants.BUTTON_ASK));
-
 	}
 
 	/**
@@ -2373,7 +2292,6 @@
 					clearProjectResults.setEnabled(false);
 				}
 				updateChangeDetailState(project);
-
 			}
 		});
 	}
@@ -2416,7 +2334,7 @@
 	 * new location where to copy the file.
 	 * 
 	 * @param type
-	 *            Which kind of type the file is. Possible types xml or data
+	 *            Which kind of type the file is. Possible types XML or data
 	 *            file
 	 * 
 	 * @return True if saving successfully otherwise false
@@ -2467,7 +2385,6 @@
 				Util.showMessage(Constants.INFO_NO_RESULTS_FILE);
 				return success;
 			}
-
 		}
 		// save data file
 		else {
@@ -2494,7 +2411,7 @@
 
 			Shell shell = null;
 
-			// get shell from teh active view
+			// get shell from the active view
 			if (runView != null) {
 				shell = runView.getControl().getShell();
 			}
@@ -2504,7 +2421,7 @@
 				return success;
 			}
 
-			// ask user where to save xml report file
+			// ask user where to save XML report file
 			folder = Util.fileSaveDialog(Constants.DIALOG_SAVE_TRACE, names,
 					shell);
 		}
@@ -2578,7 +2495,6 @@
 			if (resource != null) {
 				selectedProject = resource.getProject();
 			}
-
 		}
 		// first item is null => update build state
 		else if (element == null) {
@@ -2614,7 +2530,6 @@
 	@Override
 	public void setFocus() {
 		runView.getControl().setFocus();
-
 	}
 
 	/**
@@ -2648,11 +2563,8 @@
 				buffer.append("\nStart time: " + oneRunResults.getStartTime()
 						+ " \nEnd time: " + oneRunResults.getEndTime());
 			}
-
 			updateInformationLabel(buffer.toString());
-
 		}
-
 	}
 
 	/**
@@ -2687,7 +2599,8 @@
 	 * Starts traceviewer connection.
 	 */
 	private void start() {
-		// check is project selected and open
+
+		// check if the project is selected and open
 		if (!checkProjectValidity()) {
 			return;
 		}
@@ -2821,7 +2734,6 @@
 		};
 		activateTrace.setUser(true);
 		activateTrace.schedule();
-
 	}
 
 	/**
@@ -2892,7 +2804,7 @@
 
 		// start subtest
 		parser.parse(Constants.PREFIX + " " + subtes.getProcessID()
-				+ " TEST_START 0000 " + subTestName);
+				+ " TSS 0000 " + subTestName);
 		updateSubtestInfoText(Constants.SUBTEST_STARTED + target
 				+ Constants.ENRULE + subTestName);
 
@@ -2956,7 +2868,6 @@
 		} catch (InstantiationException iv) {
 			iv.printStackTrace();
 		}
-
 	}
 
 	/**
@@ -2975,7 +2886,7 @@
 			for (int j = 0; j < startedSubtest.size(); j++) {
 				ActiveSubtests oneSubtest = startedSubtest.get(j);
 				parser.parse(Constants.PREFIX + " " + oneSubtest.getProcessID()
-						+ " TEST_END" + " 0000 " + oneSubtest.getName());
+						+ " TSE 0000 " + oneSubtest.getName());
 			}
 			startedSubtest.clear();
 		}
@@ -3014,7 +2925,7 @@
 			if (startedSubtest.size() == 1) {
 				ActiveSubtests oneSubtest = startedSubtest.get(0);
 				parser.parse(Constants.PREFIX + " " + oneSubtest.getProcessID()
-						+ " TEST_END" + " 0000 " + oneSubtest.getName());
+						+ " TSE 0000 " + oneSubtest.getName());
 				updateSubtestInfoText(Constants.SUBTEST_ENDED
 						+ oneSubtest.getTargetName() + Constants.ENRULE
 						+ oneSubtest.getName());
@@ -3048,8 +2959,8 @@
 					if (splittedText[2].equals(oneSubtest.getName())) {
 						// write subtest end tag to data file
 						parser.parse(Constants.PREFIX + " "
-								+ oneSubtest.getProcessID() + " TEST_END"
-								+ " 0000 " + oneSubtest.getName());
+								+ oneSubtest.getProcessID() + " TSE 0000 "
+								+ oneSubtest.getName());
 						updateSubtestInfoText(Constants.SUBTEST_ENDED
 								+ oneSubtest.getTargetName() + Constants.ENRULE
 								+ oneSubtest.getName());
@@ -3059,7 +2970,6 @@
 						break;
 					}
 				}
-
 				if (startedSubtest.isEmpty()) {
 					stopSubtest.setEnabled(false);
 				}
@@ -3104,7 +3014,7 @@
 		runView.getControl().getDisplay().syncExec(new Runnable() {
 			public void run() {
 
-				// if lable is created
+				// if label is created
 				if (informationLabel != null) {
 					// get existing label text
 					String tmpText = informationLabel.getText();
@@ -3135,12 +3045,9 @@
 								+ Constants.INFO_ALLOCATED_MEM
 								+ parser.getAllocationsSize());
 					}
-
 				}
-
 			}
 		});
-
 	}
 
 	/**
@@ -3172,7 +3079,6 @@
 			buildWithAtool.setToolTipText(Constants.ACTION_AT_BUILD_DEACTIVE);
 			buildWithAtool.setChecked(false);
 		}
-
 	}
 
 	/**
@@ -3225,7 +3131,8 @@
 		if (dataFile != null) {
 			int fileType = UseAtool.checkFileType(dataFile);
 			if (fileType == Constants.DATAFILE_TRACE
-					|| fileType == Constants.DATAFILE_LOG) {
+					|| fileType == Constants.DATAFILE_LOG
+					|| fileType == Constants.DATAFILE_BINARY) {
 				refreshResults.setEnabled(true);
 			} else {
 				refreshResults.setEnabled(false);
@@ -3274,10 +3181,8 @@
 				if (informationLabel != null) {
 					informationLabel.setText(oneLine);
 				}
-
 			}
 		});
-
 	}
 
 	/**
@@ -3319,9 +3224,7 @@
 					} else {
 						informationLabel.setText(origText + newText);
 					}
-
 				}
-
 			}
 		});
 	}
@@ -3384,7 +3287,6 @@
 			// Triggering copy action
 			copyAction.run();
 		}
-
 	}
 
 	/**
@@ -3438,7 +3340,8 @@
 							callstackManager.setProcesses(processes);
 							model.setCallstackManager(callstackManager);
 						} else {
-							model.setCallstackManager(new SimpleCallstackManager());
+							model
+									.setCallstackManager(new SimpleCallstackManager());
 						}
 					}
 					if (!monitor.isCanceled()) {
@@ -3447,7 +3350,6 @@
 					}
 					fileReader.finish();
 				}
-
 			} catch (OutOfMemoryError oome) {
 				Activator
 						.getDefault()
@@ -3460,6 +3362,5 @@
 			graphLoadJob = null;
 			return Status.OK_STATUS;
 		}
-
 	}
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/ui/OutputModeDialog.java	Tue Aug 24 12:16:27 2010 +0300
@@ -0,0 +1,166 @@
+/*
+ * Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:  Definitions for the class OutputModeDialog
+ *
+ */
+
+package com.nokia.s60tools.analyzetool.ui;
+
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.PlatformUI;
+
+import com.nokia.s60tools.analyzetool.Activator;
+import com.nokia.s60tools.analyzetool.AnalyzeToolHelpContextIDs;
+import com.nokia.s60tools.analyzetool.global.Constants;
+
+public class OutputModeDialog extends Dialog implements Listener {
+
+	private Button traceOutputButton;
+	private Button fileOutputButton;
+
+	private Label logPath;
+	private Text logPathText;
+
+	private Label logFileName;
+	private Text logFileNameText;
+
+	private String outputMode;
+	private String path;
+	private String fileName;
+
+	public OutputModeDialog(Shell shell) {
+		super(shell);
+	}
+
+	@Override
+	protected void configureShell(Shell shell) {
+		shell.setText(Constants.PREFS_LOGGING_MODE_TITLE);
+		super.configureShell(shell);
+	}
+
+	@Override
+	protected Control createDialogArea(Composite parent) {
+		final Composite container = (Composite) super.createDialogArea(parent);
+		container.setLayout(new GridLayout(1, false));
+
+		traceOutputButton = new Button(container, SWT.RADIO);
+		traceOutputButton.setToolTipText(Constants.PREFS_EXT_FAST_TOOLTIP);
+		traceOutputButton.setText(Constants.PREFS_EXT_FAST);
+		traceOutputButton.addListener(SWT.Selection, this);
+		
+		fileOutputButton = new Button(container, SWT.RADIO);
+		fileOutputButton.setToolTipText(Constants.PREFS_S60_TOOLTIP);
+		fileOutputButton.setText(Constants.PREFS_S60);
+		fileOutputButton.addListener(SWT.Selection, this);
+	
+		Composite compS60 = new Composite(container, SWT.NULL);
+
+		final GridLayout layoutS60 = new GridLayout();
+		layoutS60.marginLeft = 15;
+		layoutS60.numColumns = 2;
+		compS60.setLayout(layoutS60);
+
+		logPath = new Label(compS60, SWT.NONE);
+		logPath.setToolTipText("Log file path in the device.");
+		logPath.setText("Log file path:");
+
+		logPathText = new Text(compS60, SWT.BORDER);
+		logPathText.setLayoutData(new GridData(280, SWT.DEFAULT));
+
+		logFileName = new Label(compS60, SWT.NONE);
+		logFileName.setToolTipText("Log file name.");
+		logFileName.setText("Filename:");
+
+		logFileNameText = new Text(compS60, SWT.BORDER);
+		logFileNameText.setLayoutData(new GridData(280, SWT.DEFAULT));
+
+		IPreferenceStore store = Activator.getPreferences();
+		String path = store.getString(Constants.DEVICE_LOG_FILE_PATH);
+
+		if (!path.equals("")) {
+			logPathText.setText(path);
+		} else {
+			logPathText.setText("C:\\logs\\atool\\");
+		}
+
+		String fileName = store.getString(Constants.DEVICE_LOG_FILE_NAME);
+
+		if (!fileName.equals("")) {
+			logFileNameText.setText(fileName);
+		} else {
+			logFileNameText.setText("%processname%.dat");
+		}
+
+		traceOutputButton.setSelection(true);
+		logPath.setEnabled(false);
+		logPathText.setEnabled(false);
+		logFileName.setEnabled(false);
+		logFileNameText.setEnabled(false);
+		
+		return container;
+	}
+
+	@Override
+	protected void okPressed() {
+		if (traceOutputButton.getSelection()) {
+			outputMode = Constants.LOGGING_EXT_FAST;
+		}
+
+		if (fileOutputButton.getSelection()) {
+			outputMode = Constants.LOGGING_S60;
+			path = logPathText.getText();
+			fileName = logFileNameText.getText();
+		}
+		super.okPressed();
+	}
+
+	public String getOutputMode() {
+		return outputMode;
+	}
+
+	public String getFileName() {
+		return fileName;
+	}
+
+	public String getLogPath() {
+		return path;
+	}
+
+	public void handleEvent(Event event) {
+		if (event.widget == traceOutputButton) {
+			logPath.setEnabled(false);
+			logPathText.setEnabled(false);
+			logFileName.setEnabled(false);
+			logFileNameText.setEnabled(false);
+		} else if (event.widget == fileOutputButton) {
+			logPath.setEnabled(true);
+			logPathText.setEnabled(true);
+			logFileName.setEnabled(true);
+			logFileNameText.setEnabled(true);
+		}
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/ui/WarningDialogWithCheckbox.java	Tue Aug 24 12:16:27 2010 +0300
@@ -0,0 +1,104 @@
+/*
+ * Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:  Definitions for the class WarningDialogWithCheckbox
+ *
+ */
+
+package com.nokia.s60tools.analyzetool.ui;
+
+import java.text.MessageFormat;
+
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.Shell;
+
+public class WarningDialogWithCheckbox extends Dialog implements Listener {
+
+	private String unknownTag;
+	private boolean dontShow;
+
+	private Button showButton;
+
+	public WarningDialogWithCheckbox(Shell shell, String unknownTag) {
+		super(shell);
+		this.unknownTag = unknownTag;
+	}
+
+	@Override
+	protected void configureShell(Shell shell) {
+		shell.setText("Unknown tag");
+		super.configureShell(shell);
+	}
+
+	@Override
+	protected Control createDialogArea(Composite parent) {
+
+		final Composite container = (Composite) super.createDialogArea(parent);
+		container.setLayout(new GridLayout(2, false));
+
+		Composite imageComposite = new Composite(container, SWT.NONE);
+		imageComposite.setLayoutData(new GridData(SWT.LEFT, SWT.TOP, false,
+				false));
+		imageComposite.setLayout(new GridLayout());
+
+		Label imageLabel = new Label(imageComposite, SWT.NONE);
+		imageLabel.setImage(getShell().getDisplay().getSystemImage(
+				SWT.ICON_WARNING));
+
+		Composite warningComposite = new Composite(container, SWT.NONE);
+		GridLayout gridLayout = new GridLayout();
+		gridLayout.verticalSpacing = 0;
+		warningComposite.setLayout(gridLayout);
+
+		Label warningLabel = new Label(warningComposite, SWT.NONE);
+		warningLabel
+				.setText(MessageFormat
+						.format(
+								"Trace contains unknown {0} tag. AnalyzeTool Carbide extension might not be up to date.\n\n",
+								unknownTag));
+
+		showButton = new Button(warningComposite, SWT.CHECK);
+		showButton.setText("Don't show again");
+		showButton.addListener(SWT.Selection, this);
+
+		return container;
+	}
+
+	@Override
+	protected void createButtonsForButtonBar(Composite parent) {
+		createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL,
+				true);
+	}
+
+	public void handleEvent(Event event) {
+		if (event.widget == showButton) {
+			dontShow = true;
+		} else {
+			dontShow = false;
+		}
+	}
+
+	public boolean dontShow() {
+		return dontShow;
+	}
+}
--- a/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/ui/actions/ViewMemoryLeakFromFile.java	Tue Aug 24 12:10:03 2010 +0300
+++ b/sysperfana/analyzetoolext/com.nokia.s60tools.analyzetool/src/com/nokia/s60tools/analyzetool/ui/actions/ViewMemoryLeakFromFile.java	Tue Aug 24 12:16:27 2010 +0300
@@ -31,13 +31,13 @@
 
 /**
  * Entry point for displaying memory analysis results from file.
- *
+ * 
  * @author kihe
- *
+ * 
  */
 public class ViewMemoryLeakFromFile implements IObjectActionDelegate {
 
-	/** project reference.*/
+	/** project reference. */
 	public IProject project;
 
 	/**
@@ -49,8 +49,9 @@
 
 	/**
 	 * Performs this action.
-	 *
-	 * @param action User selected action
+	 * 
+	 * @param action
+	 *            User selected action
 	 */
 	public void run(IAction action) {
 
@@ -74,10 +75,12 @@
 	/**
 	 * Notifies this action delegate that the selection in the workbench has
 	 * changed.
-	 *
-	 * @param action User selected action
-	 *
-	 * @param selection User selection
+	 * 
+	 * @param action
+	 *            User selected action
+	 * 
+	 * @param selection
+	 *            User selection
 	 */
 	public void selectionChanged(IAction action, ISelection selection) {
 		try {
@@ -91,16 +94,17 @@
 
 	/**
 	 * Sets the active part for the delegate.
-	 *
+	 * 
 	 * @see IObjectActionDelegate#setActivePart(IAction, IWorkbenchPart)
-	 *
-	 * @param action User selected action
-	 *
-	 * @param targetPart Workbench part
+	 * 
+	 * @param action
+	 *            User selected action
+	 * 
+	 * @param targetPart
+	 *            Workbench part
 	 */
 	public void setActivePart(IAction action, IWorkbenchPart targetPart) {
 		// MethodDeclaration/Block[count(BlockStatement) = 0 and
 		// @containsComment = 'false']
 	}
-
 }