change log for rtems-testing (2011-08-21)
rtems-vc at rtems.org
rtems-vc at rtems.org
Sun Aug 21 16:10:02 UTC 2011
*joel*:
2011-08-21 Pawel Zagorski <pzagor at 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.
M 1.22 covoar/ChangeLog
M 1.4 covoar/CoverageMapBase.h
M 1.5 covoar/CoverageMapBase.cc
M 1.8 covoar/DesiredSymbols.cc
M 1.4 covoar/covoar.cc
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
@@ -1,3 +1,12 @@
+2011-08-21 Pawel Zagorski <pzagor at 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.
+
2011-03-08 Joel Sherrill <joel.sherrilL at OARcorp.com>
* DesiredSymbols.cc, DesiredSymbols.h, covoar.cc: Fix typo.
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
@@ -175,8 +175,8 @@
bool isStartOfInstruction( uint32_t address ) const;
/*!
- * This method sets the boolean which indicates that the instruction
- * at the specified address was executed.
+ * This method increments the counter which indicates how many times
+ * the instruction at the specified address was executed.
*
* @param[in] address specifies the address which was executed
*/
@@ -194,6 +194,27 @@
bool wasExecuted( uint32_t address ) const;
/*!
+ * 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
+ *
+ * @return Returns number of executins
+ */
+ uint32_t getWasExecuted( uint32_t address ) const;
+
+ /*!
* This method sets the boolean which indicates if the specified
* address is the starting address of a branch instruction.
*
@@ -304,9 +325,9 @@
*/
bool isStartOfInstruction;
/*!
- * This member indicates that the address was executed.
+ * This member indicates how many times the address was executed.
*/
- bool wasExecuted;
+ uint32_t wasExecuted;
/*!
* This member indicates that the address is a branch instruction.
*/
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
@@ -40,7 +40,7 @@
perAddressInfo_t *i = &Info[ a ];
i->isStartOfInstruction = false;
- i->wasExecuted = false;
+ i->wasExecuted = 0;
i->isBranch = false;
i->isNop = false;
i->wasTaken = false;
@@ -200,17 +200,43 @@
if (determineOffset( address, &offset ) != true)
return;
- Info[ offset ].wasExecuted = true;
+ Info[ offset ].wasExecuted += 1;
+ }
+
+ void CoverageMapBase::sumWasExecuted( uint32_t address, uint32_t addition)
+ {
+ uint32_t offset;
+
+ if (determineOffset( address, &offset ) != true)
+ return;
+
+ Info[ offset ].wasExecuted += addition;
}
bool CoverageMapBase::wasExecuted( uint32_t address ) const
{
uint32_t offset;
+ bool result;
+ result = true;
+
if (determineOffset( address, &offset ) != true)
- return false;
+ 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;
- return Info[ offset ].wasExecuted;
+ return Info[ offset ].wasExecuted;
}
void CoverageMapBase::setIsBranch(
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
@@ -629,6 +629,7 @@
uint32_t sAddress;
uint32_t sBaseAddress;
uint32_t sMapSize;
+ uint32_t executionCount;
// Ensure that the symbol is a desired symbol.
itr = set.find( symbolName );
@@ -673,8 +674,8 @@
destinationCoverageMap->setIsStartOfInstruction( dAddress );
// Merge the execution data.
- if (sourceCoverageMap->wasExecuted( sAddress ))
- destinationCoverageMap->setWasExecuted( dAddress );
+ executionCount = sourceCoverageMap->getWasExecuted( sAddress );
+ destinationCoverageMap->sumWasExecuted( dAddress, executionCount );
// Merge the branch data.
if (sourceCoverageMap->wasTaken( sAddress ))
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
@@ -81,7 +81,6 @@
*/
#include "ConfigFile.h"
Configuration::FileReader *CoverageConfiguration;
-
Configuration::Options_t Options[] = {
{ "explanations", NULL },
{ "format", NULL },
--
Generated by Deluxe Loginfo [http://www.codewiz.org/projects/index.html#loginfo] 2.122 by Bernardo Innocenti <bernie at develer.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/vc/attachments/20110821/c66869f3/attachment.html>
More information about the vc
mailing list