Hsu, Wei-ChungChen, HowardYew, Pen-ChungChen, Dong-yuan2020-09-022020-09-022002-02-07https://hdl.handle.net/11299/215510Abstract Efficient profiling is a major challenge for dynamic optimization because the profiling overhead contributes to the total execution time. In order to identify program hot spots for runtime optimization, the profiler in a dynamic optimizer must detect new execution phases and subsequent phase changes. Current profiling approaches used in prototype dynamic optimizers are interpretation or instrumentation based. They have eithervery high overhead, or generate poor quality profiles. We use the branch trace buffer and the hardware performance monitoring features provided in the IA -64 architecture to detect new execution phases and phase changes. The branch trace buffer records the last few branch instructions executed before an event based interrupt is generated. Using the branch trace buffer, our profiler continuously samples execution paths leading to critical performance events, such as cache misses and pipeline stalls. A set of frequently executed traces and their respective performancecharacteristics within a time interval are considered as an execution phase. Since such phases tend to repeat over time, a dynamic optimizer can exploit the phase locality to drive optimization. We check for new phases and phase changes at the end of each time interval. Although a new phase or a changed phase can be a candidate for optimization, our phase detector delays the invocation of the optimizer until a relatively stable phase is detected. We report the effectiveness of various phase detection methods using Spec2000int as the benchmark. Our results indicate branch trace based phase detection can be suitable for dynamic binary optimizers.en-USPhase Locality Detection Using a Branch Trace Buffer for Efficient Profiling in Dynamic OptimizationReport