This paper presents algorithms for inserting monitoring code to profile and trace programs. These algorithms greatly reduce the cost of measuring programs. Profiling counts the number of times each basic block in a program executes and has a variety of applications. Instruction traces are the basis for trace-driven simulation and analysis, and are also used in trace-driven debugging.
The profiling algorithm chooses a placement of counters that is optimized---and frequently optimal---with respect to the expected or measured execution frequency of each basic block and branch in the program. The tracing algorithm instruments a program to obtain a subsequence of the basic block trace---whose length is optimized with respect to the program's execution---from which the entire trace can be efficiently regenerated.
Both algorithms have been implemented and produce a substantial improvement over previous approaches. The profiling algorithm reduces the number of counters by a factor of two and the number of counter increments by up to a factor of four. The tracing algorithm reduces the file size and overhead of an already highly optimized tracing system by 20-40%.
本文介绍了用于将监视代码插入概要文件和跟踪程序的算法。这些算法大大降低了测量程序的成本。分析是对程序中每个基本块执行并具有各种应用程序的次数进行计数。指令跟踪是跟踪驱动的仿真和分析的基础,还用于跟踪驱动的调试。 P>
分析算法选择一个相对于程序中每个基本块和分支的预期执行频率或已测量执行频率进行优化(通常是最佳)的计数器位置。跟踪算法对程序进行检测,以获取基本块跟踪的子序列-相对于程序的执行优化了其长度-可以有效地重新生成整个跟踪。 P>
这两种算法均已实现,并且比以前的方法有了实质性的改进。概要分析算法将计数器的数量减少了两倍,而计数器的增量最多减少了四倍。跟踪算法将已经高度优化的跟踪系统的文件大小和开销减少了20-40%。 P>
机译:通过几何编程优化掺杂分布
机译:使用基于线性编程的最优功率流动的负载脱落作用来改进电压曲线
机译:使用半定规划构造Kuramoto-Sivashinsky方程的最佳背景轮廓
机译:用于最佳跟踪时间关键程序的算法
机译:自适应顺序线性编程可实现最佳控制曲线。
机译:二次编程优化转录谱数据的反卷积及其在复杂临床血液样本中的应用
机译:最佳分析和跟踪程序
机译:用于生成和评估近最佳垂直飞行剖面的计算机程序。