{"title":"Dynamic profiling and trace cache generation","authors":"Marc Berndl, L. Hendren","doi":"10.1109/CGO.2003.1191552","DOIUrl":null,"url":null,"abstract":"Dynamic program optimization is increasingly important for achieving good runtime performance. A key issue is how to select which code to optimize. One approach is to dynamically detect traces, long sequences of instructions spanning multiple methods, which are likely to execute to completion. Traces are easy to optimize and have been shown to be a good unit for optimization. The paper reports on a new approach for dynamically detecting, creating and storing traces in a Java virtual machine. We first describe four important criteria for a successful trace strategy: good instruction stream coverage, low dispatch rate, cache stability, and optimizability of traces. We then present our approach based on branch correlation graphs. A branch correlation graph stores information about the correlation between pairs of branches, as well as additional state information. We present the complete design for an efficient implementation of the system, including a detailed discussion of the trace cache and profiling mechanisms. We have implemented an experimental framework to measure the traces generated by our approach in a direct-threaded Java VM (SableVM) and we present experimental results to show that the traces we generate meet the design criteria.","PeriodicalId":277590,"journal":{"name":"International Symposium on Code Generation and Optimization, 2003. CGO 2003.","volume":"85 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2003-03-23","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"19","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"International Symposium on Code Generation and Optimization, 2003. CGO 2003.","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/CGO.2003.1191552","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 19
Abstract
Dynamic program optimization is increasingly important for achieving good runtime performance. A key issue is how to select which code to optimize. One approach is to dynamically detect traces, long sequences of instructions spanning multiple methods, which are likely to execute to completion. Traces are easy to optimize and have been shown to be a good unit for optimization. The paper reports on a new approach for dynamically detecting, creating and storing traces in a Java virtual machine. We first describe four important criteria for a successful trace strategy: good instruction stream coverage, low dispatch rate, cache stability, and optimizability of traces. We then present our approach based on branch correlation graphs. A branch correlation graph stores information about the correlation between pairs of branches, as well as additional state information. We present the complete design for an efficient implementation of the system, including a detailed discussion of the trace cache and profiling mechanisms. We have implemented an experimental framework to measure the traces generated by our approach in a direct-threaded Java VM (SableVM) and we present experimental results to show that the traces we generate meet the design criteria.
动态程序优化对于实现良好的运行时性能越来越重要。一个关键问题是如何选择要优化的代码。一种方法是动态检测跟踪,即跨越多个方法的长指令序列,这些指令可能执行到完成。轨迹很容易优化,并且已被证明是一个很好的优化单元。本文报道了一种在Java虚拟机中动态检测、创建和存储轨迹的新方法。我们首先描述了成功跟踪策略的四个重要标准:良好的指令流覆盖、低分派率、缓存稳定性和跟踪的可优化性。然后,我们提出了基于分支相关图的方法。分支关联图存储关于分支对之间的相关性的信息,以及附加的状态信息。我们给出了系统高效实现的完整设计,包括对跟踪缓存和分析机制的详细讨论。我们已经实现了一个实验框架来测量我们的方法在直接线程Java VM (SableVM)中生成的迹线,我们给出的实验结果表明,我们生成的迹线符合设计标准。