change log for gcc-testing (2010-05-12)
rtems-vc at rtems.org
rtems-vc at rtems.org
Wed May 12 17:10:03 UTC 2010
*joel*:
2010-05-12 Joel Sherrill <joel.sherrilL at OARcorp.com>
* ReportsBase.cc, ReportsBase.h, ReportsHtml.cc, ReportsHtml.h,
ReportsText.cc, ReportsText.h: Add initial Symbol Summary report as
copy of Size report.
M 1.232 rtems-coverage/ChangeLog
M 1.6 rtems-coverage/ReportsBase.h
M 1.9 rtems-coverage/ReportsBase.cc
M 1.5 rtems-coverage/ReportsHtml.h
M 1.7 rtems-coverage/ReportsHtml.cc
M 1.4 rtems-coverage/ReportsText.h
M 1.5 rtems-coverage/ReportsText.cc
diff -u gcc-testing/rtems-coverage/ChangeLog:1.231 gcc-testing/rtems-coverage/ChangeLog:1.232
--- gcc-testing/rtems-coverage/ChangeLog:1.231 Wed May 12 10:47:13 2010
+++ gcc-testing/rtems-coverage/ChangeLog Wed May 12 11:14:15 2010
@@ -1,3 +1,9 @@
+2010-05-12 Joel Sherrill <joel.sherrilL at OARcorp.com>
+
+ * ReportsBase.cc, ReportsBase.h, ReportsHtml.cc, ReportsHtml.h,
+ ReportsText.cc, ReportsText.h: Add initial Symbol Summary report as
+ copy of Size report.
+
2010-05-12 Glenn Humphrey
* covoar_flow.doc: New file.
diff -u gcc-testing/rtems-coverage/ReportsBase.h:1.5 gcc-testing/rtems-coverage/ReportsBase.h:1.6
--- gcc-testing/rtems-coverage/ReportsBase.h:1.5 Tue May 11 16:21:25 2010
+++ gcc-testing/rtems-coverage/ReportsBase.h Wed May 12 11:14:16 2010
@@ -60,18 +60,28 @@
* This method produces a summary report that lists each uncovered
* range of bytes.
*
- * @param[in] fileName identifies the size report file name
+ * @param[in] fileName identifies the report file name
*/
void WriteSizeReport(
const char* const fileName
);
/*!
+ * This method produces a summary report that lists information on
+ * each symbol which did not achieve 100% coverage
+ *
+ * @param[in] fileName identifies the report file name
+ */
+ void WriteSymbolSummaryReport(
+ const char* const fileName
+ );
+
+ /*!
* This method returns the unique extension for the Report
* type. If the extension is ".txt" files will be
* named "annotated.txt", "branch.txt" ......
*
- * @param[in] fileName identifies the size report file name
+ * @param[in] fileName identifies the report file name
*/
std::string ReportExtension() { return reportExtension_m; }
@@ -94,30 +104,30 @@
std::string reportExtension_m;
/*!
- * This method Opens a report file and verifies that it opended
+ * This method Opens a report file and verifies that it opened
* correctly. Upon failure NULL is returned.
*
- * @param[in] fileName identifies the size report file name
+ * @param[in] fileName identifies the report file name
*/
virtual FILE* OpenFile(
const char* const fileName
);
/*!
- * This method d Opens a report file and verifies that it opended.
+ * This method opens a report file and verifies that it opened.
* Then appedns any necessary header information onto the file.
*
- * @param[in] fileName identifies the size report file name
+ * @param[in] fileName identifies the report file name
*/
virtual FILE* OpenAnnotatedFile(
const char* const fileName
);
/*!
- * This method d Opens a report file and verifies that it opended.
+ * This method opens a report file and verifies that it opened.
* Then appedns any necessary header information onto the file.
*
- * @param[in] fileName identifies the size report file name
+ * @param[in] fileName identifies the report file name
* @param[in] hasBranches indicates if there are branches to report
*/
virtual FILE* OpenBranchFile(
@@ -126,29 +136,39 @@
);
/*!
- * This method d Opens a report file and verifies that it opended.
+ * This method opens a report file and verifies that it opened.
* Then appedns any necessary header information onto the file.
*
- * @param[in] fileName identifies the size report file name
+ * @param[in] fileName identifies the report file name
*/
virtual FILE* OpenCoverageFile(
const char* const fileName
);
/*!
- * This method d Opens a report file and verifies that it opended.
+ * This method opens a report file and verifies that it opened.
* Then appedns any necessary header information onto the file.
*
- * @param[in] fileName identifies the size report file name
+ * @param[in] fileName identifies the report file name
*/
virtual FILE* OpenSizeFile(
const char* const fileName
);
/*!
+ * This method opens a report file and verifies that it opened.
+ * Then appedns any necessary header information onto the file.
+ *
+ * @param[in] fileName identifies the report file name
+ */
+ virtual FILE* OpenSymbolSummaryFile(
+ const char* const fileName
+ );
+
+ /*!
* This method Closes a report file.
*
- * @param[in] fileName identifies the size report file name
+ * @param[in] fileName identifies the report file name
*/
void CloseFile(
FILE* aFile
@@ -158,7 +178,7 @@
* This method puts any necessary footer information into
* the report then closes the file.
*
- * @param[in] fileName identifies the size report file name
+ * @param[in] fileName identifies the report file name
*/
virtual void CloseAnnotatedFile(
FILE* aFile
@@ -168,7 +188,7 @@
* This method puts any necessary footer information into
* the report then closes the file.
*
- * @param[in] fileName identifies the size report file name
+ * @param[in] fileName identifies the report file name
* @param[in] hasBranches indicates if there are branches to report
*/
virtual void CloseBranchFile(
@@ -180,7 +200,7 @@
* This method puts any necessary footer information into
* the report then closes the file.
*
- * @param[in] fileName identifies the size report file name
+ * @param[in] fileName identifies the report file name
*/
virtual void CloseCoverageFile(
FILE* aFile
@@ -190,7 +210,7 @@
* This method puts any necessary footer information into
* the report then closes the file.
*
- * @param[in] fileName identifies the size report file name
+ * @param[in] fileName identifies the report file name
*/
virtual void CloseSizeFile(
FILE* aFile
@@ -200,7 +220,17 @@
* This method puts any necessary footer information into
* the report then closes the file.
*
- * @param[in] fileName identifies the size report file name
+ * @param[in] fileName identifies the report file name
+ */
+ virtual void CloseSymbolSummaryFile(
+ FILE* aFile
+ );
+
+ /*!
+ * This method puts any necessary footer information into
+ * the report then closes the file.
+ *
+ * @param[in] fileName identifies the report file name
*/
virtual void PutAnnotatedLine(
FILE* aFile,
@@ -213,7 +243,7 @@
* This method puts any necessary footer information into
* the report then closes the file.
*
- * @param[in] fileName identifies the size report file name
+ * @param[in] fileName identifies the report file name
*/
virtual bool PutNoBranchInfo(
FILE* report
@@ -222,7 +252,7 @@
/*!
* This method puts a branch entry into the branch report.
*
- * @param[in] fileName identifies the size report file name
+ * @param[in] fileName identifies the report file name
*/
virtual bool PutBranchEntry(
FILE* report,
@@ -235,7 +265,7 @@
* This method reports when no range is available for
* a symbol in the coverage report.
*
- * @param[in] fileName identifies the size report file name
+ * @param[in] fileName identifies the report file name
*/
virtual void putCoverageNoRange(
FILE* report,
@@ -246,7 +276,7 @@
/*!
* This method puts a line in the coverage report.
*
- * @param[in] fileName identifies the size report file name
+ * @param[in] fileName identifies the report file name
*/
virtual bool PutCoverageLine(
FILE* report,
@@ -266,6 +296,18 @@
Coverage::DesiredSymbols::symbolSet_t::iterator symbol,
Coverage::CoverageRanges::ranges_t::iterator range
)=0;
+
+ /*!
+ * This method method puts a line into the symbol summary report.
+ *
+ * @param[in] fileName identifies the report file name
+ */
+ virtual bool PutSymbolSummaryLine(
+ FILE* report,
+ unsigned int number,
+ Coverage::DesiredSymbols::symbolSet_t::iterator symbol,
+ Coverage::CoverageRanges::ranges_t::iterator range
+ )=0;
};
void GenerateReports();
diff -u gcc-testing/rtems-coverage/ReportsBase.cc:1.8 gcc-testing/rtems-coverage/ReportsBase.cc:1.9
--- gcc-testing/rtems-coverage/ReportsBase.cc:1.8 Tue May 11 16:21:25 2010
+++ gcc-testing/rtems-coverage/ReportsBase.cc Wed May 12 11:14:15 2010
@@ -29,7 +29,6 @@
{
}
-
FILE* ReportsBase::OpenFile(
const char* const fileName
)
@@ -86,6 +85,12 @@
return OpenFile(fileName);
}
+FILE* ReportsBase::OpenSymbolSummaryFile(
+ const char* const fileName
+)
+{
+ return OpenFile(fileName);
+}
void ReportsBase::CloseFile(
FILE* aFile
@@ -123,6 +128,12 @@
CloseFile( aFile );
}
+void ReportsBase::CloseSymbolSummaryFile(
+ FILE* aFile
+)
+{
+ CloseFile( aFile );
+}
/*
* Write annotated report
@@ -350,6 +361,44 @@
CloseSizeFile( report );
}
+void ReportsBase::WriteSymbolSummaryReport(
+ const char* const fileName
+)
+{
+ Coverage::DesiredSymbols::symbolSet_t::iterator ditr;
+ FILE* report;
+ Coverage::CoverageRanges::ranges_t::iterator ritr;
+ Coverage::CoverageRanges* theRanges;
+ unsigned int count;
+
+ // Open the report file.
+ report = OpenSymbolSummaryFile( fileName );
+ if ( !report ) {
+ return;
+ }
+
+ // Process uncovered ranges for each symbol.
+ count = 0;
+ for (ditr = SymbolsToAnalyze->set.begin();
+ ditr != SymbolsToAnalyze->set.end();
+ ditr++) {
+
+ theRanges = ditr->second.uncoveredRanges;
+
+ if (theRanges && !theRanges->set.empty()) {
+
+ for (ritr = theRanges->set.begin() ;
+ ritr != theRanges->set.end() ;
+ ritr++ ) {
+ PutSymbolSummaryLine( report, count, ditr, ritr );
+ count++;
+ }
+ }
+ }
+
+ CloseSymbolSummaryFile( report );
+}
+
void GenerateReports()
{
typedef std::list<ReportsBase *> reportList_t;
@@ -379,6 +428,8 @@
reportName = "sizes" + reports->ReportExtension();
reports->WriteSizeReport(reportName.c_str() );
+ reportName = "symbolSummary" + reports->ReportExtension();
+ reports->WriteSizeReport(reportName.c_str() );
}
for (ritr = reportList.begin(); ritr != reportList.end(); ritr++ ) {
diff -u gcc-testing/rtems-coverage/ReportsHtml.h:1.4 gcc-testing/rtems-coverage/ReportsHtml.h:1.5
--- gcc-testing/rtems-coverage/ReportsHtml.h:1.4 Wed May 12 09:04:48 2010
+++ gcc-testing/rtems-coverage/ReportsHtml.h Wed May 12 11:14:16 2010
@@ -72,6 +72,10 @@
const char* const fileName
);
+ virtual FILE* OpenSymbolSummaryFile(
+ const char* const fileName
+ );
+
virtual void CloseAnnotatedFile(
FILE* aFile
);
@@ -89,6 +93,10 @@
FILE* aFile
);
+ virtual void CloseSymbolSummaryFile(
+ FILE* aFile
+ );
+
virtual void PutAnnotatedLine(
FILE* aFile,
AnnotatedLineState_t state,
@@ -127,6 +135,13 @@
Coverage::CoverageRanges::ranges_t::iterator range
);
+ virtual bool PutSymbolSummaryLine(
+ FILE* report,
+ unsigned int number,
+ Coverage::DesiredSymbols::symbolSet_t::iterator symbol,
+ Coverage::CoverageRanges::ranges_t::iterator range
+ );
+
virtual FILE* OpenFile(
const char* const fileName
);
diff -u gcc-testing/rtems-coverage/ReportsHtml.cc:1.6 gcc-testing/rtems-coverage/ReportsHtml.cc:1.7
--- gcc-testing/rtems-coverage/ReportsHtml.cc:1.6 Wed May 12 09:12:36 2010
+++ gcc-testing/rtems-coverage/ReportsHtml.cc Wed May 12 11:14:16 2010
@@ -141,6 +141,29 @@
return aFile;
}
+ FILE* ReportsHtml::OpenSymbolSummaryFile(
+ const char* const fileName
+ )
+ {
+ FILE *aFile;
+
+ // Open the file
+ aFile = OpenFile(fileName);
+
+ // Put header information into the file
+ fprintf(
+ aFile,
+ "<table class=\"covoar-table\">\n"
+ "<tbody class=\"covoar-tbody\">\n"
+ "<tr class=\"covoar-tr covoar-tr-first\">\n"
+ "<th class=\"covoar-th\">Size</th>\n"
+ "<th class=\"covoar-th\">Symbol</th>\n"
+ "<th class=\"covoar-th\">File</th>\n"
+ "</tr>\n"
+ );
+ return aFile;
+ }
+
void ReportsHtml::PutAnnotatedLine(
FILE* aFile,
AnnotatedLineState_t state,
@@ -521,6 +544,44 @@
return true;
}
+ bool ReportsHtml::PutSymbolSummaryLine(
+ FILE* report,
+ unsigned int count,
+ Coverage::DesiredSymbols::symbolSet_t::iterator symbol,
+ Coverage::CoverageRanges::ranges_t::iterator range
+ )
+ {
+ // Mark the background color different for odd and even lines.
+ fprintf( report, "</tr>\n");
+ if ( ( count%2 ) == 0 )
+ fprintf( report, "<tr class=\"covoar-tr covoar-tr-even\">\n");
+ else
+ fprintf( report, "<tr class=\"covoar-tr covoar-tr-odd\">\n");
+
+ // size
+ fprintf(
+ report,
+ "<td class=\"covoar-td\" align=\"center\">%d</td>\n",
+ range->highAddress - range->lowAddress + 1
+ );
+
+ // symbol
+ fprintf(
+ report,
+ "<td class=\"covoar-td\" align=\"center\">%s</td>\n",
+ symbol->first.c_str()
+ );
+
+ // file
+ fprintf(
+ report,
+ "<td class=\"covoar-td\" align=\"center\">%s</td>\n",
+ range->lowSourceLine.c_str()
+ );
+
+ return true;
+ }
+
void ReportsHtml::CloseAnnotatedFile(
FILE* aFile
)
@@ -580,6 +641,18 @@
fprintf( aFile, "</tbody>\n" );
fprintf( aFile, "</table>\n" );
fprintf( aFile, "</pre>\n" );
+ fprintf( aFile,"</body>\n");
+ fprintf( aFile,"</html>");
+
+ CloseFile( aFile );
+ }
+
+ void ReportsHtml::CloseSymbolSummaryFile(
+ FILE* aFile
+ )
+ {
+ fprintf( aFile, "</tbody>\n" );
+ fprintf( aFile, "</table>\n" );
fprintf( aFile, "</pre>\n" );
fprintf( aFile,"</body>\n");
fprintf( aFile,"</html>");
diff -u gcc-testing/rtems-coverage/ReportsText.h:1.3 gcc-testing/rtems-coverage/ReportsText.h:1.4
--- gcc-testing/rtems-coverage/ReportsText.h:1.3 Mon May 10 13:10:16 2010
+++ gcc-testing/rtems-coverage/ReportsText.h Wed May 12 11:14:16 2010
@@ -94,7 +94,12 @@
Coverage::CoverageRanges::ranges_t::iterator range
);
-
+ virtual bool PutSymbolSummaryLine(
+ FILE* report,
+ unsigned int number,
+ Coverage::DesiredSymbols::symbolSet_t::iterator symbol,
+ Coverage::CoverageRanges::ranges_t::iterator range
+ );
};
diff -u gcc-testing/rtems-coverage/ReportsText.cc:1.4 gcc-testing/rtems-coverage/ReportsText.cc:1.5
--- gcc-testing/rtems-coverage/ReportsText.cc:1.4 Tue May 11 16:21:25 2010
+++ gcc-testing/rtems-coverage/ReportsText.cc Wed May 12 11:14:16 2010
@@ -205,6 +205,21 @@
return true;
}
-
+bool ReportsText::PutSymbolSummaryLine(
+ FILE* report,
+ unsigned int number,
+ Coverage::DesiredSymbols::symbolSet_t::iterator symbol,
+ Coverage::CoverageRanges::ranges_t::iterator range
+)
+{
+ fprintf(
+ report,
+ "%d\t%s\t%s\n",
+ range->highAddress - range->lowAddress + 1,
+ symbol->first.c_str(),
+ range->lowSourceLine.c_str()
+ );
+ return true;
+}
}
*joel*:
2010-05-12 Joel Sherrill <joel.sherrilL at OARcorp.com>
* ReportsBase.cc, ReportsBase.h, ReportsHtml.cc, ReportsHtml.h: Add
index file to reports written.
M 1.233 rtems-coverage/ChangeLog
M 1.7 rtems-coverage/ReportsBase.h
M 1.10 rtems-coverage/ReportsBase.cc
M 1.6 rtems-coverage/ReportsHtml.h
M 1.8 rtems-coverage/ReportsHtml.cc
diff -u gcc-testing/rtems-coverage/ChangeLog:1.232 gcc-testing/rtems-coverage/ChangeLog:1.233
--- gcc-testing/rtems-coverage/ChangeLog:1.232 Wed May 12 11:14:15 2010
+++ gcc-testing/rtems-coverage/ChangeLog Wed May 12 11:39:01 2010
@@ -1,5 +1,10 @@
2010-05-12 Joel Sherrill <joel.sherrilL at OARcorp.com>
+ * ReportsBase.cc, ReportsBase.h, ReportsHtml.cc, ReportsHtml.h: Add
+ index file to reports written.
+
+2010-05-12 Joel Sherrill <joel.sherrilL at OARcorp.com>
+
* ReportsBase.cc, ReportsBase.h, ReportsHtml.cc, ReportsHtml.h,
ReportsText.cc, ReportsText.h: Add initial Symbol Summary report as
copy of Size report.
diff -u gcc-testing/rtems-coverage/ReportsBase.h:1.6 gcc-testing/rtems-coverage/ReportsBase.h:1.7
--- gcc-testing/rtems-coverage/ReportsBase.h:1.6 Wed May 12 11:14:16 2010
+++ gcc-testing/rtems-coverage/ReportsBase.h Wed May 12 11:39:01 2010
@@ -27,6 +27,15 @@
~ReportsBase();
/*!
+ * This method produces an index of the reports generated.
+ *
+ * @param[in] fileName identifies the report file name
+ */
+ virtual void WriteIndex(
+ const char* const fileName
+ );
+
+ /*!
* This method produces an annotated assembly listing report containing
* the disassembly of each symbol that was not completely covered.
*
diff -u gcc-testing/rtems-coverage/ReportsBase.cc:1.9 gcc-testing/rtems-coverage/ReportsBase.cc:1.10
--- gcc-testing/rtems-coverage/ReportsBase.cc:1.9 Wed May 12 11:14:15 2010
+++ gcc-testing/rtems-coverage/ReportsBase.cc Wed May 12 11:39:01 2010
@@ -56,6 +56,12 @@
return aFile;
}
+void ReportsBase::WriteIndex(
+ const char* const fileName
+)
+{
+}
+
FILE* ReportsBase::OpenAnnotatedFile(
const char* const fileName
)
@@ -416,6 +422,9 @@
for (ritr = reportList.begin(); ritr != reportList.end(); ritr++ ) {
reports = *ritr;
+ reportName = "index" + reports->ReportExtension();
+ reports->WriteIndex( reportName.c_str() );
+
reportName = "annotated" + reports->ReportExtension();
reports->WriteAnnotatedReport( reportName.c_str() );
diff -u gcc-testing/rtems-coverage/ReportsHtml.h:1.5 gcc-testing/rtems-coverage/ReportsHtml.h:1.6
--- gcc-testing/rtems-coverage/ReportsHtml.h:1.5 Wed May 12 11:14:16 2010
+++ gcc-testing/rtems-coverage/ReportsHtml.h Wed May 12 11:39:01 2010
@@ -25,35 +25,44 @@
ReportsHtml();
~ReportsHtml();
- /*!
- * This method produces a report that contains information about each
- * uncovered branch statement.
- *
- * @param[in] fileName identifies the branch report file name
- */
- void WriteBranchReport(
- const char* const fileName
- );
-
- /*!
- * This method produces a report that contains information about each
- * uncovered range of bytes.
- *
- * @param[in] fileName identifies the coverage report file name
- */
- void WriteCoverageReport(
- const char* const fileName
- );
-
- /*!
- * This method produces a summary report that lists each uncovered
- * range of bytes.
- *
- * @param[in] fileName identifies the size report file name
- */
- void WriteSizeReport(
- const char* const fileName
- );
+ /*!
+ * This method produces an index file.
+ *
+ * @param[in] fileName identifies the file name.
+ */
+ void WriteIndex(
+ const char* const fileName
+ );
+
+ /*!
+ * This method produces a report that contains information about each
+ * uncovered branch statement.
+ *
+ * @param[in] fileName identifies the branch report file name
+ */
+ void WriteBranchReport(
+ const char* const fileName
+ );
+
+ /*!
+ * This method produces a report that contains information about each
+ * uncovered range of bytes.
+ *
+ * @param[in] fileName identifies the coverage report file name
+ */
+ void WriteCoverageReport(
+ const char* const fileName
+ );
+
+ /*!
+ * This method produces a summary report that lists each uncovered
+ * range of bytes.
+ *
+ * @param[in] fileName identifies the size report file name
+ */
+ void WriteSizeReport(
+ const char* const fileName
+ );
protected:
diff -u gcc-testing/rtems-coverage/ReportsHtml.cc:1.7 gcc-testing/rtems-coverage/ReportsHtml.cc:1.8
--- gcc-testing/rtems-coverage/ReportsHtml.cc:1.7 Wed May 12 11:14:16 2010
+++ gcc-testing/rtems-coverage/ReportsHtml.cc Wed May 12 11:39:01 2010
@@ -24,6 +24,46 @@
{
}
+ void ReportsHtml::WriteIndex(
+ const char* const fileName
+ )
+ {
+ #define PRINT_ITEM( _t, _n ) \
+ fprintf( \
+ aFile, \
+ "<li>%s (<a href=\"%s.html\">html</a> or "\
+ "<a href=\"%s.txt\">text</a>)</li>", \
+ _t, _n, _n );
+ #define PRINT_TEXT_ITEM( _t, _n ) \
+ fprintf( \
+ aFile, \
+ "<li>%s (<a href=\"%s\">text</a>)", \
+ _t, _n );
+
+ FILE* aFile;
+
+ // Open the file
+ aFile = OpenFile( fileName );
+
+ fprintf( aFile, "<strong>Reports Available</string>\n" );
+ fprintf( aFile, "<ul>\n" );
+
+ PRINT_ITEM( "Coverage Report", "uncovered" );
+ PRINT_ITEM( "Branch Report", "branch" );
+ PRINT_ITEM( "Annotated Assembly", "annotated" );
+ PRINT_ITEM( "Symbol Summary", "symbolSummary" );
+ PRINT_ITEM( "Size Report", "sizes" );
+
+ PRINT_TEXT_ITEM( "Explanations Not Found", "ExplanationsNotFound.txt" );
+
+ fprintf( aFile, "</li>\n" );
+
+ CloseFile( aFile );
+
+ #undef PRINT_ITEM
+ #undef PRINT_TEXT_ITEM
+ }
+
FILE* ReportsHtml::OpenFile(
const char* const fileName
)
@@ -44,7 +84,6 @@
"<pre class=\"code\">\n"
);
-
return aFile;
}
--
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/20100512/c2c266c4/attachment.html>
More information about the vc
mailing list