Skip to main content
Log in

A retargetable technique for predicting execution time of code segments

  • Published:
Real-Time Systems Aims and scope Submit manuscript

Abstract

Predicting the execution times of straight-line code sequences is a fundamental problem in the design and evaluation of hard real-time systems. The reliability of system-level timings and schedulability analysis rests on the accuracy of execution time predictions for the basic schedulable units of work. Obtaining such predictions for contemporary microprocessors is difficult. This paper presents a new technique called micro-analysis for predicting point-to-point execution times on code segments. It uses machine-description rules, similar to those that have proven useful for code generation and peephole optimization, to translate compiled object code into a sequence of very low-level (micro) instructions. The stream of micro-instructions is then analyzed for timing, via a three-level pattern matching scheme. At this low level, the effect of advanced features such as instruction caching and overlap can be taken into account. This technique is compiler and language-independent, and retargetable. This paper also describes a prototype system in which the micro-analysis technique is integrated with an existing C compiler. This system predicts the bounded execution time of statement ranges or simple (non-nested) C functions at compile time.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  • N. Altman and N. Weiderman. Timing variation in dual loop benchmarks. Technical Report CMU/SEI-87-TR-22, Software Engineering Institute, Carnegie Mellon University, Pittsburgh, PA, 1987.

    Google Scholar 

  • C. N. Arnold. Using the ETA system multiprocessing simulator to prepare for the ETA10.I/O, 4(1):9–12, 1987.

    Google Scholar 

  • T. B. Baker. A single-pass syntax-directed front end for Ada. InProceeding of the SIGPLAN'82 Symposium on Compiler Construction, pp. 318–326, Boston, MA, 1982.

  • M. E. Benitez and J. W. Davidson. A portable global optimizer and linker. InProceedings of the SIGPLAN Notices '88 Symposium on Programming Language Design and Implementation, pp. 329–338, Atlanta, GA, 1988.

  • R. M. Clapp, L. Duchesneau, R. A. Volz, T. N. Mudge, and T. Schultze. Toward real-time performance benchmarks for Ada.Communications of the ACM, 29(8):760–778, 1986.

    Google Scholar 

  • J. W. Davidson and C. W. Fraser. Automatic generation of peephole optimization. InProceedings of the SIGPLAN'84 Symposium on Compiler Construction, pp. 111–116, Montreal, Canada, 1984a.

  • J. W. Davidson and C. W. Fraser. Code selection through object code optimization.Transactions on Programming Languages and Systems, 6(4):7–32, 1984b.

    Google Scholar 

  • J. W. Davidson. A retargetable instruction reorganizer. InProceedings of the SIGPLAN NOTICES '86 Symposium on Compiler Construction, pp. 234–251, Palo Alto, CA, 1986.

  • J. W. Davidson and D. B. Whalley. A design environment for addressing architecture and compiler interactions.Microprocessors and Microsystems, 15(9):459–472, 1991.

    Google Scholar 

  • A. Hook, G. A. Riccardi, and M. Vilot. Ada compiler performance benchmark. InAda: Managing the Transition, Proceedings of the Ada-Europe International Conference, pp. 33–42, Edingurgh, Scotland, 1986.

  • Intel Corporation.80386 Programmer's Reference Manual. Intel Corporation, 1988.

  • C. L. Liu and J. W. Layland. Scheduling algorithms for multiprogramming in a hard real-time environment.Journal of the Association for Computing Machinery, 20(1):46–61, 1973.

    Google Scholar 

  • P. McKerrow.Performance Measurement of Computer Systems. Addison-Wesley, 1988.

  • A. K. Mok. SARTOR—A design environment for real-time systems. InProceeding of the 9th IEEE COMPSAC, pp. 174–181, 1985.

  • A. K. Mok. The design of real-time programming systems based on process models. InProceedings of the 1984 IEEE Real-Time Systems Symposium, pp. 5–17, Austin, TX, 1984.

  • A. K. Mok. Evaluating tight execution time bounds of programs by annotations. InSixth IEEE Workshop on Real-Time Operating Systems and Software, pp. 74–80, Pittsburgh, PA, 1989.

  • Motorola.MC68020 32-Bit Microprocessor User's Manual second edition. Prentice-Hall, 1985.

  • D. Niehaus. Program representation and translation for predictable real-time systems. InProceedings of the IEEE Real-Time Systems Symposium, pp. 53–63, San Antonio, TX, 1991.

  • D. I. Oh. A table driven retargetable disassembler generator. Master's Project, Department of Computer Science, Florida State University, Tallahassee, FL, 1989.

    Google Scholar 

  • C. Y. Park. Predicting program execution times by analyzing static and dynamic program paths.Real-Time Systems, 5(1):31–61, 1993.

    Google Scholar 

  • C. Y. Park and A. C. Shaw. A source-level tool for predicting deterministic execution times of programs. Technical Report 89-09-12, Department of Computer Science and Engineering, University of Washington, Seattle, WA, 1989.

    Google Scholar 

  • C. Y. Park and A. C. Shaw. Experiments with a program timing tool based on source-level timing schema.Computer, 24(5):48–57, 1991.

    Google Scholar 

  • P. Puschner and C. H. Koza. Calculating the maximum execution time of real-time programs.Real-Time Systems, 1(2):159–176, 1989.

    Google Scholar 

  • D. Roy. PIWG measurement methodology.ACM Ada Letters Special Edition, 10(3):72–90, Winter 1990.

    Google Scholar 

  • A. C. Shaw. Reasoning about time in high-level language software. Research Report, Laboratoire MASI, University of Paris 6, 1987.

  • A. D. Stoyenko. A real-time language with a schedulability analyzer. Ph.D. Thesis, Department of Computer Science, University of Toronto, Toronto, Canada, 1987.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

About this article

Cite this article

Harmon, M.G., Baker, T.P. & Whalley, D.B. A retargetable technique for predicting execution time of code segments. Real-Time Syst 7, 159–182 (1994). https://doi.org/10.1007/BF01088803

Download citation

  • Issue Date:

  • DOI: https://doi.org/10.1007/BF01088803

Keywords

Navigation