Hawkeyes: Addressing Weak Memory Order in Program Migration Based on Instruction Windows
Open Access
- 22 April 2024
- conference paper
- Published by Association for Computing Machinery (ACM)
- p. 17-22
Abstract
Migrating memory systems from x86 to ARM can result in weak memory order issues due to memory model differences. This necessitates the addition of memory barriers to prevent such problems. However, current automatic memory barrier insertion approaches fail to identify all potential locations where WMM (Weak Memory Model) bugs may occur and also often overuse unnecessary memory barriers. To address this issue, we propose Hawkeyes, an approach that combines dynamic memory access conflict detection and instruction windows to locate out-of-order memory access issues in multi-threaded programs. Hawkeyes performs compile-time instrumentation to locate all memory conflicts at run time and analyzes the micro-instructions together with the instruction window to identify out-of-order instruction intervals. By comparing such intervals among different threads, Hawkeyes determines the locations that need to maintain order. We validate the correctness of Hawkeyes on open-source libraries and evaluate Hawkeyes on public benchmarks. We demonstrate that Hawkeyes not only pinpoints all the locations where WMM bugs may appear but also achieves high accuracy in barrier insertion.Keywords
This publication has 18 references indexed in Scilit:
- Amazon Elastic Compute Cloud (EC2) versus In-House HPC Platform: A Cost AnalysisIEEE Transactions on Cloud Computing, 2016
- On understanding the energy consumption of ARM-based multicore servers2013
- A formal hierarchy of weak memory modelsFormal Methods in System Design, 2012
- Clarifying and compiling C/C++ concurrencyACM SIGPLAN Notices, 2012
- Testing concurrent programs on relaxed memory models2011
- x86-TSOCommunications of the ACM, 2010
- From Total Store Order to Sequential Consistency: A Practical Reduction Theorem2010
- ThreadSanitizer2009
- The Java memory modelACM SIGPLAN Notices, 2005
- TSOtoolACM SIGARCH Computer Architecture News, 2004