--- a/sysperfana/memspyext/com.nokia.carbide.extensions.memspy/feature.xml Thu Jun 24 14:37:32 2010 +0300
+++ b/sysperfana/memspyext/com.nokia.carbide.extensions.memspy/feature.xml Tue Aug 24 12:10:03 2010 +0300
@@ -2,7 +2,7 @@
<feature
id="com.nokia.carbide.extensions.memspy"
label="Carbide.c++ Extensions - MemSpy"
- version="1.6.0"
+ version="1.7.0"
provider-name="Nokia"
plugin="com.nokia.s60tools.memspy">
@@ -24,7 +24,6 @@
at the URL "http://www.eclipse.org/legal/epl-v10.html".
</license>
-
<requires>
<import plugin="org.eclipse.ui"/>
<import plugin="org.eclipse.core.runtime"/>
@@ -72,6 +71,4 @@
install-size="0"
version="0.0.0"
unpack="false"/>
-
-
</feature>
Binary file sysperfana/memspyext/com.nokia.s60tools.heapanalyser/Binaries/DbgEntSymbol.plugin.dll has changed
Binary file sysperfana/memspyext/com.nokia.s60tools.heapanalyser/Binaries/HeapAnalyser.exe has changed
Binary file sysperfana/memspyext/com.nokia.s60tools.heapanalyser/Binaries/HeapComparisonLib.dll has changed
Binary file sysperfana/memspyext/com.nokia.s60tools.heapanalyser/Binaries/HeapComparisonUiLib.dll has changed
Binary file sysperfana/memspyext/com.nokia.s60tools.heapanalyser/Binaries/HeapCtrlLib.dll has changed
Binary file sysperfana/memspyext/com.nokia.s60tools.heapanalyser/Binaries/HeapLib.dll has changed
Binary file sysperfana/memspyext/com.nokia.s60tools.heapanalyser/Binaries/HeapUiLib.dll has changed
Binary file sysperfana/memspyext/com.nokia.s60tools.heapanalyser/Binaries/SLPluginMap.plugin.dll has changed
Binary file sysperfana/memspyext/com.nokia.s60tools.heapanalyser/Binaries/SLPluginObey.plugin.dll has changed
Binary file sysperfana/memspyext/com.nokia.s60tools.heapanalyser/Binaries/SLPluginSymbol.plugin.dll has changed
Binary file sysperfana/memspyext/com.nokia.s60tools.heapanalyser/Binaries/SLPluginZip.plugin.dll has changed
Binary file sysperfana/memspyext/com.nokia.s60tools.heapanalyser/Binaries/SymbianDebugLib.dll has changed
Binary file sysperfana/memspyext/com.nokia.s60tools.heapanalyser/Binaries/SymbianDebugLibUi.dll has changed
Binary file sysperfana/memspyext/com.nokia.s60tools.heapanalyser/Binaries/SymbianExcelLib.dll has changed
Binary file sysperfana/memspyext/com.nokia.s60tools.heapanalyser/Binaries/SymbianStructuresLib.dll has changed
Binary file sysperfana/memspyext/com.nokia.s60tools.heapanalyser/Binaries/SymbianSymbolLib.plugin.dll has changed
Binary file sysperfana/memspyext/com.nokia.s60tools.heapanalyser/Binaries/SymbianTree.dll has changed
Binary file sysperfana/memspyext/com.nokia.s60tools.heapanalyser/Binaries/SymbianUtils.dll has changed
Binary file sysperfana/memspyext/com.nokia.s60tools.heapanalyser/Binaries/SymbianUtilsUi.dll has changed
Binary file sysperfana/memspyext/com.nokia.s60tools.heapanalyser/Binaries/SymbianWizardLib.dll has changed
Binary file sysperfana/memspyext/com.nokia.s60tools.heapanalyser/Binaries/SymbianXmlInputLib.dll has changed
Binary file sysperfana/memspyext/com.nokia.s60tools.heapanalyser/Binaries/SymbianZipLib.dll has changed
--- a/sysperfana/memspyext/com.nokia.s60tools.heapanalyser/META-INF/MANIFEST.MF Thu Jun 24 14:37:32 2010 +0300
+++ b/sysperfana/memspyext/com.nokia.s60tools.heapanalyser/META-INF/MANIFEST.MF Tue Aug 24 12:10:03 2010 +0300
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: Carbide.c++ Extensions - Heapanalyser Plug-in
Bundle-SymbolicName: com.nokia.s60tools.heapanalyser
-Bundle-Version: 1.6.0
+Bundle-Version: 1.7.0
Bundle-Activator: com.nokia.s60tools.heapanalyser.HeapAnalyserPlugin
Bundle-Vendor: Nokia
Require-Bundle: org.eclipse.core.runtime,
--- a/sysperfana/memspyext/com.nokia.s60tools.memspy.help/META-INF/MANIFEST.MF Thu Jun 24 14:37:32 2010 +0300
+++ b/sysperfana/memspyext/com.nokia.s60tools.memspy.help/META-INF/MANIFEST.MF Tue Aug 24 12:10:03 2010 +0300
@@ -2,5 +2,5 @@
Bundle-ManifestVersion: 2
Bundle-Name: Carbide.c++ Extensions - MemSpy Help Plug-in
Bundle-SymbolicName: com.nokia.s60tools.memspy.help;singleton:=true
-Bundle-Version: 1.6.0
+Bundle-Version: 1.7.0
Bundle-Vendor: Nokia
--- a/sysperfana/memspyext/com.nokia.s60tools.memspy.help/about.html Thu Jun 24 14:37:32 2010 +0300
+++ b/sysperfana/memspyext/com.nokia.s60tools.memspy.help/about.html Tue Aug 24 12:10:03 2010 +0300
@@ -1,19 +1,22 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<title>About</title>
-<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
-</head>
-<body>
-
-<h2>About This Content</h2>
-<p>April 21, 2010</p>
-
-<h3>Copyright</h3>
-
-<p>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>
-
-</body>
-</html>
-
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<head>
+ <title>About</title>
+ <meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
+</head>
+
+<body>
+<h2>About This Content</h2>
+
+<p>June 30, 2010</p>
+
+<h3>Copyright</h3>
+
+<p>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>
+
+<p></p>
+</body>
+</html>
Binary file sysperfana/memspyext/com.nokia.s60tools.memspy.help/html/images/Thumbs.db has changed
--- a/sysperfana/memspyext/com.nokia.s60tools.memspy.help/html/release_notes.htm Thu Jun 24 14:37:32 2010 +0300
+++ b/sysperfana/memspyext/com.nokia.s60tools.memspy.help/html/release_notes.htm Tue Aug 24 12:10:03 2010 +0300
@@ -11,9 +11,9 @@
<body>
<h2>Release Notes</h2>
-<h4>MemSpy Carbide.c++ Extension – Version 1.6.0</h4>
+<h4>MemSpy Carbide.c++ Extension – Version 1.7.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>
@@ -42,21 +42,10 @@
<h3><a name="newfeatures"></a>What's new</h3>
<ul>
- <li><strong>Feature</strong>: Added checking for invalid heap dump files that
- do not contain any threads with binary data information, or contain a
- binary data error. </li>
- <li><strong>Feature</strong>: In Heap Analyser's Object type view: If there
- is a unique referrer for the object type, or if all referrers are of the
- same known type, the object is no longer named [Unknown] but instead [Part
- of XXX] is now displayed, where XXX is the type of the referrer. </li>
- <li><strong>Fix</strong>: Corrected some paths in exported HTML files to use
- JavaScript functions and display tooltips also in Heap Data and Cell
- Associations sections.</li>
- <li>Change: Heap Analyser documentation has been integrated to the MemSpy
- Help in Carbide. </li>
+ <li>Feature: Added support for new Symbian OS RHybridHeap format.</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>
</ul>
@@ -90,6 +79,22 @@
<h3>Version history</h3>
+<h5>Version 1.6.0 – 21st April 2010</h5>
+<ul>
+ <li>Feature: Added checking for invalid heap dump files that do not contain
+ any threads with binary data information, or contain a binary data error.
+ </li>
+ <li>Feature: In Heap Analyser's Object type view: If there is a unique
+ referrer for the object type, or if all referrers are of the same known
+ type, the object is no longer named [Unknown] but instead [Part of XXX] is
+ now displayed, where XXX is the type of the referrer. </li>
+ <li>Fix: Corrected some paths in exported HTML files to use JavaScript
+ functions and display tooltips also in Heap Data and Cell Associations
+ sections.</li>
+ <li>Change: Heap Analyser documentation has been integrated to the MemSpy
+ Help in Carbide. </li>
+</ul>
+
<h5>Version 1.5.0 – 11th December 2009</h5>
<ul>
<li>Feature: Added possibility to receive <b>Heap Dump</b>s when fetching
--- a/sysperfana/memspyext/com.nokia.s60tools.memspy.help/html/tasks/connection_settings.htm Thu Jun 24 14:37:32 2010 +0300
+++ b/sysperfana/memspyext/com.nokia.s60tools.memspy.help/html/tasks/connection_settings.htm Tue Aug 24 12:10:03 2010 +0300
@@ -1,58 +1,41 @@
-<!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>Configuring connection settings</title>
-<link href="../../book.css" type="text/css" rel="stylesheet"></head>
-<body>
-
-<h2>Configuring connection settings</h2>
-<p>If the connection to the target device fails, check and configure your connections settings:</p>
-<ol>
-<li>In the step 1 of the <b>MemSpy Import Wizard</b>, click <b>Connection
-Settings</b>. This takes you to the connection settings of the <b>TraceViewer Carbide.c++ Extension</b>.</li>
-<li>In <b>Use connection</b>, select an existing connection to use and click <b>OK</b>, or click <b>New...</b> to create a new connection or <b>Edit</b> to edit an existing one. Follow the next steps if you selected to create a new connection or to edit an existing one.</li>
-<li>In <b>Connection name</b>, enter a unique name for this connection.
-<p>In <b>Connection type</b>, select a connection method:</p>
-<ul>
-<li><b>PlatSim</b> if you are using a PlatSim connection between the PC and the target device.</li>
-<li><b>TCP/IP Musti</b> if you are using an XTI connection between the PC and the
-target device.</li>
-<li><b>USB</b> if you are using a USB cable connection between the PC and
-the target device.</li>
-</ul>
-<p>Click <b>Next</b>.
-<p><img src="..\images\connection_01.png"></p></li>
-
-<li><p>Modify the connection settings:</p>
-<ul>
-<li>For <b>PlatSim</b> and <b>TCP/IP Musti</b>: define the IP address to connect to and the OS to be used.
-<p><img src="..\images\connection_platsim.png"></li>
-
-<li><p>For <b>USB</b>: define the serial port used for USB connection on your PC (such as COM1) amd the OS to be used. To find out the port:</p>
-<ol type="1">
-<li>Connect your phone to the PC using a USB cable and the Nokia PC Suite
-application.</li>
-<li>(Optional) If you connect for the first time, install the necessary drivers
-to your phone.</li>
-<li>In <b>Windows</b>, check the correct serial port from the <b>Device Manager
-</b> in the <b>Control Panel</b>. Select <b>Ports (COM & LPT)</b>, and
-locate an item similar to <b>Series 60 Nokia S60 Phone USB (COMX)</b>, where
-X means the port to connect to.</li>
-</ol>
-<p><img src="..\images\connection_usb.png"></p>
-</li></ul></li>
-<li>Click <b>OK</b> to save and exit.</li>
-</ol>
-
-<h5>Related tasks</h5>
-<ul>
-<li><a href="view_heap.htm">Importing and analyzing heap dump files</a></li>
-<li><a href="compare_two_heaps.htm">Importing and comparing two heap dump files</a></li>
-<li><a href="view_swmt_log.htm">Importing and analyzing System Wide Memory Tracking log files</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>
\ 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>Configuring connection settings</title>
+ <link href="../../book.css" type="text/css" rel="stylesheet">
+</head>
+
+<body>
+<h2>Configuring connection settings</h2>
+
+<p>If the connection to the target device fails, check and configure your
+connections settings:</p>
+<ol>
+ <li>In the step 1 of the <b>MemSpy Import Wizard</b>, click <b>Connection
+ Settings</b>. This takes you to the connection settings of the
+ <b>TraceViewer Carbide.c++ Extension</b>. Select the connection you want to
+ use or create a new one. For more information, see TraceViewer <a
+ href="../../../../../PIAnalyser/PIAnalyser/trunk/com.nokia.traceviewer.help/html/reference/preferencesconnection.htm">Connection
+ Settings</a>.
+ <p class="note"><strong>NOTE</strong> You can use a USB or a TCP/IP Musti
+ connection, but for profiling several samplers Musti is recommended due the
+ too high amount of data.</p>
+ </li>
+</ol>
+
+<h5>Related tasks</h5>
+<ul>
+ <li><a href="view_heap.htm">Importing and analyzing heap dump files</a></li>
+ <li><a href="compare_two_heaps.htm">Importing and comparing two heap dump
+ files</a></li>
+ <li><a href="view_swmt_log.htm">Importing and analyzing System Wide Memory
+ Tracking log files</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/memspyext/com.nokia.s60tools.memspy.help/html/tool.htm Thu Jun 24 14:37:32 2010 +0300
+++ b/sysperfana/memspyext/com.nokia.s60tools.memspy.help/html/tool.htm Tue Aug 24 12:10:03 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> </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> </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">MemSpy User Guide </h1>
- <p align="center" class="titleSmall">Version 1.6.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">MemSpy User Guide </h1>
+
+ <p align="center" class="titleSmall">Version 1.7.0; June, 2010</p>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</body>
+</html>
--- a/sysperfana/memspyext/com.nokia.s60tools.memspy/META-INF/MANIFEST.MF Thu Jun 24 14:37:32 2010 +0300
+++ b/sysperfana/memspyext/com.nokia.s60tools.memspy/META-INF/MANIFEST.MF Tue Aug 24 12:10:03 2010 +0300
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: Carbide.c++ Extensions - MemSpy
Bundle-SymbolicName: com.nokia.s60tools.memspy;singleton:=true
-Bundle-Version: 1.6.0
+Bundle-Version: 1.7.0
Bundle-Activator: com.nokia.s60tools.memspy.plugin.MemSpyPlugin
Bundle-Vendor: Nokia
Require-Bundle: org.eclipse.ui,
--- a/sysperfana/memspyext/com.nokia.s60tools.memspy/src/com/nokia/s60tools/memspy/model/TraceCoreDataHandler.java Thu Jun 24 14:37:32 2010 +0300
+++ b/sysperfana/memspyext/com.nokia.s60tools.memspy/src/com/nokia/s60tools/memspy/model/TraceCoreDataHandler.java Tue Aug 24 12:10:03 2010 +0300
@@ -1,21 +1,19 @@
/*
-* Copyright (c) 2009 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:
-*
-*/
-
-
+ * Copyright (c) 2009 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:
+ *
+ */
package com.nokia.s60tools.memspy.model;
@@ -32,7 +30,6 @@
import com.nokia.s60tools.memspy.util.MemSpyConsole;
import com.nokia.s60tools.util.debug.DbgUtility;
-
/**
* Monitors data received from TraceCore and acts based on it.
*/
@@ -40,28 +37,28 @@
// Count of lines
private int lineCount;
-
+
// boolean value that is used when parsing thread list
private boolean lastWasName;
-
+
// Array, where found thread names and id's are written
private ArrayList<ThreadInfo> threadArray = null;
-
+
// ThreadInfo-object where info is collected
private ThreadInfo threadInfo;
-
+
// boolean value that is set to true, when trace-lines are lost
private boolean dumpedTraces;
-
- // boolean value that is set to false, when heap type is not symbian OS Rheap
+
+ // boolean value that is set to false, when heap type is not symbian OS
+ // Rheap
private boolean heapTypeCorrect;
-
+
// boolean value that is true when some information is written to file
private boolean writeFile;
-
+
// boolean value that true when file is open
private boolean fileOpen;
-
// Writer that writes to file
private PrintWriter plainOutput;
@@ -69,49 +66,52 @@
// Writer that writes to file
private PrintWriter swmtHeadDumpOutput = null;
-
// boolean value that is true when some memspy operations are on-going.
private boolean logging;
// Trace engine.
private TraceCoreEngine engine;
-
-
- //Strings
- private final static String LAUNCHER_READY = "<MEMSPY_LAUNCHER_READY>";
- private final static String MEMSPY_LAUNCHER_VERSION_PREFIX = "<MEMSPY_LAUNCHER_DATAVERSION=";//e.g. <MEMSPY_LAUNCHER_VERSION=1>
- private final static String END_TAG = ">";
- private final static String LAUNCHER_COLON = "::";
- private final static String LAUNCHER_THREAD_ID = "Thread Id";
- private final static String LAUNCHER_TYPE = "Type:";
- private final static String LAUNCHER_SYMBIAN_OS_RHEAP = "Symbian OS RHeap";
- private final static String LAUNCHER_HEAP_DUMP_START = "<MEMSPY_HEAP_DATA";
- private final static String LAUNCHER_HEAP_DUMP_END = "</MEMSPY_HEAP_DATA";
- //Heap info's will act as start point for new Head dump, when Head Dumps are received during SWMT logging
- //E.g. following Heap info is received:
- //HeapData - mc_isiserver::Main - HEAP INFO FOR THREAD 'mc_isiserver::Main'
- private final static String LAUNCHER_HEAP_INFO_FOR_THREAD = "HEAP INFO FOR THREAD";
- private final static String LAUNCHER_HEAPDATA = "HeapData -";
- private final static String LAUNCHER_ERROR = "<MEMSPY_LAUNCHER_ERROR>";
- private final static String DUMPED_TC_TRACES = "* Dumped Traces";
- private final static String MEMSPY_PROGRESS = "<MEMSPY_PROGRESS>";
-
+
+ // Strings
+ private final static String LAUNCHER_READY = "<MEMSPY_LAUNCHER_READY>";
+ private final static String MEMSPY_LAUNCHER_VERSION_PREFIX = "<MEMSPY_LAUNCHER_DATAVERSION=";// e.g.
+ // <MEMSPY_LAUNCHER_VERSION=1>
+ private final static String END_TAG = ">";
+ private final static String LAUNCHER_COLON = "::";
+ private final static String LAUNCHER_THREAD_ID = "Thread Id";
+ private final static String LAUNCHER_TYPE = "Type:";
+ private final static String LAUNCHER_SYMBIAN_OS_RHEAP = "Symbian OS RHeap";
+ private final static String LAUNCHER_SYMBIAN_OS_RHYBRIDHEAP = "Symbian OS RHybridHeap";
+ private final static String LAUNCHER_HEAP_DUMP_START = "<MEMSPY_HEAP_DATA";
+ private final static String LAUNCHER_HEAP_DUMP_END = "</MEMSPY_HEAP_DATA";
+ // Heap info's will act as start point for new Head dump, when Head Dumps
+ // are received during SWMT logging
+ // E.g. following Heap info is received:
+ // HeapData - mc_isiserver::Main - HEAP INFO FOR THREAD 'mc_isiserver::Main'
+ private final static String LAUNCHER_HEAP_INFO_FOR_THREAD = "HEAP INFO FOR THREAD";
+ private final static String LAUNCHER_HEAPDATA = "HeapData -";
+ private final static String LAUNCHER_ERROR = "<MEMSPY_LAUNCHER_ERROR>";
+ private final static String DUMPED_TC_TRACES = "* Dumped Traces";
+ private final static String MEMSPY_PROGRESS = "<MEMSPY_PROGRESS>";
+
/**
- * <code>SYSTEM WIDE MEMORY TRACKER<code> tag
+ * <code>SYSTEM WIDE MEMORY TRACKER<code> tag
*/
- public final static String LAUNCHER_SWMT_LOG_START = "<SYSTEM WIDE MEMORY TRACKER>";
-
- private final static String LAUNCHER_SWMT_LOG_END = "</SYSTEM WIDE MEMORY TRACKER>";
- private final static String LAUNCHER_SWMTDATA = "[SMT ";
- private final static String LAUNCHER_CATEGORY_NOT_SUPPORTED = "<MEMSPY_LAUNCHER_CATEGORY_NOT_SUPPORTED>";
+ public final static String LAUNCHER_SWMT_LOG_START = "<SYSTEM WIDE MEMORY TRACKER>";
- private ThreadInfo swmtHeadDumpThreadInfo;
+ private final static String LAUNCHER_SWMT_LOG_END = "</SYSTEM WIDE MEMORY TRACKER>";
+ private final static String LAUNCHER_SWMTDATA = "[SMT ";
+ private final static String LAUNCHER_CATEGORY_NOT_SUPPORTED = "<MEMSPY_LAUNCHER_CATEGORY_NOT_SUPPORTED>";
+
+ private ThreadInfo swmtHeadDumpThreadInfo;
/**
* Constructor.
- * @param engine engine that uses handler
+ *
+ * @param engine
+ * engine that uses handler
*/
- public TraceCoreDataHandler(TraceCoreEngine engine){
+ public TraceCoreDataHandler(TraceCoreEngine engine) {
this.engine = engine;
lastWasName = false;
heapTypeCorrect = false;
@@ -120,39 +120,45 @@
}
/**
- * Method that is called when trace logging is started.
- * @param fName Name of the file, where needed information is printed.
- * @param fileOpen boolean value that is true when file needs to be opened.
+ * Method that is called when trace logging is started.
+ *
+ * @param fName
+ * Name of the file, where needed information is printed.
+ * @param fileOpen
+ * boolean value that is true when file needs to be opened.
*/
public boolean startLogging(String fName, boolean fileOpen) {
logging = true;
lineCount = 0;
-
- DbgUtility.println(DbgUtility.PRIORITY_OPERATION, "TraceCoreDataHandler.startLogging/fName=" + fName + ", fileOpen=" + fileOpen); //$NON-NLS-1$ //$NON-NLS-2$
-
+
+ DbgUtility
+ .println(
+ DbgUtility.PRIORITY_OPERATION,
+ "TraceCoreDataHandler.startLogging/fName=" + fName + ", fileOpen=" + fileOpen); //$NON-NLS-1$ //$NON-NLS-2$
+
// If file needs to be opened, open it.
this.fileOpen = fileOpen;
- if( fileOpen ){
+ if (fileOpen) {
try {
- plainOutput = new PrintWriter(new FileWriter( fName ));
- }
- catch (IOException e) {
-
+ plainOutput = new PrintWriter(new FileWriter(fName));
+ } catch (IOException e) {
+
engine.launcherError(LauncherErrorType.FILE);
return false;
}
-
+
}
return true;
}
-
+
/**
* Stops logging and closes file if needed.
*/
public void stopLogging() {
- DbgUtility.println(DbgUtility.PRIORITY_OPERATION, "TraceCoreDataHandler.stopLogging"); //$NON-NLS-1$
+ DbgUtility.println(DbgUtility.PRIORITY_OPERATION,
+ "TraceCoreDataHandler.stopLogging"); //$NON-NLS-1$
this.logging = false;
- if( this.fileOpen ){
+ if (this.fileOpen) {
plainOutput.flush();
plainOutput.close();
}
@@ -163,199 +169,226 @@
* Flush and Close swmtHeadDumpOutput
*/
private void stopSWMTHeadDumpLogging() {
- if(swmtHeadDumpOutput != null){
+ if (swmtHeadDumpOutput != null) {
swmtHeadDumpOutput.flush();
swmtHeadDumpOutput.close();
}
}
-
+
/**
* Open FileWriter for swmtHeadDumpOutput
*/
- private void startSWMTHeadDumpLogging(){
+ private void startSWMTHeadDumpLogging() {
try {
File file = new File(swmtHeadDumpThreadInfo.getThreadFilePath());
File path = file.getParentFile();
- if(!path.exists()){
+ if (!path.exists()) {
path.mkdirs();
}
file.createNewFile();
- if(swmtHeadDumpThreadInfo != null){
- swmtHeadDumpOutput = new PrintWriter(new FileWriter( swmtHeadDumpThreadInfo.getThreadFilePath() ));
+ if (swmtHeadDumpThreadInfo != null) {
+ swmtHeadDumpOutput = new PrintWriter(new FileWriter(
+ swmtHeadDumpThreadInfo.getThreadFilePath()));
}
- }
- catch (IOException e) {
+ } catch (IOException e) {
engine.launcherError(LauncherErrorType.FILE);
- }
+ }
}
-
+
/**
- * Processes trace data that is received. This method is called every time trace
- * data is received when logging is on.
- * @param traceLineStr trace data line
+ * Processes trace data that is received. This method is called every time
+ * trace data is received when logging is on.
+ *
+ * @param traceLineStr
+ * trace data line
*/
public void processDataLine(String traceLineStr) {
if (logging) {
-
+
if (traceLineStr != null) {
-
- if(isMemSpyRelatedLine(traceLineStr)){
- lineCount++;
+
+ if (isMemSpyRelatedLine(traceLineStr)) {
+ lineCount++;
}
// Reset timer every 10 MemSpy related lines.
- if( lineCount > 10 ){
+ if (lineCount > 10) {
engine.restartErrorTimer();
lineCount = 0;
}
-
+
// If Line contains launcher error message
- if( traceLineStr.contains( LAUNCHER_ERROR ) ){
- handleLauncherErrorLine(traceLineStr);
+ if (traceLineStr.contains(LAUNCHER_ERROR)) {
+ handleLauncherErrorLine(traceLineStr);
}
-
+
// If line contains message of dumped traces
- else if( traceLineStr.contains( DUMPED_TC_TRACES )){
+ else if (traceLineStr.contains(DUMPED_TC_TRACES)) {
handleDumpTCTracesLine();
}
-
- // If line contains confirmation that Launcher is ready to receive new command
- else if ( traceLineStr.contains(LAUNCHER_READY) ) {
+
+ // If line contains confirmation that Launcher is ready to
+ // receive new command
+ else if (traceLineStr.contains(LAUNCHER_READY)) {
handleLauncherReadyLine();
- }
- else if(traceLineStr.contains(MEMSPY_LAUNCHER_VERSION_PREFIX)){
+ } else if (traceLineStr
+ .contains(MEMSPY_LAUNCHER_VERSION_PREFIX)) {
handleLauncherVersionLine(traceLineStr);
}
- //If launcher sends an progress message, restarting error timer so the timer wont reset progress
- //this is done because of long taking progress was causing time outs.
- else if(traceLineStr.contains(MEMSPY_PROGRESS)){
+ // If launcher sends an progress message, restarting error timer
+ // so the timer wont reset progress
+ // this is done because of long taking progress was causing time
+ // outs.
+ else if (traceLineStr.contains(MEMSPY_PROGRESS)) {
engine.restartErrorTimer();
}
-
+
// If receiving heap dump
- else if( engine.getFirstTask() == TraceCoreEngine.MEMSPY_GET_HEAP_DUMP ){
+ else if (engine.getFirstTask() == TraceCoreEngine.MEMSPY_GET_HEAP_DUMP) {
handleHeadDumpLine(traceLineStr);
}
-
+
// If receiving SWMT log
- else if( engine.getFirstTask() == TraceCoreEngine.MEMSPY_SWMT_UPDATE
- || engine.getFirstTask() == TraceCoreEngine.MEMSPY_SWMT_RESET ){
- handleSWMTLine(traceLineStr);
- }
-
+ else if (engine.getFirstTask() == TraceCoreEngine.MEMSPY_SWMT_UPDATE
+ || engine.getFirstTask() == TraceCoreEngine.MEMSPY_SWMT_RESET) {
+ handleSWMTLine(traceLineStr);
+ }
+
// If receiving thread info
- else if( engine.getFirstTask() == TraceCoreEngine.MEMSPY_THREAD_INFO ){
+ else if (engine.getFirstTask() == TraceCoreEngine.MEMSPY_THREAD_INFO) {
handleThreadInfoLine(traceLineStr);
}
-
+
// Setting SWMT category low bits
- else if( engine.getFirstTask() == TraceCoreEngine.MEMSPY_SET_CATEGORIES_LOW ){
+ else if (engine.getFirstTask() == TraceCoreEngine.MEMSPY_SET_CATEGORIES_LOW) {
handleCategoriesLowLine(traceLineStr);
}
// Setting SWMT category high bits
- else if( engine.getFirstTask() == TraceCoreEngine.MEMSPY_SET_CATEGORIES_HIGH ){
+ else if (engine.getFirstTask() == TraceCoreEngine.MEMSPY_SET_CATEGORIES_HIGH) {
handleCategoriesHighLine(traceLineStr);
}
-
+
// If Receiving thread list
- else if( engine.getFirstTask() == TraceCoreEngine.MEMSPY_THREAD_LIST ){
+ else if (engine.getFirstTask() == TraceCoreEngine.MEMSPY_THREAD_LIST) {
handleThreadListLine(traceLineStr);
}
}
}
-
+
}
/**
* Checks that line has something to do with MemSpy related data.
- * @param str line sting
- * @return <code>true</code> if MemSpy related data, otherwise <code>false</code>.
+ *
+ * @param str
+ * line sting
+ * @return <code>true</code> if MemSpy related data, otherwise
+ * <code>false</code>.
*/
private boolean isMemSpyRelatedLine(String str) {
return str.contains("HeapData") || str.contains("MemSpy");
}
private void handleLauncherVersionLine(String str) {
- DbgUtility.println(DbgUtility.PRIORITY_LOOP, "TraceCoreDataHandler.processData/MEMSPY_LAUNCHER_VERSION_PREFIX"); //$NON-NLS-1$
+ DbgUtility
+ .println(DbgUtility.PRIORITY_LOOP,
+ "TraceCoreDataHandler.processData/MEMSPY_LAUNCHER_VERSION_PREFIX"); //$NON-NLS-1$
String version = cutString(MEMSPY_LAUNCHER_VERSION_PREFIX, END_TAG, str);
engine.setMemSpyLauncherVersion(version);
}
private void handleLauncherReadyLine() {
- DbgUtility.println(DbgUtility.PRIORITY_OPERATION, "TraceCoreDataHandler.processData/LAUNCHER_READY"); //$NON-NLS-1$
+ DbgUtility.println(DbgUtility.PRIORITY_OPERATION,
+ "TraceCoreDataHandler.processData/LAUNCHER_READY"); //$NON-NLS-1$
engine.memSpyReady();
}
private void handleDumpTCTracesLine() {
- DbgUtility.println(DbgUtility.PRIORITY_OPERATION, "TraceCoreDataHandler.processData/DUMPED_TC_TRACES"); //$NON-NLS-1$
+ DbgUtility.println(DbgUtility.PRIORITY_OPERATION,
+ "TraceCoreDataHandler.processData/DUMPED_TC_TRACES"); //$NON-NLS-1$
this.dumpedTraces = true;
}
private void handleLauncherErrorLine(String str) {
- DbgUtility.println(DbgUtility.PRIORITY_OPERATION, "TraceCoreDataHandler.processData/LAUNCHER_ERROR"); //$NON-NLS-1$
- if( str.contains("'") ){
- str = str.substring( str.indexOf("'")+1 );
- if( str.contains("'") ){
- String error = str.substring( 0, str.indexOf("'") );
+ DbgUtility.println(DbgUtility.PRIORITY_OPERATION,
+ "TraceCoreDataHandler.processData/LAUNCHER_ERROR"); //$NON-NLS-1$
+ if (str.contains("'")) {
+ str = str.substring(str.indexOf("'") + 1);
+ if (str.contains("'")) {
+ String error = str.substring(0, str.indexOf("'"));
LauncherErrorType type = getErrorById(error);
engine.launcherError(type);
}
- }
- else{
- // If no error code present, then parsing custom error message and sending information to console
+ } else {
+ // If no error code present, then parsing custom error message and
+ // sending information to console
String additionalErrorInfo = "";
// Getting error message string portion
String[] splitArr = str.split(Pattern.quote(":"));
- if(splitArr.length == 2){
+ if (splitArr.length == 2) {
additionalErrorInfo = additionalErrorInfo + splitArr[1].trim();
}
// Passing launcher error forwards generic launcher error
- engine.launcherError(LauncherErrorType.GENERAL_LAUNCHER_ERROR, additionalErrorInfo);
+ engine.launcherError(LauncherErrorType.GENERAL_LAUNCHER_ERROR,
+ additionalErrorInfo);
}
}
private void handleThreadListLine(String str) {
// If line contains "::" create new ThreadInfo-object
- if ( str.contains( LAUNCHER_COLON ) ) {
-
+ if (str.contains(LAUNCHER_COLON)) {
+
threadInfo = new ThreadInfo();
threadInfo.setThreadName(str);
lastWasName = true;
}
- // Save threadID into latest ThreadInfo-object and add info into thread list
- if ( str.contains( LAUNCHER_THREAD_ID ) ){
- if ( lastWasName ){
- String threadID = str.substring( str.indexOf( LAUNCHER_THREAD_ID ) + LAUNCHER_THREAD_ID.length() );
+ // Save threadID into latest ThreadInfo-object and add info into thread
+ // list
+ if (str.contains(LAUNCHER_THREAD_ID)) {
+ if (lastWasName) {
+ String threadID = str.substring(str.indexOf(LAUNCHER_THREAD_ID)
+ + LAUNCHER_THREAD_ID.length());
threadID = threadID.trim();
- threadInfo.setThreadID( threadID );
- threadArray.add( threadInfo );
- DbgUtility.println(DbgUtility.PRIORITY_OPERATION, "TraceCoreDataHandler.processData/LAUNCHER_THREAD_ID/id=" + threadInfo.getThreadID() + ", name=" + threadInfo.getThreadName()); //$NON-NLS-1$ //$NON-NLS-2$
+ threadInfo.setThreadID(threadID);
+ threadArray.add(threadInfo);
+ DbgUtility
+ .println(
+ DbgUtility.PRIORITY_OPERATION,
+ "TraceCoreDataHandler.processData/LAUNCHER_THREAD_ID/id=" + threadInfo.getThreadID() + ", name=" + threadInfo.getThreadName()); //$NON-NLS-1$ //$NON-NLS-2$
lastWasName = false;
}
}
}
private void handleCategoriesHighLine(String str) {
- DbgUtility.println(DbgUtility.PRIORITY_OPERATION, "TraceCoreDataHandler.processData/MEMSPY_SET_CATEGORIES_HIGH: " + str); //$NON-NLS-1$
+ DbgUtility
+ .println(
+ DbgUtility.PRIORITY_OPERATION,
+ "TraceCoreDataHandler.processData/MEMSPY_SET_CATEGORIES_HIGH: " + str); //$NON-NLS-1$
}
private void handleCategoriesLowLine(String str) {
- DbgUtility.println(DbgUtility.PRIORITY_OPERATION, "TraceCoreDataHandler.processData/MEMSPY_SET_CATEGORIES_LOW: " + str); //$NON-NLS-1$
- if(str.contains(LAUNCHER_CATEGORY_NOT_SUPPORTED)){
- //LAUNCHER_CATEGORY_NOT_SUPPORTED error
+ DbgUtility
+ .println(
+ DbgUtility.PRIORITY_OPERATION,
+ "TraceCoreDataHandler.processData/MEMSPY_SET_CATEGORIES_LOW: " + str); //$NON-NLS-1$
+ if (str.contains(LAUNCHER_CATEGORY_NOT_SUPPORTED)) {
+ // LAUNCHER_CATEGORY_NOT_SUPPORTED error
engine.launcherError(LauncherErrorType.CATEGORIES_NOT_SUPPORTED);
}
}
private void handleThreadInfoLine(String str) {
// Check for threads heap type
- if ( str.contains( LAUNCHER_TYPE ) ){
- if ( str.contains(LAUNCHER_SYMBIAN_OS_RHEAP) ){
- DbgUtility.println(DbgUtility.PRIORITY_OPERATION, "TraceCoreDataHandler.processData/MEMSPY_THREAD_INFO"); //$NON-NLS-1$
+ if (str.contains(LAUNCHER_TYPE)) {
+ if (str.contains(LAUNCHER_SYMBIAN_OS_RHEAP)
+ || str.contains(LAUNCHER_SYMBIAN_OS_RHYBRIDHEAP)) {
+ DbgUtility.println(DbgUtility.PRIORITY_OPERATION,
+ "TraceCoreDataHandler.processData/MEMSPY_THREAD_INFO"); //$NON-NLS-1$
heapTypeCorrect = true;
}
}
@@ -363,165 +396,201 @@
private void handleSWMTLine(String str) {
// Check for start tag
- if ( str.contains( LAUNCHER_SWMT_LOG_START ) ) {
- DbgUtility.println(DbgUtility.PRIORITY_OPERATION, "TraceCoreDataHandler.processData/LAUNCHER_SWMT_LOG_START"); //$NON-NLS-1$
+ if (str.contains(LAUNCHER_SWMT_LOG_START)) {
+ DbgUtility.println(DbgUtility.PRIORITY_OPERATION,
+ "TraceCoreDataHandler.processData/LAUNCHER_SWMT_LOG_START"); //$NON-NLS-1$
this.writeFile = true;
- engine.restartErrorTimer(); // Resetting error time instantly when getting start event of the logging
+ engine.restartErrorTimer(); // Resetting error time instantly when
+ // getting start event of the logging
}
-
+
// If writing to file
- if ( this.writeFile && str.contains(LAUNCHER_SWMTDATA) ){
- this.writeLine( str );
+ if (this.writeFile && str.contains(LAUNCHER_SWMTDATA)) {
+ this.writeLine(str);
}
-
-
+
// If we receive a Heap Dump line during SWMT logging
- if ( this.writeFile &&
- (str.contains(LAUNCHER_HEAPDATA)
- || str.contains(LAUNCHER_HEAP_DUMP_START) || str.contains(LAUNCHER_HEAP_DUMP_END))){
+ if (this.writeFile
+ && (str.contains(LAUNCHER_HEAPDATA)
+ || str.contains(LAUNCHER_HEAP_DUMP_START) || str
+ .contains(LAUNCHER_HEAP_DUMP_END))) {
handleHeapDumpDuringSWMTLogging(str);
- }
+ }
// Check for end tag
- if ( str.contains( LAUNCHER_SWMT_LOG_END ) ) {
- DbgUtility.println(DbgUtility.PRIORITY_OPERATION, "TraceCoreDataHandler.processData/LAUNCHER_SWMT_LOG_END"); //$NON-NLS-1$
+ if (str.contains(LAUNCHER_SWMT_LOG_END)) {
+ DbgUtility.println(DbgUtility.PRIORITY_OPERATION,
+ "TraceCoreDataHandler.processData/LAUNCHER_SWMT_LOG_END"); //$NON-NLS-1$
this.writeFile = false;
- engine.restartErrorTimer(); // Resetting error time instantly when getting end event of the logging
+ engine.restartErrorTimer(); // Resetting error time instantly when
+ // getting end event of the logging
}
}
/**
* Handling a Heap Dump line during SWMT logging
+ *
* @param str
*/
private void handleHeapDumpDuringSWMTLogging(String str) {
-
- //If we receiving a start point of Dump..
- if(str.contains(LAUNCHER_HEAP_DUMP_START)){
- DbgUtility.println(DbgUtility.PRIORITY_LOOP, "TraceCoreDataHandler.processData/Start SWMT Head Dump"); //$NON-NLS-1$
+
+ // If we receiving a start point of Dump..
+ if (str.contains(LAUNCHER_HEAP_DUMP_START)) {
+ DbgUtility.println(DbgUtility.PRIORITY_LOOP,
+ "TraceCoreDataHandler.processData/Start SWMT Head Dump"); //$NON-NLS-1$
swmtHeadDumpThreadInfo = new ThreadInfo();
- if(threadArray == null){
+ if (threadArray == null) {
setThreadArray(new ArrayList<ThreadInfo>());
}
}
- //If we receiving a Thread name of Dump, we create a new file for dump, and start dumping it
- else if(str.contains(LAUNCHER_HEAP_INFO_FOR_THREAD)){
-
+ // If we receiving a Thread name of Dump, we create a new file for dump,
+ // and start dumping it
+ else if (str.contains(LAUNCHER_HEAP_INFO_FOR_THREAD)) {
+
String threadName = getThreadNameFromInfo(str);
swmtHeadDumpThreadInfo.setThreadName(threadName);
- DbgUtility.println(DbgUtility.PRIORITY_LOOP, "TraceCoreDataHandler.processData/SWMT Head Dump Thread name received: " +threadName); //$NON-NLS-1$
-
- //String threadName, String threadID, String threadFilePath, Date date, HeapDumpType type
+ DbgUtility
+ .println(
+ DbgUtility.PRIORITY_LOOP,
+ "TraceCoreDataHandler.processData/SWMT Head Dump Thread name received: " + threadName); //$NON-NLS-1$
+
+ // String threadName, String threadID, String threadFilePath, Date
+ // date, HeapDumpType type
// Get file name for heap dump from engine
- String filePath = MemSpyFileOperations.getFileNameForTempHeapDump(
- swmtHeadDumpThreadInfo.getThreadName(), swmtHeadDumpThreadInfo.getDate());
+ String filePath = MemSpyFileOperations.getFileNameForTempHeapDump(
+ swmtHeadDumpThreadInfo.getThreadName(),
+ swmtHeadDumpThreadInfo.getDate());
swmtHeadDumpThreadInfo.setThreadFilePath(filePath);
startSWMTHeadDumpLogging();
writeSWMTHeadDumpLine(str);
- DbgUtility.println(DbgUtility.PRIORITY_LOOP, "TraceCoreDataHandler.processData/SWMT Head Dump Thread file created: " +filePath); //$NON-NLS-1$
-
- //Heap info's will act as start point for new Head dump, when Head Dumps are received during SWMT logging
- //E.g. following Heap info is received:
- //HeapData - mc_isiserver::Main - HEAP INFO FOR THREAD 'mc_isiserver::Main'
+ DbgUtility
+ .println(
+ DbgUtility.PRIORITY_LOOP,
+ "TraceCoreDataHandler.processData/SWMT Head Dump Thread file created: " + filePath); //$NON-NLS-1$
+
+ // Heap info's will act as start point for new Head dump, when Head
+ // Dumps are received during SWMT logging
+ // E.g. following Heap info is received:
+ // HeapData - mc_isiserver::Main - HEAP INFO FOR THREAD
+ // 'mc_isiserver::Main'
}
-
- //If we receiving a end point of Dump...
- else if(str.contains(LAUNCHER_HEAP_DUMP_END)){
- DbgUtility.println(DbgUtility.PRIORITY_LOOP, "TraceCoreDataHandler.processData/End SWMT Head Dump"); //$NON-NLS-1$
- threadArray.add( swmtHeadDumpThreadInfo );
+
+ // If we receiving a end point of Dump...
+ else if (str.contains(LAUNCHER_HEAP_DUMP_END)) {
+ DbgUtility.println(DbgUtility.PRIORITY_LOOP,
+ "TraceCoreDataHandler.processData/End SWMT Head Dump"); //$NON-NLS-1$
+ threadArray.add(swmtHeadDumpThreadInfo);
stopSWMTHeadDumpLogging();
}
-
- //Else we receiving a dump line, and writing it to the Dump file, not to SWMT file
- else if(swmtHeadDumpThreadInfo != null && swmtHeadDumpOutput != null){
+
+ // Else we receiving a dump line, and writing it to the Dump file, not
+ // to SWMT file
+ else if (swmtHeadDumpThreadInfo != null && swmtHeadDumpOutput != null) {
writeSWMTHeadDumpLine(str);
- }
- else{
- DbgUtility.println(DbgUtility.PRIORITY_LOOP, "TraceCoreDataHandler.processData/LAUNCHER_HEAPDATA & MEMSPY_SWMT_UPDATE unknown line occured: " +str);
+ } else {
+ DbgUtility
+ .println(
+ DbgUtility.PRIORITY_LOOP,
+ "TraceCoreDataHandler.processData/LAUNCHER_HEAPDATA & MEMSPY_SWMT_UPDATE unknown line occured: "
+ + str);
}
}
/**
* Get Thread name from Heap Info line
+ *
* @param str
* @return Thread name
*/
private String getThreadNameFromInfo(String str) {
- String name = str.substring(
- (str.indexOf(LAUNCHER_HEAP_INFO_FOR_THREAD) + LAUNCHER_HEAP_INFO_FOR_THREAD.length()));
+ String name = str
+ .substring((str.indexOf(LAUNCHER_HEAP_INFO_FOR_THREAD) + LAUNCHER_HEAP_INFO_FOR_THREAD
+ .length()));
String separator = "'";
- name = name.substring((name.indexOf(separator) + separator.length()), name.lastIndexOf(separator)).trim();
+ name = name.substring((name.indexOf(separator) + separator.length()),
+ name.lastIndexOf(separator)).trim();
return name;
}
private void handleHeadDumpLine(String str) {
// Check for heap end tag
- if ( str.contains( LAUNCHER_HEAP_DUMP_END ) ) {
- DbgUtility.println(DbgUtility.PRIORITY_OPERATION, "TraceCoreDataHandler.processData/MEMSPY_GET_HEAP_DUMP/LAUNCHER_HEAP_DUMP_END"); //$NON-NLS-1$
+ if (str.contains(LAUNCHER_HEAP_DUMP_END)) {
+ DbgUtility
+ .println(DbgUtility.PRIORITY_OPERATION,
+ "TraceCoreDataHandler.processData/MEMSPY_GET_HEAP_DUMP/LAUNCHER_HEAP_DUMP_END"); //$NON-NLS-1$
this.writeFile = false;
- }
-
+ }
+
// If writing to file
- if ( this.writeFile && str.contains(LAUNCHER_HEAPDATA) ){
- this.writeLine( str );
+ if (this.writeFile && str.contains(LAUNCHER_HEAPDATA)) {
+ this.writeLine(str);
}
-
+
// Check for heap start tag
- if ( str.contains( LAUNCHER_HEAP_DUMP_START ) ) {
- DbgUtility.println(DbgUtility.PRIORITY_OPERATION, "TraceCoreDataHandler.processData/MEMSPY_GET_HEAP_DUMP/LAUNCHER_HEAP_DUMP_START"); //$NON-NLS-1$
+ if (str.contains(LAUNCHER_HEAP_DUMP_START)) {
+ DbgUtility
+ .println(
+ DbgUtility.PRIORITY_OPERATION,
+ "TraceCoreDataHandler.processData/MEMSPY_GET_HEAP_DUMP/LAUNCHER_HEAP_DUMP_START"); //$NON-NLS-1$
this.writeFile = true;
}
- }
+ }
/**
* Cut string from startTag to endTag
+ *
* @param startTag
* @param endTag
* @param str
- * @return cutted string or str given if start and end tags does not found from given str
+ * @return cutted string or str given if start and end tags does not found
+ * from given str
*/
- private static String cutString(String startTag, String endTag,
- String str) {
- if(!str.contains(startTag) && !str.contains(endTag)){
+ private static String cutString(String startTag, String endTag, String str) {
+ if (!str.contains(startTag) && !str.contains(endTag)) {
return str;
}
- String ret = str.substring(str.indexOf(startTag) + startTag.length());
- ret = ret.substring(0,ret.indexOf(endTag));
+ String ret = str.substring(str.indexOf(startTag) + startTag.length());
+ ret = ret.substring(0, ret.indexOf(endTag));
return ret;
}
/**
* Writes one line into opened file.
- * @param line, Line that is written to file
+ *
+ * @param line
+ * , Line that is written to file
*/
- private void writeLine(String line){
+ private void writeLine(String line) {
plainOutput.write(line + "\n");
}
/**
* Writes one line into opened file.
- * @param line, Line that is written to file
+ *
+ * @param line
+ * , Line that is written to file
*/
- private void writeSWMTHeadDumpLine(String line){
+ private void writeSWMTHeadDumpLine(String line) {
swmtHeadDumpOutput.write(line + "\n");
}
-
-
+
//
// Getters and setters for member variables
//
-
+
/**
* Set thread array
+ *
* @param threadArray
*/
public void setThreadArray(ArrayList<ThreadInfo> threadArray) {
this.threadArray = threadArray;
- }
+ }
/**
* Check if {@link TraceCoreDataHandler#LAUNCHER_COLON} was found in line
+ *
* @param lastWasName
*/
public void setLastWasName(boolean lastWasName) {
@@ -530,7 +599,9 @@
/**
* Check if heap type was correct
- * @return <code>true</code> if heap type was correct, <code>false</code> otherwise.
+ *
+ * @return <code>true</code> if heap type was correct, <code>false</code>
+ * otherwise.
*/
public boolean isHeapTypeCorrect() {
return heapTypeCorrect;
@@ -538,6 +609,7 @@
/**
* Set heap type as correct
+ *
* @param heapTypeCorrect
*/
public void setHeapTypeCorrect(boolean heapTypeCorrect) {
@@ -546,6 +618,7 @@
/**
* Set dump traces
+ *
* @param dumpedTraces
*/
public void setDumpedTraces(boolean dumpedTraces) {
@@ -553,43 +626,51 @@
}
/**
- * Check if trace was containing {@link TraceCoreDataHandler#DUMPED_TC_TRACES} lines
- * @return <code>true</code> if dumped lines was found, <code>false</code> otherwise.
+ * Check if trace was containing
+ * {@link TraceCoreDataHandler#DUMPED_TC_TRACES} lines
+ *
+ * @return <code>true</code> if dumped lines was found, <code>false</code>
+ * otherwise.
*/
public boolean isDumpedTraces() {
return dumpedTraces;
}
-
+
/**
* Returns {@link LauncherErrorType} by its ordinal
- * @param errorCodeAsString Error number as string
- * @return {@link LauncherErrorType} or {@link LauncherErrorType#ACTIVATION} if no matching item found.
+ *
+ * @param errorCodeAsString
+ * Error number as string
+ * @return {@link LauncherErrorType} or {@link LauncherErrorType#ACTIVATION}
+ * if no matching item found.
*/
- private LauncherErrorType getErrorById(String errorCodeAsString){
-
+ private LauncherErrorType getErrorById(String errorCodeAsString) {
+
try {
int errorCode = Integer.parseInt(errorCodeAsString);
- LauncherErrorType [] values = LauncherErrorType.values();
+ LauncherErrorType[] values = LauncherErrorType.values();
for (int i = 0; i < values.length; i++) {
- if(errorCode == values[i].ordinal()){
+ if (errorCode == values[i].ordinal()) {
return values[i];
}
- }
+ }
} catch (NumberFormatException e) {
- //If occurs, it's an internal error, MemSpy S60 side is giving id in wrong format.
+ // If occurs, it's an internal error, MemSpy S60 side is giving id
+ // in wrong format.
e.printStackTrace();
MemSpyConsole.getInstance().printStackTrace(e);
- }
+ }
return LauncherErrorType.ACTIVATION;
}
/**
* Get imported SWMT Heap Dumps
+ *
* @return imported SWMT Heap Dumps
*/
public ArrayList<ThreadInfo> getImportedSWMTHeaps() {
return threadArray;
}
-
+
}
--- a/sysperfana/memspyext/com.nokia.s60tools.swmtanalyser.thirdpartysources/META-INF/MANIFEST.MF Thu Jun 24 14:37:32 2010 +0300
+++ b/sysperfana/memspyext/com.nokia.s60tools.swmtanalyser.thirdpartysources/META-INF/MANIFEST.MF Tue Aug 24 12:10:03 2010 +0300
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: Carbide.c++ Extensions - SWMT Analyser Thirdpartysources
Bundle-SymbolicName: com.nokia.s60tools.swmtanalyser.thirdpartysources
-Bundle-Version: 1.6.0
+Bundle-Version: 1.7.0
Bundle-Activator: com.nokia.s60tools.swmtanalyser.thirdpartysources.Activator
Bundle-Vendor: Nokia
Require-Bundle: org.eclipse.ui,
--- a/sysperfana/memspyext/com.nokia.s60tools.swmtanalyser/META-INF/MANIFEST.MF Thu Jun 24 14:37:32 2010 +0300
+++ b/sysperfana/memspyext/com.nokia.s60tools.swmtanalyser/META-INF/MANIFEST.MF Tue Aug 24 12:10:03 2010 +0300
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: Carbide.c++ Extensions - Swmt Analyser
Bundle-SymbolicName: com.nokia.s60tools.swmtanalyser;singleton:=true
-Bundle-Version: 1.6.0
+Bundle-Version: 1.7.0
Bundle-Activator: com.nokia.s60tools.swmtanalyser.SwmtAnalyserPlugin
Bundle-Vendor: Nokia
Require-Bundle: org.eclipse.ui,