http://portal.acm.org/citation.cfm?id=329366.301109&coll=GUIDE&dl=GUIDE
이 논문은 제목에서와 같이 Multi-thread환경에서의 dynamic instrumentation방법에 대해서 설명한다. 그렇다면 muti-thread환경에서 dynamic instrumentation이 왜 이슈가 될 수 있을지 생각을 해 보아야한다. 논문에서는 이에 대해서 아래와 같이 설명한다.
.....
A major challenge in building a performance tool for threaded programs is to associate performance data with individual threads and doing so with acceptable overhead. We adopt a design, called Same Instrumentation Code Multiple Data(SICMD), in which all threads share the same instrumentation code, but each has its own private copy of performance counters or timers.
A second challenge is to handle the asynchrony that can occur in multithreaded programs, such as thread preemption. Instrumenting context switches is necessary for several reasons, such as implementing time-based metrics. However, this can cause instrumentation code to interleave with the execution of a thread. When instrumentation code calls functions that use locks (such as used in a thread-safe C library), it might deadlock the thread.
A third challenge is to minimize instrumentation cost when measuring time-based metrics on a per-thread basis. To measure the time spent by individual threads (i.e., to visualize timers per thread), we need to turn timers on and off at thread-context switches. When context switching is frequent, this additional instrumentation can substantially slow down an application. We introduce per thread virtual timers, and implement other timers using the virtual timers.
.....
논문에서는 제시하는 방법을 적용하여 tread application에 대한 instrumenting overhead가 기존에 비해서 크게 줄었다는 것을 제시한다. 그리고 instrumentation기반 profiling정보를 분석하여 application의 performance를 높힌 사례를 소개한다.
그런 것 같다....ㅡ.ㅡ;;
'Papers > Dynamic Instrumentation' 카테고리의 다른 글
ptrace (inject code) (0) | 2009.04.15 |
---|---|
ptrace (0) | 2009.04.14 |
Analyzing Dynamic Binary Instrumentation Overhead (0) | 2008.06.23 |
Demand-Driven Structural Testing with Dynamic Instrumentation (0) | 2008.06.20 |