Title
Living on the edge: rapid-toggling probes with cross-modification on x86.
Abstract
Dynamic probe injection is now a widely used method to debug performance in production. Current techniques for dynamic probing of native code, however, rely on an expensive stop-the-world approach: binary changes are made within a safe state of the program---typically in which all the program threads are halted---to ensure that another thread executing the modified code region doesn't step into a partially-modified code. Stop-the-world patching is not scalable. In contrast, low overhead, scalable probes that can be rapidly toggled on and off in-place would open up new use cases for statistical profilers and language implementations, even traditional ahead-of-time, native-code compilers. In this paper we introduce safe cross-modification protocols that mutate x86 code between threads but do not require quiescing threads, resulting in radically lower overheads than existing solutions. A key problem is handling instructions that straddle cache lines. We empirically evaluate existing x86 architectures to derive a safe policy given current processor behavior, and we argue that future architectures should clarify the semantics of instruction fetching to make cheap cross-modification easier and future proof.
Year
DOI
Venue
2016
10.1145/2908080.2908084
PLDI
Keywords
Field
DocType
dynamic instrumentation,application profiling
x86,Use case,Programming language,Computer science,Cache,Compiler,Real-time computing,Thread (computing),Machine code,Scalability,Embedded system,Debugging
Conference
Volume
Issue
ISSN
51
6
0362-1340
Citations 
PageRank 
References 
0
0.34
10
Authors
4
Name
Order
Citations
PageRank
Buddhika Chamith131.10
Bo Joel Svensson2676.12
Luke Dalessandro335716.67
Ryan Newton480270.80