Anirban Saha, Raju Udava, M. Bidari, Mahadeva Prasad, V. Raju, T. Vrind
{"title":"TraFic — A Systematic Low Overhead Code Coverage Tool for Embedded Systems","authors":"Anirban Saha, Raju Udava, M. Bidari, Mahadeva Prasad, V. Raju, T. Vrind","doi":"10.1109/CONECCT52877.2021.9622532","DOIUrl":null,"url":null,"abstract":"For successful embedded real-time products and applications, we need to attain higher software quality in terms of accuracy and consistency of code implemented. Code coverage is one such important aspect where every line of code is exercised and verified for the intended scenarios. It is a measure used to describe the degree to which the source code of a program is executed. There are tools like ‘Gcov’ which instrument the source code to identify the code coverage for executed test cases and scenarios. As they are designed to support generic platforms, they affect system performance in terms of processing and memory overhead. These tools can only be applied before final production or avoided altogether due to system integration and engineering efforts. This paper presents an optimized and novel tool for code coverage, called ‘TraFic’ which stands for Trace, Function, and Logical coverage. It is proposed to be adopted by memory-constrained embedded devices to achieve code coverage and can be extended to production releases as well. The proposed novel techniques in ‘TraFic’ use system debug log traces and existing target platform compiler options to instrument code, thereby decreasing instrumentation mechanism complexity and reducing memory requirements and performance overhead, making it ideal for embedded systems. Also, by applying TraFic in production releases, the code coverage can be obtained from commercial products to capture real-world scenarios, aid system failure analysis and release firmware upgrades. Through our implementation of TraFic on Little Kernel for an ARM Cortex-R processor running an open-source TCP/IP Software, we show that the performance overhead can be as low as 4% and memory overhead is equally low around 4%; while providing a coverage target of around 88%. In comparison, available commercial tools, induce a much higher overhead of ∼56% in performance and ∼50% overhead in-memory with a coverage target of 100%, thereby making it unfit for inclusion in a production release.","PeriodicalId":164499,"journal":{"name":"2021 IEEE International Conference on Electronics, Computing and Communication Technologies (CONECCT)","volume":"35 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2021-07-09","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"1","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"2021 IEEE International Conference on Electronics, Computing and Communication Technologies (CONECCT)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/CONECCT52877.2021.9622532","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 1
Abstract
For successful embedded real-time products and applications, we need to attain higher software quality in terms of accuracy and consistency of code implemented. Code coverage is one such important aspect where every line of code is exercised and verified for the intended scenarios. It is a measure used to describe the degree to which the source code of a program is executed. There are tools like ‘Gcov’ which instrument the source code to identify the code coverage for executed test cases and scenarios. As they are designed to support generic platforms, they affect system performance in terms of processing and memory overhead. These tools can only be applied before final production or avoided altogether due to system integration and engineering efforts. This paper presents an optimized and novel tool for code coverage, called ‘TraFic’ which stands for Trace, Function, and Logical coverage. It is proposed to be adopted by memory-constrained embedded devices to achieve code coverage and can be extended to production releases as well. The proposed novel techniques in ‘TraFic’ use system debug log traces and existing target platform compiler options to instrument code, thereby decreasing instrumentation mechanism complexity and reducing memory requirements and performance overhead, making it ideal for embedded systems. Also, by applying TraFic in production releases, the code coverage can be obtained from commercial products to capture real-world scenarios, aid system failure analysis and release firmware upgrades. Through our implementation of TraFic on Little Kernel for an ARM Cortex-R processor running an open-source TCP/IP Software, we show that the performance overhead can be as low as 4% and memory overhead is equally low around 4%; while providing a coverage target of around 88%. In comparison, available commercial tools, induce a much higher overhead of ∼56% in performance and ∼50% overhead in-memory with a coverage target of 100%, thereby making it unfit for inclusion in a production release.