skip to main content
10.1145/2038698.2038722acmconferencesArticle/Chapter ViewAbstractPublication PagesesweekConference Proceedingsconference-collections
research-article

WCET-driven cache-aware code positioning

Published:09 October 2011Publication History

ABSTRACT

Code positioning is a well-known compiler optimization aiming at the improvement of the instruction cache behavior. A contiguous mapping of code fragments in memory avoids overlapping of cache sets and thus decreases the number of cache conflict misses.

We present a novel cache-aware code positioning optimization driven by worst-case execution time (WCET) information. For this purpose, we introduce a formal cache model based on a conflict graph which is able to capture a broad class of cache architectures. This cache model is combined with a formal WCET timing model, resulting in a cache conflict graph weighted with WCET data. This conflict graph is then exploited by heuristics for code positioning of both basic blocks and entire functions.

Code positioning is able to decrease the accumulated cache misses for a total of 18 real-life benchmarks by 15.5% on average for an automotive processor featuring a 2-way set-associative cache. These cache miss reductions translate to average WCET reductions by 6.1%. For direct-mapped caches, even larger savings of 18.8% (cache misses) and 9.0% (WCET) were achieved.

References

  1. AbsInt Angewandte Informatik GmbH. aiT: Worst-Case Execution Time Analyzers. http://www.absint.com/ait, July 2011.Google ScholarGoogle Scholar
  2. H. Falk and J. C. Kleinsorge. Optimal Static WCET-aware Scratchpad Allocation of Program Code. In Proceedings of DAC, July 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. H. Falk and P. Lokuciejewski. A compiler framework for the reduction of worst-case execution times. Real-Time Systems, 46(2), Oct. 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. H. Falk, S. Plazar, and H. Theiling. Compile-Time Decided Instruction Cache Locking Using Worst-Case Execution Paths. In Proceedings of CODES+ISSS, Oct. 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. C. Ferdinand, F. Martin, and R. Wilhelm. Applying Compiler Techniques to Cache Behavior Prediction. In Proceedings of LCT-RTS, June 1997.Google ScholarGoogle Scholar
  6. C. Ferdinand and R. Wilhelm. Efficient and Precise Cache Behavior Prediction for Real-Time Systems. Real-Time Systems, 17(2), Nov. 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. G. Gebhard and S. Altmeyer. Optimal Task Placement to Improve Cache Performance. In Proceedings of EMSOFT, Sept. 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. C. Guillon, F. Rastello, T. Bidault, et al. Procedure Placement using Temporal-Ordering Information: dealing with Code Size Expansion. In Proceedings of CASES, Sept. 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Informatik Centrum Dortmund e. V. ICD-C Compiler framework. http://www.icd.de/es/icd-c, July 2011.Google ScholarGoogle Scholar
  10. C. Lee, M. Potkonjak, and W. H. Mangione-Smith. MediaBench: A Tool for Evaluating and Synthesizing Multimedia and Communications Systems. In Proceedings of MICRO, Washington DC, Dec. 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. E. A. Lee. Absolutely Positively On Time: What Would It Take? Embedded Systems Column, IEEE Computer, July 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Y. Liang and T. Mitra. Improved Procedure Placement for Set Associative Caches. In Proceedings of CASES, Oct. 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. T. Liu, M. Li, and C. J. Xue. Minimizing WCET for Real-Time Embedded Systems via Static Instruction Cache Locking. In Proceedings of RTAS, Apr. 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. P. Lokuciejewski, H. Falk, and P. Marwedel. WCET-driven Cache-based Procedure Positioning Optimizations. In Proceedings of ECRTS, July 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Mälardalen WCET Research Group. WCET Benchmarks. http://www.mrtc.mdh.se/projects/wcet/benchmarks.html, July 2011.Google ScholarGoogle Scholar
  16. S. Plazar, P. Lokuciejewski, and P. Marwedel. WCET-aware Software Based Cache Partitioning for Multi-Task Real-Time Systems. In Proceedings of WCET, June 2009.Google ScholarGoogle Scholar
  17. S. Plazar, P. Lokuciejewski, and P. Marwedel. WCET-driven Cache-aware Memory Content Selection. In Proceedings of ISORC, May 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. I. Puaut and C. Pais. Scratchpad memories vs locked caches in hard real-time systems: a quantitative comparison. In Proceedings of DATE, Apr. 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. J. Reineke, D. Grund, C. Berg, et al. Timing Predictability of Cache Replacement Policies. Real-Time Systems, 37(2), Nov. 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. S. Steinke, L. Wehmeyer, B.-S. Lee, et al. Assigning Program and Data Objects to Scratchpad for Energy Reduction. In Proceedings of DATE, Mar. 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. V. Suhendra, T. Mitra, A. Roychoudhury, et al. WCET Centric Data Allocation to Scratchpad Memory. In Proceedings of RTSS, Dec. 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Synopsys, Inc. http://www.synopsys.com, July 2011.Google ScholarGoogle Scholar
  23. UTDSP Benchmark Suite. http://www.eecg.toronto.edu/~corinna/DSP/infrastructure/UTDSP.html, July 2011.Google ScholarGoogle Scholar
  24. X. Vera, B. Lisper, and J. Xue. Data Cache Locking for Higher Program Predictability. In Proceedings of SIGMETRICS, June 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. M. Verma, L. Wehmeyer, and P. Marwedel. Cache-Aware Scratchpad Allocation Algorithm. In Proceedings of DATE, Feb. 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. V. Živojnović, J. M. Velarde, C. Schläger, et al. DSPstone: A DSP-Oriented Benchmarking Methodology. In Proceedings of ICSPAT, Dallas, USA, Oct. 1994.Google ScholarGoogle Scholar
  27. WCET-aware Compilation. http://ls12-www.cs.tu-dortmund.de/research/activities/wcc, July 2011.Google ScholarGoogle Scholar
  28. W. Zhao, D. Whalley, C. Healy, et al. Improving WCET by Applying a WC Code-Positioning Optimization. ACM Transactions on Architecture and Code Optimization, 2(4), Dec. 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. WCET-driven cache-aware code positioning

            Recommendations

            Comments

            Login options

            Check if you have access through your login credentials or your institution to get full access on this article.

            Sign in
            • Published in

              cover image ACM Conferences
              CASES '11: Proceedings of the 14th international conference on Compilers, architectures and synthesis for embedded systems
              October 2011
              250 pages
              ISBN:9781450307130
              DOI:10.1145/2038698

              Copyright © 2011 ACM

              Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

              Publisher

              Association for Computing Machinery

              New York, NY, United States

              Publication History

              • Published: 9 October 2011

              Permissions

              Request permissions about this article.

              Request Permissions

              Check for updates

              Qualifiers

              • research-article

              Acceptance Rates

              Overall Acceptance Rate52of230submissions,23%

              Upcoming Conference

              ESWEEK '24
              Twentieth Embedded Systems Week
              September 29 - October 4, 2024
              Raleigh , NC , USA

            PDF Format

            View or Download as a PDF file.

            PDF

            eReader

            View online with eReader.

            eReader