SAM: self-adaptive dynamic analysis for multithreaded programs

  • Authors:
  • Qichang Chen;Liqiang Wang;Zijiang Yang

  • Affiliations:
  • Dept. of Computer Science, University of Wyoming, WY;Dept. of Computer Science, University of Wyoming, WY;Dept. of Computer Science, Western Michigan University, MI

  • Venue:
  • HVC'11 Proceedings of the 7th international Haifa Verification conference on Hardware and Software: verification and testing
  • Year:
  • 2011

Quantified Score

Hi-index 0.00

Visualization

Abstract

Many dynamic analysis techniques have been proposed to detect incorrect program behaviors resulted from faulty code. However, the huge overhead incurred by such dynamic analysis prevents thorough testing of large-scale software systems. In this paper, we propose a novel framework using compile-time and run-time optimizations on instrumentation and monitoring that aim to significantly reduce the overhead of dynamic analysis on multithreaded programs. We implemented a tool called SAM (Self-Adaptive Monitoring) that can selectively turn off excessive monitoring on repeated code region invocations if the current program context has been determined to be redundant, which may assist many existing dynamic detection tools to improve their performance. Specifically, we approximate the program context for a code region invocation as a set of variables, which include path-critical variables and shared variables accessed in that region. The path-critical variables are inferred using a use-definition dataflow analysis, and the shared variables are identified using a hybrid thread-based escape analysis. We have implemented the tool in Java and evaluated it on a set of real-world programs. Our experimental results show that it can significantly reduce the runtime overhead of the baseline atomicity violation and data race analyses by an average of 50% and 20%, respectively, while roughly keeping the accuracy of the underlying runtime detection tools.