summaryrefslogtreecommitdiffstats
path: root/tester/covoar/ReportsBase.h
diff options
context:
space:
mode:
authorAlex White <alex.white@oarcorp.com>2021-04-02 16:21:43 -0500
committerJoel Sherrill <joel@rtems.org>2021-04-06 14:18:55 -0500
commitb02600a6bbc4d0524b731e504c91bc293d70a354 (patch)
tree3a3156d9013552231fd89ddc203dda3032b7def0 /tester/covoar/ReportsBase.h
parentcovoar: Fix off-by-one in Coverage::finalizeSymbol() (diff)
downloadrtems-tools-b02600a6bbc4d0524b731e504c91bc293d70a354.tar.bz2
covoar: Split symbols by symbol set
This changes the way covoar organizes the symbols. Instead of treating all symbols as one set, covoar is now aware of multiple symbol sets and tracks statistics for each set. It now also generates reports for each symbol set. This change relieves the caller of covoar of the reponsibility of managing the symbol sets. As a result, covoar can minimize the work done for each symbol set, yielding a significant speedup. Updates #4374
Diffstat (limited to 'tester/covoar/ReportsBase.h')
-rw-r--r--tester/covoar/ReportsBase.h40
1 files changed, 28 insertions, 12 deletions
diff --git a/tester/covoar/ReportsBase.h b/tester/covoar/ReportsBase.h
index 7e28fd8..43cd80e 100644
--- a/tester/covoar/ReportsBase.h
+++ b/tester/covoar/ReportsBase.h
@@ -24,7 +24,7 @@ namespace Coverage {
class ReportsBase {
public:
- ReportsBase( time_t timestamp );
+ ReportsBase( time_t timestamp, std::string symbolSetName );
virtual ~ReportsBase();
/*!
@@ -90,7 +90,8 @@ class ReportsBase {
* This method produces a sumary report for the overall test run.
*/
static void WriteSummaryReport(
- const char* const fileName
+ const char* const fileName,
+ const char* const symbolSetName
);
/*!
@@ -119,6 +120,11 @@ class ReportsBase {
std::string reportExtension_m;
/*!
+ * This member variable contains the name of the symbol set for the report.
+ */
+ std::string symbolSetName_m;
+
+ /*!
* This member variable contains the timestamp for the report.
*/
time_t timestamp_m;
@@ -128,9 +134,11 @@ class ReportsBase {
* correctly. Upon failure NULL is returned.
*
* @param[in] fileName identifies the report file name
+ * @param[in] symbolSetName identifies the name of the report's symbol set
*/
static FILE* OpenFile(
- const char* const fileName
+ const char* const fileName,
+ const char* const symbolSetName
);
/*!
@@ -318,13 +326,15 @@ class ReportsBase {
*
* @param[in] report identifies the report file name
* @param[in] number identifies the line number.
- * @param[in] symbolPtr is a pointer to the symbol information
+ * @param[in] symbolName is the symbol's name.
+ * @param[in] symbolInfo is the symbol's information.
* @param[in] rangePtr is a pointer to the range information.
*/
virtual bool PutBranchEntry(
FILE* report,
unsigned int number,
- Coverage::DesiredSymbols::symbolSet_t::iterator symbolPtr,
+ const std::string& symbolName,
+ const SymbolInformation& symbolInfo,
Coverage::CoverageRanges::ranges_t::iterator rangePtr
)=0;
@@ -348,13 +358,15 @@ class ReportsBase {
*
* @param[in] report identifies the report file name
* @param[in] number identifies the line number.
- * @param[in] ditr is a iterator to the symbol information
+ * @param[in] symbolName is the symbol's name.
+ * @param[in] symbolInfo is the symbol's information.
* @param[in] ritr is a iterator to the range information.
*/
virtual bool PutCoverageLine(
FILE* report,
unsigned int number,
- Coverage::DesiredSymbols::symbolSet_t::iterator ditr,
+ const std::string& symbolName,
+ const SymbolInformation& symbolInfo,
Coverage::CoverageRanges::ranges_t::iterator ritr
)=0;
@@ -363,13 +375,13 @@ class ReportsBase {
*
* @param[in] report identifies the size report file name
* @param[in] number identifies the line number.
- * @param[in] symbol is a pointer to the symbol information
+ * @param[in] symbolName is the symbol's name.
* @param[in] range is a iterator to the range information.
*/
virtual bool PutSizeLine(
FILE* report,
unsigned int number,
- Coverage::DesiredSymbols::symbolSet_t::iterator symbol,
+ const std::string& symbolName,
Coverage::CoverageRanges::ranges_t::iterator range
)=0;
@@ -378,20 +390,24 @@ class ReportsBase {
*
* @param[in] report identifies the report file name
* @param[in] number identifies the line number.
- * @param[in] symbol is a pointer to the symbol information
+ * @param[in] symbolName is the symbol's name.
+ * @param[in] symbolInfo is the symbol's information.
*/
virtual bool PutSymbolSummaryLine(
FILE* report,
unsigned int number,
- Coverage::DesiredSymbols::symbolSet_t::iterator symbol
+ const std::string& symbolName,
+ const SymbolInformation& symbolInfo
)=0;
};
/*!
* This method iterates over all report set types and generates
* all reports.
+ *
+ * @param[in] symbolSetName is the name of the symbol set to report on.
*/
-void GenerateReports();
+void GenerateReports(const std::string& symbolSetName);
}