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

WCET-driven cache-aware code positioning

Published: 09 October 2011 Publication 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.
[2]
H. Falk and J. C. Kleinsorge. Optimal Static WCET-aware Scratchpad Allocation of Program Code. In Proceedings of DAC, July 2009.
[3]
H. Falk and P. Lokuciejewski. A compiler framework for the reduction of worst-case execution times. Real-Time Systems, 46(2), Oct. 2010.
[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.
[5]
C. Ferdinand, F. Martin, and R. Wilhelm. Applying Compiler Techniques to Cache Behavior Prediction. In Proceedings of LCT-RTS, June 1997.
[6]
C. Ferdinand and R. Wilhelm. Efficient and Precise Cache Behavior Prediction for Real-Time Systems. Real-Time Systems, 17(2), Nov. 1999.
[7]
G. Gebhard and S. Altmeyer. Optimal Task Placement to Improve Cache Performance. In Proceedings of EMSOFT, Sept. 2007.
[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.
[9]
Informatik Centrum Dortmund e. V. ICD-C Compiler framework. http://www.icd.de/es/icd-c, July 2011.
[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.
[11]
E. A. Lee. Absolutely Positively On Time: What Would It Take? Embedded Systems Column, IEEE Computer, July 2005.
[12]
Y. Liang and T. Mitra. Improved Procedure Placement for Set Associative Caches. In Proceedings of CASES, Oct. 2010.
[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.
[14]
P. Lokuciejewski, H. Falk, and P. Marwedel. WCET-driven Cache-based Procedure Positioning Optimizations. In Proceedings of ECRTS, July 2008.
[15]
Mälardalen WCET Research Group. WCET Benchmarks. http://www.mrtc.mdh.se/projects/wcet/benchmarks.html, July 2011.
[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.
[17]
S. Plazar, P. Lokuciejewski, and P. Marwedel. WCET-driven Cache-aware Memory Content Selection. In Proceedings of ISORC, May 2010.
[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.
[19]
J. Reineke, D. Grund, C. Berg, et al. Timing Predictability of Cache Replacement Policies. Real-Time Systems, 37(2), Nov. 2007.
[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.
[21]
V. Suhendra, T. Mitra, A. Roychoudhury, et al. WCET Centric Data Allocation to Scratchpad Memory. In Proceedings of RTSS, Dec. 2005.
[22]
Synopsys, Inc. http://www.synopsys.com, July 2011.
[23]
UTDSP Benchmark Suite. http://www.eecg.toronto.edu/~corinna/DSP/infrastructure/UTDSP.html, July 2011.
[24]
X. Vera, B. Lisper, and J. Xue. Data Cache Locking for Higher Program Predictability. In Proceedings of SIGMETRICS, June 2003.
[25]
M. Verma, L. Wehmeyer, and P. Marwedel. Cache-Aware Scratchpad Allocation Algorithm. In Proceedings of DATE, Feb. 2004.
[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.
[27]
WCET-aware Compilation. http://ls12-www.cs.tu-dortmund.de/research/activities/wcc, July 2011.
[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.

Cited By

View all

Recommendations

Comments

Information & Contributors

Information

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
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]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 09 October 2011

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. cache
  2. cache miss
  3. code positioning
  4. locality
  5. wcet

Qualifiers

  • Research-article

Conference

ESWeek '11
ESWeek '11: Seventh Embedded Systems Week
October 9 - 14, 2011
Taipei, Taiwan

Acceptance Rates

Overall Acceptance Rate 52 of 230 submissions, 23%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)3
  • Downloads (Last 6 weeks)0
Reflects downloads up to 14 Jan 2025

Other Metrics

Citations

Cited By

View all

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media