最小覆盖范围仪表
Minimum Coverage Instrumentation
摘要:
现代编译器利用块覆盖配置文件数据来执行下游配置文件引导的优化,以提高运行时性能和二进制文件的大小。给定一个二进制函数的控制流图$G=(V, E)$,其中$V$中的节点对应于基本块(总是顺序执行的指令序列),$E$中的边表示控制流中的跳转,目标是知道每个块$u \in V$是否在会话期间执行了$u$。为此,需要向二进制文件中添加额外的插装代码来记录块的执行时间。这些额外的代码会产生时间和空间开销,人们希望尽可能地减少这些开销。出于这个应用程序,我们研究的最小覆盖仪表问题,其中的目标是找到一个最小尺寸的块的子集,以仪器,使图中的其余块的覆盖范围可以推断从仪表子集的覆盖状态。我们的主要结果是一个算法,找到一个最佳的仪器策略,并进行推理的$O(|E|)$时间。我们还研究了这个基本问题的变体,其中我们有兴趣学习边缘而不是节点的覆盖范围,或者当我们只允许工具边缘而不是节点时。
英文摘要:
Modern compilers leverage block coverage profile data to carry out downstream profile-guided optimizations to improve the runtime performance and the size of a binary. Given a control-flow graph $G=(V, E)$ of a function in the binary, where nodes in $V$ correspond to basic blocks (sequences of instructions that are always executed sequentially) and edges in $E$ represent jumps in the control flow, the goal is to know for each block $u \in V$ whether $u$ was executed during a session. To this end, extra instrumentation code that records when a block is executed needs to be added to the binary. This extra code creates a time and space overhead, which one would like to minimize as much as possible. Motivated by this application, we study the Minimum Coverage Instrumentation problem, where the goal is to find a minimum size subset of blocks to instrument such that the coverage of the remaining blocks in the graph can be inferred from the coverage status of the instrumented subset. Our main result is an algorithm to find an optimal instrumentation strategy and to carry out the inference in $O(|E|)$ time. We also study variants of this basic problem in which we are interested in learning the coverage of edges instead of the nodes, or when we are only allowed to instrument edges instead of the nodes.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。