System execution path profiling using hardware performance counters

Francis Giraldeau, Naser Ezzati-Jivan, M. Dagenais
{"title":"System execution path profiling using hardware performance counters","authors":"Francis Giraldeau, Naser Ezzati-Jivan, M. Dagenais","doi":"10.1109/SysCon48628.2021.9447121","DOIUrl":null,"url":null,"abstract":"The task critical execution path, obtained from a kernel trace, reports the time spent waiting for each task involved in a heterogeneous and distributed application. However, additional profiling is needed to understand and identify the problematic code associated with long-lasting path edges. Hardware counter sampling provides insight on software performance at the microarchitecture level, for instance extracting the call stack every 100K execution cycles to understand where the execution time is spent. Similarly, extracting the call stack at the end of a long waiting system call is often useful. This technique is readily available for either statically or JIT compiled code. However, interpreted code is indirectly executed on the processor and the link between the statements and the executed assembly is missing. We propose an architecture to efficiently record call stacks along the execution path, including interpreted programs, in a low intrusive way that maintains the abstraction boundary between the kernel, the interpreter, and the user code. The method consists in sending a signal from within the performance counter interrupt handler. The user-space code receiving the signal can inspect and record the state of the program. We implemented a profiler for the CPython interpreter using this technique. We studied the benefit, the accuracy, and the cost of the proposed technique compared to an all-kernel monitoring solution.","PeriodicalId":384949,"journal":{"name":"2021 IEEE International Systems Conference (SysCon)","volume":"2 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2021-04-15","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"2021 IEEE International Systems Conference (SysCon)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/SysCon48628.2021.9447121","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

Abstract

The task critical execution path, obtained from a kernel trace, reports the time spent waiting for each task involved in a heterogeneous and distributed application. However, additional profiling is needed to understand and identify the problematic code associated with long-lasting path edges. Hardware counter sampling provides insight on software performance at the microarchitecture level, for instance extracting the call stack every 100K execution cycles to understand where the execution time is spent. Similarly, extracting the call stack at the end of a long waiting system call is often useful. This technique is readily available for either statically or JIT compiled code. However, interpreted code is indirectly executed on the processor and the link between the statements and the executed assembly is missing. We propose an architecture to efficiently record call stacks along the execution path, including interpreted programs, in a low intrusive way that maintains the abstraction boundary between the kernel, the interpreter, and the user code. The method consists in sending a signal from within the performance counter interrupt handler. The user-space code receiving the signal can inspect and record the state of the program. We implemented a profiler for the CPython interpreter using this technique. We studied the benefit, the accuracy, and the cost of the proposed technique compared to an all-kernel monitoring solution.
使用硬件性能计数器的系统执行路径分析
从内核跟踪中获得的任务关键执行路径报告了等待异构和分布式应用程序中涉及的每个任务所花费的时间。然而,需要额外的分析来理解和识别与持久路径边相关的有问题的代码。硬件计数器采样提供了对微体系结构级别的软件性能的洞察,例如,每100K执行周期提取调用堆栈,以了解执行时间花在哪里。类似地,在长时间等待系统调用结束时提取调用堆栈通常是有用的。这种技术很容易用于静态或JIT编译的代码。但是,解释过的代码是间接在处理器上执行的,语句和执行的程序集之间没有链接。我们提出了一种架构,以一种低干扰的方式有效地记录执行路径上的调用堆栈,包括被解释的程序,它保持了内核、解释器和用户代码之间的抽象边界。该方法包括从性能计数器中断处理程序内部发送信号。接收信号的用户空间代码可以检查并记录程序的状态。我们使用这种技术为CPython解释器实现了一个分析器。我们研究了与全内核监视解决方案相比,所提出的技术的优点、准确性和成本。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信