💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、豆包、星火、月之暗面及文生图、文生视频 广告
[TOC] > [参考](https://blog.csdn.net/irving512/article/details/117077847) > https://gperftools.github.io/gperftools/cpuprofile.html ## gperftools 概述 yum ``` gperftools ``` **使用** 在程序编译时候添加`-lprofiler` **注意** 对于服务类型的程序需要使用 `kill 程序名`停止,而不是 `Ctrl+c`或 `kill -9` ## 示例 ``` // 生成配置文件 > CPUPROFILE=data.prof./myprogram > kill pid > pprof data.prof --svg > prof.svg ``` 效果图 ![](https://gperftools.github.io/gperftools/pprof-test.gif)