Approximation of the worst-case execution time using structural analysis

We present a technique to approximate the worst-case execution time that combines structural analysis with a loop-bounding algorithm based on local induction variable analysis. Structural analysis is an attractive foundation for several reasons: it delivers better bounds on the number of executions for each basic block than previous approaches, its complexity is well understood, and it allows the compiler to easily work on Java bytecode without requiring access to the original program source. There are two major steps. We first compute (min, max) bounds on the number of iterations for each loop. Then we use precise structural information to propagate these bounds to the whole control-flow graph and compute a bound for each basic block. Such a fine-grained result eases the identification of infeasible paths and improves the approximation of the worst-case execution time of a function or method. This analysis was successfully implemented in an ahead-of-time Java bytecode to native compiler and produces input for a worst-case execution time estimator. We describe the effectiveness in reducing the worst-case execution time for a number of programs from small kernels and soft-real-time applications.

[1]  David B. Whalley,et al.  Bounding loop iterations for timing analysis , 1998, Proceedings. Fourth IEEE Real-Time Technology and Applications Symposium (Cat. No.98TB100245).

[2]  Stefan M. Petters Bounding the execution time of real-time tasks on modern processors , 2000, Proceedings Seventh International Conference on Real-Time Computing Systems and Applications.

[3]  Henrik Theiling,et al.  Combining abstract interpretation and ILP for microarchitecture modelling and program path analysis , 1998, Proceedings 19th IEEE Real-Time Systems Symposium (Cat. No.98CB36279).

[4]  Matteo Corti Instruction Duration Estimation by Partial Trace Evaluation , 2004 .

[5]  Laurie J. Hendren,et al.  Decompiling Java using staged encapsulation , 2001, Proceedings Eighth Working Conference on Reverse Engineering.

[6]  Jan Gustafsson Analyzing execution-time of object-oriented programs using abstract interpretation , 2000 .

[7]  Cristina Cifuentes,et al.  Reverse compilation techniques , 1994 .

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

[9]  David B. Whalley,et al.  A General Approach for Tight Timing Predictions of Non-Rectangular Loops , 1999 .

[10]  Micha Sharir,et al.  Structural Analysis: A New Approach to Flow Analysis in Optimizing Compilers , 2015 .

[11]  Steven S. Muchnick,et al.  Advanced Compiler Design and Implementation , 1997 .

[12]  Peter Altenbernd,et al.  On the false path problem in hard real-time programs , 1996, Proceedings of the Eighth Euromicro Workshop on Real-Time Systems.

[13]  Görel Hedin,et al.  An interactive environment for real-time software development , 2000, Proceedings 33rd International Conference on Technology of Object-Oriented Languages and Systems TOOLS 33.

[14]  David B. Whalley,et al.  Tighter timing predictions by automatic detection and exploitation of value-dependent constraints , 1999, Proceedings of the Fifth IEEE Real-Time Technology and Applications Symposium.

[15]  Jan Gustafsson,et al.  Automatic Derivation of Path and Loop Annotations in Object-Oriented Real-Time Programs , 1998, Scalable Comput. Pract. Exp..

[16]  David B. Whalley,et al.  Bounding Pipeline and Instruction Cache Performance , 1999, IEEE Trans. Computers.

[17]  Iain Bate,et al.  Java virtual-machine support for portable worst-case execution-time analysis , 2002, Proceedings Fifth IEEE International Symposium on Object-Oriented Real-Time Distributed Computing. ISIRC 2002.

[18]  Thomas Lundqvist,et al.  A WCET Analysis Method for Pipelined Microprocessors with Cache Memories , 2002 .

[19]  Thomas R. Gross,et al.  Approximation of Worst-Case Execution Time for Preemptive Multitasking Systems , 2000, LCTES.

[20]  Jan Gustafsson A prototype tool for flow analysis of object-oriented programs , 2002, Proceedings Fifth IEEE International Symposium on Object-Oriented Real-Time Distributed Computing. ISIRC 2002.