Sign up & Download
Sign in

R2 : An Application-Level Kernel for Record and Replay

by Zhenyu Guo, Xi Wang, Jian Tang, Xuezheng Liu
Symposium A Quarterly Journal In Modern Foreign Literatures (2008)

Abstract

Library-based record and replay tools aim to reproduce an applications execution by recording the results of se- lected functions in a log and during replay returning the results from the log rather than executing the functions. These tools must ensure that a replay run is identical to the record run. The challenge in doing so is that only invocations of a function by the application should be recorded, recording the side effects of a function call can be difficult, and not executing function calls during re- play, multithreading, and the presence of the tool may change the applications behavior from recording to re- play. These problems have limited the use of such tools. R2 allows developers to choose functions that can be recorded and replayed correctly. Developers annotate the chosen functions with simple keywords so that R2 can handle callswith side effects andmultithreading.R2 gen- erates code for record and replay from templates, allow- ing developers to avoid implementing stubs for hundreds of functions manually. To track whether an invocation is on behalf of the application or the implementation of a selected function, R2 maintains a mode bit, which stubs save and restore. We have implemented R2 on Windows and anno- tated large parts (1,300 functions) of the Win32 API, and two higher-level interfaces (MPI and SQLite). R2 can replay multithreaded web and database servers that previous library-based tools cannot replay. By allowing developers to choose high-level interfaces, R2 can also keep recording overhead small; experiments show that its recording overhead forApache is approximately 10%, that recording and replaying at the SQLite interface can reduce the log size up to 99% (compared to doing so at theWin32 API), and that using optimization annotations for BitTorrent andMPI applications achieves log size re- duction ranging from 13.7% to 99.4%.

Cite this document (BETA)

Sign up today - FREE

Mendeley saves you time finding and organizing research. Learn more

  • All your research in one place
  • Add and import papers easily
  • Access it anywhere, anytime

Start using Mendeley in seconds!

Already have an account? Sign in

Readership Statistics

3 Readers on Mendeley
by Discipline
 
 
by Academic Status
 
67% Ph.D. Student
 
33% Professor
by Country
 
67% China
 
33% United Kingdom