C/C++ 分析工具库 Prof

码农软件 · 软件分类 · 性能测试和优化 · 2019-11-27 08:59:51

软件介绍

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

本文地址:https://www.codercto.com/soft/d/19888.html

面向模式的软件体系结构(卷1) (平装)

面向模式的软件体系结构(卷1) (平装)

Frank Buschmann、Regine meunier、Hans Rohnert、Peter Sommerlad、Michael Stal / 贲可荣、郭福亮 / 机械工业出版社 / 2003-1 / 45.0

一起来看看 《面向模式的软件体系结构(卷1) (平装)》 这本书的介绍吧!

Base64 编码/解码
Base64 编码/解码

Base64 编码/解码

html转js在线工具
html转js在线工具

html转js在线工具

HSV CMYK 转换工具
HSV CMYK 转换工具

HSV CMYK互换工具