Dynamic filtering

Tim Harris, Saša Tomic, Adrián Cristal, Osman Unsal
2010 SIGPLAN notices  
This paper introduces a new abstraction to accelerate the readbarriers and write-barriers used by language runtime systems. We exploit the fact that, dynamically, many barrier executions perform checks but no real work-e.g., in generational garbage collection (GC), frequent checks are needed to detect the creation of intergenerational references, even though such references occur rarely in many workloads. We introduce a form of dynamic filtering that identifies redundant checks by (i) recording
more » ... checks that have recently been executed, and (ii) detecting when a barrier is repeating one of these checks. We show how this technique can be applied to a variety of algorithms for GC, transactional memory, and language-based security. By supporting dynamic filtering in the instruction set, we show that the fast-paths of these barriers can be streamlined, reducing the impact on the quality of surrounding code. We show how we accelerate the barriers used for generational GC and transactional memory in the Bartok research compiler. With a 2048-entry filter, dynamic filtering eliminates almost all the overhead of the GC write-barriers. Dynamic filtering eliminates around half the overhead of STM over a non-synchronized baseline-even when used with an STM that is already designed for low overhead, and which employs static analyses to avoid redundant operations.
doi:10.1145/1735971.1736027 fatcat:rwazndcpjzc47oqav25jivtxga