Debugging Programs that use Atomic Blocks and Transactional Memory

  • Ferad Zyulkyarov ,
  • Tim Harris ,
  • Osman S. Unsal ,
  • Adrian Cristal ,
  • Mateo Valero

PPoPP 2010 |

Published by Association for Computing Machinery, Inc.

With the emergence of research prototypes, programming using atomic blocks and transactional memory (TM) is becoming more attractive. This paper describes our experience building and using a debugger for programs written with these abstractions. We introduce three approaches: (i) debugging at the level of atomic blocks, where the programmer is shielded from implementation details (such as exactly what kind of TM is used, or indeed whether lock inference is used instead), (ii) debugging at the level of transactions, where conflict rates, read sets, write sets, and other TM internals are visible, and (iii) debug-time transactions, which let the programmer manipulate synchronization from within the debugger—e.g., enlarging the scope of an atomic block to try to identify a bug. In this paper we explain the rationale behind the new debugging approaches that we propose.We describe the design and implementation of an extension to the WinDbg debugger, enabling support for C# programs using atomic blocks and TM.We also demonstrate the design of a “conflict point discovery” technique for identifying program statements that introduce contention between transactions. We illustrate how these techniques can be used by optimizing a C# version of the Genome application from STAMP TM benchmark suite.