TraFic — A Systematic Low Overhead Code Coverage Tool for Embedded Systems

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.
一个用于嵌入式系统的系统低开销代码覆盖工具
对于成功的嵌入式实时产品和应用,我们需要在实现代码的准确性和一致性方面达到更高的软件质量。代码覆盖就是这样一个重要的方面,其中每一行代码都是针对预期的场景执行和验证的。它是一种用来描述程序源代码执行程度的度量。有像“Gcov”这样的工具,它对源代码进行检测,以确定已执行的测试用例和场景的代码覆盖率。由于它们是为支持通用平台而设计的,因此就处理和内存开销而言,它们会影响系统性能。这些工具只能在最终生产之前使用,或者由于系统集成和工程努力而完全避免使用。本文提出了一种优化的、新颖的代码覆盖工具,称为“traffic”,它代表跟踪、功能和逻辑覆盖。建议内存受限的嵌入式设备采用它来实现代码覆盖,并且也可以扩展到生产版本。“traffic”中提出的新技术使用系统调试日志跟踪和现有目标平台编译器选项来检测代码,从而降低了检测机制的复杂性,降低了内存需求和性能开销,使其成为嵌入式系统的理想选择。同样,通过在生产版本中应用traffic,可以从商业产品中获得代码覆盖率,以捕获真实世界的场景,帮助系统故障分析并发布固件升级。通过我们在运行开源TCP/IP软件的ARM Cortex-R处理器上的Little Kernel上实现流量,我们发现性能开销可以低至4%,内存开销同样低至4%左右;同时提供约88%的覆盖率目标。相比之下,可用的商业工具会导致更高的性能开销(~ 56%)和内存开销(~ 50%),而覆盖率目标为100%,因此不适合包含在生产版本中。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信