<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>change log for rtems-testing (2011-08-21)</title>
</head>
<body text='#000000' bgcolor='#ffffff'>
<a name='cs1'></a>
<table border='0' cellspacing='0' cellpadding='5' width='100%' bgcolor='#eeeeee'>
<tr><td colspan='3' bgcolor='#dddddd'>
<font color='#bb2222'><strong>joel</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>2011-08-21 Pawel Zagorski <pzagor@agh.edu.pl>
PR 1900/testing
* CoverageMapBase.cc, CoverageMapBase.h, DesiredSymbols.cc:
Changed tracking of "instruction was executed" from a boolean
to a counter. This change was propagated as needed and a helper
method to access new information (getWasExecuted) was added.
* covoar.cc: Removed unnecessary blank line.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems-testing/covoar/ChangeLog.diff?r1=text&tr1=1.21&r2=text&tr2=1.22&diff_format=h">M</a></td><td width='1%'>1.22</td><td width='100%'>covoar/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems-testing/covoar/CoverageMapBase.h.diff?r1=text&tr1=1.3&r2=text&tr2=1.4&diff_format=h">M</a></td><td width='1%'>1.4</td><td width='100%'>covoar/CoverageMapBase.h</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems-testing/covoar/CoverageMapBase.cc.diff?r1=text&tr1=1.4&r2=text&tr2=1.5&diff_format=h">M</a></td><td width='1%'>1.5</td><td width='100%'>covoar/CoverageMapBase.cc</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems-testing/covoar/DesiredSymbols.cc.diff?r1=text&tr1=1.7&r2=text&tr2=1.8&diff_format=h">M</a></td><td width='1%'>1.8</td><td width='100%'>covoar/DesiredSymbols.cc</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems-testing/covoar/covoar.cc.diff?r1=text&tr1=1.3&r2=text&tr2=1.4&diff_format=h">M</a></td><td width='1%'>1.4</td><td width='100%'>covoar/covoar.cc</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems-testing/covoar/ChangeLog:1.21 rtems-testing/covoar/ChangeLog:1.22
--- rtems-testing/covoar/ChangeLog:1.21 Tue Mar 8 12:27:39 2011
+++ rtems-testing/covoar/ChangeLog Sun Aug 21 11:00:07 2011
</font><font color='#997700'>@@ -1,3 +1,12 @@
</font><font color='#000088'>+2011-08-21 Pawel Zagorski <pzagor@agh.edu.pl>
+
+ PR 1900/testing
+ * CoverageMapBase.cc, CoverageMapBase.h, DesiredSymbols.cc:
+ Changed tracking of "instruction was executed" from a boolean
+ to a counter. This change was propagated as needed and a helper
+ method to access new information (getWasExecuted) was added.
+ * covoar.cc: Removed unnecessary blank line.
+
</font> 2011-03-08 Joel Sherrill <joel.sherrilL@OARcorp.com>
* DesiredSymbols.cc, DesiredSymbols.h, covoar.cc: Fix typo.
<font color='#006600'>diff -u rtems-testing/covoar/CoverageMapBase.h:1.3 rtems-testing/covoar/CoverageMapBase.h:1.4
--- rtems-testing/covoar/CoverageMapBase.h:1.3 Tue Jan 25 15:26:00 2011
+++ rtems-testing/covoar/CoverageMapBase.h Sun Aug 21 11:00:07 2011
</font><font color='#997700'>@@ -175,8 +175,8 @@
</font> bool isStartOfInstruction( uint32_t address ) const;
/*!
<font color='#880000'>- * This method sets the boolean which indicates that the instruction
- * at the specified address was executed.
</font><font color='#000088'>+ * This method increments the counter which indicates how many times
+ * the instruction at the specified address was executed.
</font> *
* @param[in] address specifies the address which was executed
*/
<font color='#997700'>@@ -194,6 +194,27 @@
</font> bool wasExecuted( uint32_t address ) const;
/*!
<font color='#000088'>+ * This method increases the counter which indicates how many times
+ * the instruction at the specified address was executed. It is used
+ * for merging coverage maps.
+ *
+ * @param[in] address specifies the address which was executed
+ * @param[in] address specifies the execution count that should be
+ * added
+ */
+ virtual void sumWasExecuted( uint32_t address, uint32_t addition );
+
+ /*!
+ * This method returns an unsigned integer which indicates how often
+ * the instruction at the specified address was executed.
+ *
+ * @param[in] address specifies the address to check
+ *<span style="background-color: #FF0000"> </span>
+ * @return Returns number of executins
+ */
+ uint32_t getWasExecuted( uint32_t address ) const;
+
+ /*!
</font> * This method sets the boolean which indicates if the specified
* address is the starting address of a branch instruction.
*
<font color='#997700'>@@ -304,9 +325,9 @@
</font> */
bool isStartOfInstruction;
/*!
<font color='#880000'>- * This member indicates that the address was executed.
</font><font color='#000088'>+ * This member indicates how many times the address was executed.
</font> */
<font color='#880000'>- bool wasExecuted;
</font><font color='#000088'>+ uint32_t wasExecuted;
</font> /*!
* This member indicates that the address is a branch instruction.
*/
<font color='#006600'>diff -u rtems-testing/covoar/CoverageMapBase.cc:1.4 rtems-testing/covoar/CoverageMapBase.cc:1.5
--- rtems-testing/covoar/CoverageMapBase.cc:1.4 Mon Mar 7 14:30:49 2011
+++ rtems-testing/covoar/CoverageMapBase.cc Sun Aug 21 11:00:07 2011
</font><font color='#997700'>@@ -40,7 +40,7 @@
</font> perAddressInfo_t *i = &Info[ a ];
i->isStartOfInstruction = false;
<font color='#880000'>- i->wasExecuted = false;
</font><font color='#000088'>+ i->wasExecuted = 0;
</font> i->isBranch = false;
i->isNop = false;
i->wasTaken = false;
<font color='#997700'>@@ -200,17 +200,43 @@
</font> if (determineOffset( address, &offset ) != true)
return;
<font color='#880000'>- Info[ offset ].wasExecuted = true;
</font><font color='#000088'>+ Info[ offset ].wasExecuted += 1;
+ }
+
+ void CoverageMapBase::sumWasExecuted( uint32_t address, uint32_t addition)
+ {
+ uint32_t offset;
+<span style="background-color: #FF0000"> </span>
+ if (determineOffset( address, &offset ) != true)
+ return;
+
+ Info[ offset ].wasExecuted += addition;
</font> }
bool CoverageMapBase::wasExecuted( uint32_t address ) const
{
uint32_t offset;
<font color='#000088'>+ bool result;
</font>
<font color='#000088'>+ result = true;
+
</font> if (determineOffset( address, &offset ) != true)
<font color='#880000'>- return false;
</font><font color='#000088'>+ result = false;
+
+ if (Info[ offset ].wasExecuted <= 0)
+ result = false;
+
+ return result;
+ }
+
+ uint32_t CoverageMapBase::getWasExecuted( uint32_t address ) const
+ {
+ uint32_t offset;
+
+ if (determineOffset( address, &offset ) != true)
+ return 0;
</font>
<font color='#880000'>- return Info[ offset ].wasExecuted;
</font><font color='#000088'>+ return Info[ offset ].wasExecuted;<span style="background-color: #FF0000"> </span>
</font> }
void CoverageMapBase::setIsBranch(
<font color='#006600'>diff -u rtems-testing/covoar/DesiredSymbols.cc:1.7 rtems-testing/covoar/DesiredSymbols.cc:1.8
--- rtems-testing/covoar/DesiredSymbols.cc:1.7 Tue Mar 8 12:27:39 2011
+++ rtems-testing/covoar/DesiredSymbols.cc Sun Aug 21 11:00:07 2011
</font><font color='#997700'>@@ -629,6 +629,7 @@
</font> uint32_t sAddress;
uint32_t sBaseAddress;
uint32_t sMapSize;
<font color='#000088'>+ uint32_t executionCount;
</font>
// Ensure that the symbol is a desired symbol.
itr = set.find( symbolName );
<font color='#997700'>@@ -673,8 +674,8 @@
</font> destinationCoverageMap->setIsStartOfInstruction( dAddress );
// Merge the execution data.
<font color='#880000'>- if (sourceCoverageMap->wasExecuted( sAddress ))
- destinationCoverageMap->setWasExecuted( dAddress );
</font><font color='#000088'>+ executionCount = sourceCoverageMap->getWasExecuted( sAddress );
+ destinationCoverageMap->sumWasExecuted( dAddress, executionCount );
</font>
// Merge the branch data.
if (sourceCoverageMap->wasTaken( sAddress ))
<font color='#006600'>diff -u rtems-testing/covoar/covoar.cc:1.3 rtems-testing/covoar/covoar.cc:1.4
--- rtems-testing/covoar/covoar.cc:1.3 Tue Mar 8 12:27:39 2011
+++ rtems-testing/covoar/covoar.cc Sun Aug 21 11:00:07 2011
</font><font color='#997700'>@@ -81,7 +81,6 @@
</font> */
#include "ConfigFile.h"
Configuration::FileReader *CoverageConfiguration;
<font color='#880000'>-
</font> Configuration::Options_t Options[] = {
{ "explanations", NULL },
{ "format", NULL },
</pre>
<p> </p>
<p>--<br />
<small>Generated by <a href="http://www.codewiz.org/projects/index.html#loginfo">Deluxe Loginfo</a> 2.122 by Bernardo Innocenti <bernie@develer.com></small></p>
</body>
</html>