Criticality: static profiling for real-time programs
- 279 Downloads
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.
KeywordsCriticality Worst-case execution time Program profiling
We thank Wolfgang Puffitsch for insightful discussions leading up to this work.
- Agrawal H (1994) Dominators, super blocks, and program coverage. In: Proc. of the symposium on principles of programming languages. ACM, New York, pp 25–34 Google Scholar
- Aho AV, Lam MS, Sethi R, Ullman JD (2006) Compilers: principles, techniques, and tools, 2nd edn. Addison-Wesley, Reading Google Scholar
- Dvorak DL (2009) NASA study on flight software complexity. Technical excellence initiative. NASA Office of Chief Engineer Google Scholar
- Georgiadis L, Tarjan RE (2004) Finding dominators revisited: extended abstract. In: Proceedings of the symposium on discrete algorithms, SODA ’04. Society for Industrial and Applied Mathematics, Philadelphia, pp 869–878 Google Scholar
- Graham SL, Kessler PB, Mckusick MK (1982) Gprof: a call graph execution profiler. In: Proc. of the symposium on compiler construction, CC ’82. ACM, New York, pp 120–126 Google Scholar
- Gustafsson J, Betts A, Ermedahl A, Lisper B (2010) The Mälardalen WCET benchmarks—past, present and future. In: Proc. of the workshop on worst-case execution time analysis, OCG, pp 137–147 Google Scholar
- Holsti N, Långbacka T, Saarinen S (2000) Using a worst-case execution-time tool for real-time verification of the DEBIE software. In: Proc. of the Data Systems in Aerospace Conference, ESA, p 307 Google Scholar
- Lemieux F, Salois M (2006) Visualization techniques for program comprehension a literature review. In: Proc. of the conference on new trends in software methodologies, tools and techniques (SoMeT ’06). IOS Press, Amsterdam, pp 22–47 Google Scholar
- Li YTS, Malik S (1995) Performance analysis of embedded software using implicit path enumeration. In: Proc. of the design automation conference, DAC ’95. ACM, New York, pp 456–461 Google Scholar
- Nemer F, Cassé H, Sainrat P, Bahsoun JP, Michiel MD (2006) Papabench: A free real-time benchmark. In: Proc. of the Workshop on Worst-Case Execution Time Analysis, OCG, pp 63–68 Google Scholar
- Samples AD (1991) Profile-driven compilation. PhD thesis, University of California at Berkeley Google Scholar