We present RETA (Relative Timing Analysis), a differential timing analysis technique to verify the impact of an update on the execution time of embedded software. Timing analysis is computationally expensive and labor intensive. Software updates render repeating the analysis from scratch a waste of resources and time, because their impact is inherently confined. To determine this boundary, in RETA we apply a slicing procedure that identifies all relevant code segments and a statement categorization that determines how to analyze each such line of code. We adapt a subset of RETA for integration into aiT, an industrial timing analysis tool, and also develop a complete implementation in a tool called DELTA. Based on staple benchmarks and realistic code updates from official repositories, we test the accuracy by analyzing the worst-case execution time (WCET) before and after an update, comparing the measures with the use of the unmodified aiT as well as real executions on embedded hardware. DELTA returns WCET information that ranges from exactly the WCET of real hardware to 148% of the new version's measured WCET. With the same benchmarks, the unmodified aiT estimates are 112% and 149% of the actual executions; therefore, even when DELTA is pessimistic, an industry-strength tool such as aiT cannot do better. Crucially, we also show that RETA decreases aiT's analysis time by 45% and its memory consumption by 8.9%, whereas removing RETA from DELTA, effectively rendering it a regular timing analysis tool, increases its analysis time by 27%.
翻译:我们提出RETA(相对时序分析),一种用于验证更新对嵌入式软件执行时间影响的差分时序分析技术。时序分析计算成本高昂且劳动密集。软件更新使得从头重复分析浪费资源与时间,因为其影响本质上是局部的。为确定这一边界,在RETA中我们应用了切片程序来识别所有相关代码段,以及语句分类来确定如何分析每行代码。我们将RETA子集适配集成到工业时序分析工具aiT中,并在名为DELTA的工具中开发了完整实现。基于标准基准测试和来自官方仓库的逼真代码更新,我们通过分析更新前后的最坏情况执行时间(WCET)来测试准确性,并将测量结果与使用未修改的aiT以及在嵌入式硬件上的实际执行进行对比。DELTA返回的WCET信息范围从实际硬件的精确WCET到新版本实测WCET的148%。使用相同基准测试,未修改的aiT估计值为实际执行的112%至149%;因此,即使DELTA结果悲观,像aiT这样的工业级工具也无法做得更好。关键的是,我们还证明RETA使aiT分析时间减少45%、内存消耗降低8.9%,而从DELTA中移除RETA(使其变为常规时序分析工具)则使其分析时间增加27%。