- 授权协议: MIT
- 开发语言: C/C++
- 操作系统: Linux
- 软件首页: https://github.com/cyrus-and/prof
软件介绍
Prof 是 Linux 的自容器 C/C++ 分析工具库。
Prof 提供一个快速的方法来度量 C/C++ 代码片段的性能事件 (CPU 时钟周期等等) 。
小示例:
#include "prof.h"int main()
{ PROF_START(); // slow code goes here...
PROF_STDOUT();
}
自定义选项
#include <stdio.h>
#define PROF_USER_EVENTS_ONLY
#define PROF_EVENT_LIST \
PROF_EVENT_CACHE(L1D, READ, MISS) \
PROF_EVENT_CACHE(L1D, WRITE, MISS)
#include "prof.h"
int main()
{
uint64_t faults[2] = { 0 };
PROF_START();
// slow code goes here...
PROF_DO(faults[index] += counter);
// fast or uninteresting code goes here...
PROF_START();
// slow code goes here...
PROF_DO(faults[index] += counter);
printf("Total L1 faults: R = %lu; W = %lu\n", faults[0], faults[1]);
}安装
wget -q https://raw.githubusercontent.com/cyrus-and/prof/master/prof.h
面向模式的软件体系结构(卷1) (平装)
Frank Buschmann、Regine meunier、Hans Rohnert、Peter Sommerlad、Michael Stal / 贲可荣、郭福亮 / 机械工业出版社 / 2003-1 / 45.0
一起来看看 《面向模式的软件体系结构(卷1) (平装)》 这本书的介绍吧!
