关于perfmon2的使用记录

官方主页:http://perfmon2.sourceforge.net/   点击那个here的超链接就能下载。

git主页: https://sourceforge.net/p/perfmon2/libpfm4/ci/master/tree/

This package provides a library, called libpfm4 which is used to develop
monitoring tools exploiting the performance monitoring events such as those
provided by the Performance Monitoring Unit (PMU) of modern processors.

简单的说,这是一个库,用来做一些基于硬件events的performance的检测。


安装步骤:

下载以后

tar zxvf libpfm-4.7.0.tar.gz

cd libpfm-4.7.0

make

make install

然后可以去执行perf_exampler下的一些文件。


如果本地.c文件,则

cc  -g -Wall -Werror -Wextra -Wno-unused-parameter -I. -I/home/ubuntu/libpfm-4.7.0/perf_examples/../include -DCONFIG_PFMLIB_DEBUG -DCONFIG_PFMLIB_OS_LINUX -I. -D_GNU_SOURCE -pthread -c xxx.c

生成xxx.o

cc  -g -Wall -Werror -Wextra -Wno-unused-parameter -I. -I/home/ubuntu/libpfm-4.7.0/perf_examples/../include -DCONFIG_PFMLIB_DEBUG -DCONFIG_PFMLIB_OS_LINUX -I. -D_GNU_SOURCE -pthread -o xxx  xxx.o perf_util.o /home/ubuntu/libpfm-4.7.0/perf_examples/../lib/libpfm.a

生成可执行文件



  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值