Criticality: static profiling for real-time programs

With the increasing performance demand in real-time systems it becomes more and more important to provide feedback to programmers and software development tools on the performance-relevant code parts of a real-time program. So far, this information was limited to an estimation of the worst-case execution time (WCET) and its associated worst-case execution path (WCEP) only. However, both, the WCET and the WCEP, only provide partial information. Only code parts that are on one of the WCEPs are indicated to the programmer. No information is provided for all other code parts. To give a comprehensive view covering the entire code base, tools in the spirit of program profiling are required.This work proposes an efficient approach to compute worst-case timing information for all code parts of a program using a complementary metric, called criticality. Every statement of a program is assigned a criticality value, expressing how critical the code is with respect to the global WCET. This gives valuable information how close the worst execution path passing through a specific program part is to the global WCEP. We formally define the criticality metric and investigate some of its properties with respect to dominance in control-flow graphs. Exploiting some of those properties, we propose an algorithm that reduces the overhead of computing the metric to cover complete programs. We also investigate ways to efficiently find only those code parts whose criticality is above a given threshold.Experiments using well-established real-time benchmark programs show an interesting distribution of the criticality values, revealing considerable amounts of highly critical as well as uncritical code. The metric thus provides ideal information to programmers and software development tools to optimize the worst-case execution time of these programs.

[1]  Niklas Holsti,et al.  USING A WORST-CASE EXECUTION TIME TOOL FOR REAL-TIME VERIFICATION OF THE DEBIE SOFTWARE , 2000 .

[2]  Robert E. Tarjan,et al.  Finding dominators revisited: extended abstract , 2004, SODA '04.

[3]  Hiralal Agrawal,et al.  Dominators, super blocks, and program coverage , 1994, POPL '94.

[4]  Alain Darte,et al.  Studying optimal spilling in the light of SSA , 2011, 2011 Proceedings of the 14th International Conference on Compilers, Architectures and Synthesis for Embedded Systems (CASES).

[5]  Pascal Sainrat,et al.  PapaBench: a Free Real-Time Benchmark , 2006, WCET.

[6]  Kent D. Wilken,et al.  Post register allocation spill code optimization , 2006, International Symposium on Code Generation and Optimization (CGO'06).

[7]  Gerard J. M. Smit,et al.  A mathematical approach towards hardware design , 2010, Dynamically Reconfigurable Architectures.

[8]  AbsInt Angewandte,et al.  Fast and Precise WCET Prediction by Separated Cache and Path Analyses , 1999 .

[9]  Alfred V. Aho,et al.  Compilers: Principles, Techniques, and Tools , 1986, Addison-Wesley series in computer science / World student series edition.

[10]  Jakob Engblom,et al.  Efficient longest executable path search for programs with complex flows and pipeline effects , 2001, CASES '01.

[11]  Jan Gustafsson,et al.  The Mälardalen WCET Benchmarks: Past, Present And Future , 2010, WCET.

[12]  Peter P. Puschner,et al.  Computing Maximum Task Execution Times — A Graph-Based Approach , 1997, Real-Time Systems.

[13]  Paul Lokuciejewski,et al.  Accelerating WCET-driven optimizations by the invariant path paradigm: a case study of loop unswitching , 2009, SCOPES.

[14]  Thomas Ball,et al.  Software Visualization in the Large , 1996, Computer.

[15]  Martin Salois,et al.  Visualization Techniques for Program Comprehension - A Literature Review , 2006, SoMeT.

[16]  Hanspeter Mössenböck,et al.  Optimized interval splitting in a linear scan register allocator , 2005, VEE '05.

[17]  Ronald L. Rivest,et al.  Introduction to Algorithms, third edition , 2009 .

[18]  James R. Larus,et al.  Optimally profiling and tracing programs , 1994, TOPL.

[19]  Robert E. Tarjan,et al.  A fast algorithm for finding dominators in a flowgraph , 1979, TOPL.

[20]  Ronald L. Rivest,et al.  Introduction to Algorithms , 1990 .

[21]  Alan Dain Samples,et al.  Profile-Driven Compilation , 1991 .

[22]  Daniel L. Dvorak,et al.  NASA Study on Flight Software Complexity , 2009 .

[23]  Florian Brandner,et al.  Static profiling of the worst-case in real-time programs , 2012, RTNS '12.

[24]  Sharad Malik,et al.  Performance analysis of embedded software using implicit path enumeration , 1997, IEEE Trans. Comput. Aided Des. Integr. Circuits Syst..

[25]  Daniel Hoffpauir Technical Excellence Initiative , 2015 .

[26]  Robert E. Tarjan,et al.  Depth-First Search and Linear Graph Algorithms , 1972, SIAM J. Comput..