Static profiling of the worst-case in real-time programs

With the increasing performance demand in real-time systems it becomes more and more relevant to provide feedback to engineers and programmers, but also software development tools, on the performance-relevant code parts of a real-time program. So far, the information provided to programmers through tools was limited to an estimation of the worst-case execution time (WCET) and its associated worst-case execution path (WCEP). However, these metrics only provide partial information. Only those 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 an accurate view covering the entire code base, tools in the spirit of standard program profiling tools 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 real-time program is assigned a criticality value, expressing how critical the respective code is with respect to the global WCET. This gives an accurate view to programmers how close the worst execution path passing through a specific part of a real-time program 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 real-time programs.

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

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

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

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

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

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

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

[8]  Henrik Theiling,et al.  Fast and Precise WCET Prediction by Separated Cache and Path Analyses , 2000, Real-Time Systems.

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

[10]  Susan L. Graham,et al.  Gprof: A call graph execution profiler , 1982, SIGPLAN '82.

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

[12]  Sharad Malik,et al.  Performance Analysis of Embedded Software Using Implicit Path Enumeration , 1995, 32nd Design Automation Conference.

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

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

[15]  James R. Larus,et al.  Optimally profiling and tracing programs , 1992, POPL '92.