arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2311.03535cs.PFcs.PL
收藏

借助EDPM增强C/C++程序性能监控:一种面向性能监控的领域特定语言

Enhancing Performance Monitoring in C/C++ Programs with EDPM: A Domain-Specific Language for Performance Monitoring

David Weisskopf Holmqvist, Suejb Memeti

AI总结:

针对C/C++程序手动插入性能监控探针带来的代码膨胀、学习成本高等问题,提出嵌入式领域特定语言EDPM,通过高层抽象标注插桩区域,相较PAPI可减少代码量、配置灵活且开销低,能无缝集成现有流程并支持计数器扩展。

摘要:

性能监控探针的使用是程序员收集性能数据的宝贵工具。然而,手动插入这些探针会导致代码量增加、代码可读性下降,还会带来学习性能监控工具相关各类API的额外负担。为缓解这些问题,我们开发了嵌入式领域特定语言EDPM,它提供了更高层级的抽象,用于标注C和C++程序中需要插桩的代码区域。本文介绍了EDPM的设计与实现,并从所需代码行数、区域配置灵活性以及性能开销三个方面,将其与知名工具PAPI进行对比。研究结果表明,EDPM是一种低分辨率剖析工具,能够减少所需代码行数,让程序员可以表达多种区域配置。此外,EDPM的设计使其编译指示(pragma)会被标准编译器忽略,能够无缝集成到现有软件流程中,不会干扰构建系统,也不会增加可执行文件的大小。另外,EDPM预编译器的设计支持扩展可用的性能计数器,同时为程序员保持高抽象层级。因此,EDPM为简化和优化C与C++程序的性能监控提供了一种颇具前景的解决方案。

英文摘要:

The utilization of performance monitoring probes is a valuable tool for programmers to gather performance data. However, the manual insertion of these probes can result in an increase in code size, code obfuscation, and an added burden of learning different APIs associated with performance monitoring tools. To mitigate these issues, EDPM, an embedded domain-specific language, was developed to provide a higher level of abstraction for annotating regions of code that require instrumentation in C and C++ programs. This paper presents the design and implementation of EDPM and compares it to the well-known tool PAPI, in terms of required lines of code, flexibility in configuring regions, and performance overhead. The results of this study demonstrate that EDPM is a low-resolution profiling tool that offers a reduction in required lines of code and enables programmers to express various configurations of regions. Furthermore, the design of EDPM is such that its pragmas are ignored by the standard compiler, allowing for seamless integration into existing software processes without disrupting build systems or increasing the size of the executable. Additionally, the design of the EDPM pre-compiler allows for the extension of available performance counters while maintaining a high level of abstraction for programmers. Therefore, EDPM offers a promising solution to simplify and optimize performance monitoring in C and C++ programs.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑