arrow
Return

Towards On-the-Fly Code Performance Profiling

delete2026-01-01
delete1
PRE
AI
X
Xing Hu
W
W.C. Lin
Z
Zhuang Liu
M
Michael Ling
X
Xin Xia *
Y
Yuan Wang
D
David Lo
DOI:10.1145/3725212delete
deleteOriginal
deleteOriginal request for help
deleteShare
deleteSave
Abstract

Abstract

En 中文
Improving the performance of software applications is one of the most important tasks in software evolution and maintenance. In the Intel Microarchitecture, CPUs employ pipelining to utilize resources as effectively as possible. Some types of software patterns or algorithms can have implications on the underlying CPU pipelines and result in inefficiencies. Therefore, analyzing how well the CPU's pipeline(s) are being utilized while running an application is important in software performance analysis. Existing techniques, such as Intel VTune Profiler, usually detect software performance issues from CPU pipeline metrics after the software enters production and during the running time. These techniques require developers to manually analyze monitoring data and perform additional test runs to obtain relevant information about performance problems. It costs a lot of time and human effort for developers to build, deploy, test, execute, and monitor the software. To alleviate these problems, we propose a novel approach named PGPROF to predict the CPU pipeline before execution and provide the profiling feedback during the development process. PGPROF exploits the graph neural networks to learn semantic and structural representations for C functions and then predict the fraction of pipeline slots in each category for them during the development process. Given a code snippet, we fuse different types of code structures, e.g., Abstract Syntax Tree (AST), Dataflow Graph (DFG), and Control Flow Graph (CFG) into one program graph. During offline learning, we first leverage the gated graph neural network to capture representations of C functions. PGPROF then automatically estimates the final pipeline values according to the learned semantic and structural features. For online prediction, we predict pipeline metrics with four category values by leveraging the offline trained model. We build our dataset from C projects in GitHub and use Intel VTune profiler to get profiling information by running them. Extensive experimental results show the promising performance of our model. We achieved absolute result of 49.90% and 79.44% in terms of Acc@5% and Acc@10% with improvements of 8.0%-42.7% and 7.8%-20.1% over a set of baselines.
Keywords:
pipeline utilization
software performance analysis
graph neural networks
code profiling
machine learning for software engineering

Journal

A
ACM Transactions on Software Engineering and Methodology
IF:
6.2
Papers:
1.2K
Citations:
3.4K

Organization

H
huawei technologies
Scholars:
3.2K
Papers: 2.9K
Citations: 1
S
singapore management university
Scholars:
318
Papers: 241
Citations: 0
Z
zhejiang university
Scholars:
17.2W
Papers: 11.9W
Citations: 152
researcher View more organizations