TY - GEN
T1 - Asynchronous assertions
AU - Aftandilian, Edward E.
AU - Guyer, Samuel Z.
AU - Vechev, Martin
AU - Yahav, Eran
PY - 2011
Y1 - 2011
N2 - Assertions are a familiar and widely used bug detection technique. Traditional assertion checking, however, is performed synchronously, imposing its full cost on the runtime of the program. As a result, many useful kinds of checks, such as data structure invariants and heap analyses, are impractical because they lead to extreme slowdowns. We present a solution that decouples assertion evaluation from program execution: assertions are checked asynchronously by separate checking threads while the program continues to execute. Our technique guarantees that asynchronous evaluation always produces the same result as synchronous evaluation, even if the program concurrently modifies the program state. The checking threads evaluate each assertion on a consistent snapshot of the program state as it existed at the moment the assertion started. We implemented our technique in a system called STROBE, which supports asynchronous assertion checking in both single-and multi-threaded Java applications. STROBE runs inside the Java virtual machine and uses copy-on-write to construct snapshots incrementally, on-the-fly. Our system includes all necessary synchronization to support multiple concurrent checking threads, and to prevent data races with the main program threads.We find that asynchronous checking significantly outperforms synchronous checking, incurring tolerable overheads - in the range of 10% to 50% over no checking at all - even for heavy-weight assertions that would otherwise result in crushing slowdowns. Copyright is held by the author / owner(s).
AB - Assertions are a familiar and widely used bug detection technique. Traditional assertion checking, however, is performed synchronously, imposing its full cost on the runtime of the program. As a result, many useful kinds of checks, such as data structure invariants and heap analyses, are impractical because they lead to extreme slowdowns. We present a solution that decouples assertion evaluation from program execution: assertions are checked asynchronously by separate checking threads while the program continues to execute. Our technique guarantees that asynchronous evaluation always produces the same result as synchronous evaluation, even if the program concurrently modifies the program state. The checking threads evaluate each assertion on a consistent snapshot of the program state as it existed at the moment the assertion started. We implemented our technique in a system called STROBE, which supports asynchronous assertion checking in both single-and multi-threaded Java applications. STROBE runs inside the Java virtual machine and uses copy-on-write to construct snapshots incrementally, on-the-fly. Our system includes all necessary synchronization to support multiple concurrent checking threads, and to prevent data races with the main program threads.We find that asynchronous checking significantly outperforms synchronous checking, incurring tolerable overheads - in the range of 10% to 50% over no checking at all - even for heavy-weight assertions that would otherwise result in crushing slowdowns. Copyright is held by the author / owner(s).
KW - Assertions
KW - Concurrent checking
KW - Data structure invariants
KW - Dynamic analysis
KW - Heap snapshot
UR - http://www.scopus.com/inward/record.url?scp=81455154912&partnerID=8YFLogxK
U2 - 10.1145/2048066.2048090
DO - 10.1145/2048066.2048090
M3 - منشور من مؤتمر
SN - 9781450309400
T3 - Proceedings of the Conference on Object-Oriented Programming Systems, Languages, and Applications, OOPSLA
SP - 275
EP - 288
BT - OOPSLA'11 - Proceedings of the 2011 ACM International Conference on Object Oriented Programming Systems Languages and Applications
T2 - 2011 ACM International Conference on Object Oriented Programming Systems Languages and Applications, OOPSLA'11
Y2 - 22 October 2011 through 27 October 2011
ER -