应用OProfile作性能测试(2)

VTune性能分析的三篇文章 Intel VTune性能分析工具使用说明,共三个文档,希望有所帮助 立即下载
1. 概述

oprofile 是 Linux 平台上,类似 INTEL VTune 的一个功能强大的性能分析工具。

其支持两种采样(sampling)方式:基于事件的采样(event based)和基于时间的采样(time based)。

基于事件的采样是oprofile只记录特定事件(比如L2 cache miss)的发生次数,当达到用户设定的
定值时oprofile 就记录一下(采一个样)。这种方式需要CPU 内部有性能计数器(performace counter)。
现代CPU内部一般都有性能计数器,龙芯2E内部亦内置了2个性能计数器。

基于时间的采样是oprofile 借助OS 时钟中断的机制,每个时钟中断 oprofile 都会记录一次(采一次样)。
引入的目的在于,提供对没有性能计数器 CPU 的支持。其精度相对于基于事件的采样要低。因为要借助 OS
时钟中断的支持,对禁用中断的代码oprofile不能对其进行分析。

oprofile 在Linux 上分两部分,一个是内核模块(oprofile.ko),一个为用户空间的守护进程(oprofiled)。
前者负责访问性能计数器或者注册基于时间采样的函数(使用register_timer_hook注册之,使时钟中断处理
程序最后执行profile_tick 时可以访问之),并采样置于内核的缓冲区内。后者在后台运行,负责从内核空
间收集数据,写入文件。


2. oprofile 的安装

以龙芯2E平台为例,要使用oprofile 首先得采用打开oprofile支持的内核启动。然后安装下面3个软件包:
oprofile, oprofile-common, oprofile-gui,其中核心软件包是oprofile-common,其包括以下工具集:

        /usr/bin/oprofiled                守护进程
        /usr/bin/opcontrol                控制前端,负责控制与用户交互,用得最多       
        /usr/bin/opannotate                根据搜集到的数据,在源码或者汇编层面上注释并呈现给用户
        /usr/bin/opreport                生成二进制镜像或符号的概览
        /usr/bin/ophelp                        列出oprofile支持的事件
        /usr/bin/opgprof                生成gprof格式的剖析数据
        ...


目前oprofile 在龙芯2E上已经移植好了,包括用户空间的工具集软件包,亦可用矣。

一个测试用的内核,已经打开 oprofile ,位于 http://people.openrays.org/~comcat/godson/vmlinux-2.6.18-oprofile

用户空间工具集deb 包位于: http://people.openrays.org/~comcat/godson/oprofile-0.9.2/


3. oprofile 快速上手

a. 初始化

        opcontrol --init

        该命令会加载oprofile.ko模块,mount oprofilefs。成功后会在/dev/oprofile/目录下导出
        一些文件和目录如: cpu_type, dump, enable, pointer_size, stats/

b. 配置

        主要设置计数事件和样本计数,以及计数的CPU模式(用户态、核心态)
       
        opcontrol --setup --event=CYCLES:1000::0:1

        则是设置计数事件为CYCLES,即对处理器时钟周期进行计数
        样本计数为1000,即每1000个时钟周期,oprofile 取样一次。
        处理器运行于核心态则不计数
        运行于用户态则计数

        --event=name:count:unitmask:kernel:user

      name:     event name, e.g. CYCLES or ICACHE_MISSES
      count:    reset counter value e.g. 100000
      unitmask: hardware unit mask e.g. 0x0f
      kernel:   whether to profile kernel: 0 or 1
      user:     whether to profile userspace: 0 or 1

c. 启动

        opcontrol --start


d. 运行待分析之程序

        ./ffmpeg -c cif -vcodec mpeg4 -i /root/paris.yuv paris.avi

e. 取出数据

        opcontrol --dump
        opcontrol --stop

f. 分析结果

        opreport -l ./ffmpeg


则会输出如下结果:

CPU: GODSON2E, speed 0 MHz (estimated)
Counted CYCLES events (Cycles) with a unit mask of 0x00 (No unit mask) count 10000
samples  %        symbol name
11739    27.0148  pix_abs16_c
6052     13.9274  pix_abs16_xy2_c
4439     10.2154  ff_jpeg_fdct_islow
2574      5.9235  pix_abs16_y2_c
2555      5.8798  dct_quantize_c
2514      5.7854  pix_abs8_c
2358      5.4264  pix_abs16_x2_c
1388      3.1942  diff_pixels_c
964       2.2184  ff_estimate_p_frame_motion
852       1.9607  simple_idct_add
768       1.7674  sse16_c
751       1.7283  ff_epzs_motion_search
735       1.6914  pix_norm1_c
619       1.4245  pix_sum_c
561       1.2910  mpeg4_encode_blocks
558       1.2841  encode_thread
269       0.6190  put_no_rnd_pixels16_c
255       0.5868  dct_unquantize_h263_inter_c

......


4. 例子

oprofile 可以分析处理器周期、TLB 失误、分支预测失误、缓存失误、中断处理程序,等等。
你可以使用 opcontrol --list-events 列出当前处理器上可监视事件列表。

下面分析一个编写不当的例子:


[带有cache问题的代码cache.c]
+++++++++++++++++++++++++++++++++++++++++++++++

int matrix[2047][7];


void bad_access()
{
    int k, j, sum = 0;

    for(k = 0; k < 7; k++)
        for(j = 0; j < 2047; j++)
            sum += matrix[j][k] * 1024;

}

int main()
{
        int i;

        for(i = 0; i< 100000; i++)
                bad_access();

        return 0;

}

+++++++++++++++++++++++++++++++++++++++++++++++


编译之: gcc -g cache.c -o cache


使用oprofile 分析之:

opcontrol --init

opcontrol --setup --event=DCACHE_MISSES:500::0:1

opcontrol --start && ./cache && opcontrol --dump && opcontrol --stop


使用 opannotate 分析结果为:

/*
* Command line: opannotate --source ./cachee
*
* Interpretation of command line:
* Output annotated source file with samples
* Output all files
*
* CPU: GODSON2E, speed 0 MHz (estimated)
* Counted ICACHE_MISSES events (Instruction Cache misses number ) with a unit mask of 0x00 (No unit mask) count 500
*/
/*
* Total samples for file : "/comcat/test/pmc.test/cachee.c"
*
*     34 100.000
*/


               :int matrix[2047][7];
               :
               :void bad_access()
               :{ /* bad_access total:     33 97.0588 */
               :    int k, j, sum = 0;
               :
               :    for(k = 0; k < 7; k++)
    33 97.0588 :        for(j = 0; j < 2047; j++)
               :            sum += matrix[j][k] * 1024;
               :
               :}
               :
               :int main()
               :{ /* main total:      1  2.9412 */
               :    int i;
               :
     1  2.9412 :    for(i = 0; i< 10000; i++)
               :                bad_access();
               :
               :    return 0;
               :
               :}
               :


opreport 解析的结果为:

GodSonSmall:/comcat/test/pmc.test# opreport -l ./cache
CPU: GODSON2E, speed 0 MHz (estimated)
Counted ICACHE_MISSES events (Instruction Cache misses number ) with a unit mask of 0x00 (No unit mask) count 500
samples  %        symbol name
33       97.0588  bad_access
1         2.9412  main

可以看到bad_access() cache miss 事件的样本共有33个,占总数的97%


改进 bad_access() 为 good_access() 后:

void good_access()
{
    int k, j, sum = 0;

    for(k = 0; k < 2047; k++)
        for(j = 0; j < 7; j++)
            sum += matrix[k][j] * 1024;

}


CPU: GODSON2E, speed 0 MHz (estimated)
Counted ICACHE_MISSES events (Instruction Cache misses number ) with a unit mask of 0x00 (No unit mask) count 500
samples  %        symbol name
22       95.6522  good_access
1         4.3478  main

可以看到改进后 cache miss 事件的样本减少为22个,占总数的95%
DSP篇--C6678功能调试系列之SPI调试 SPI传输数据分为线上直接收发和通过EDMA的数据传输两种。第一种是直接将数据放在线上(SPIDAT1),在寄存器(SPIBUF)中写入命令实现数据的收发;第二种需要配置EDMA,将数据buffer直接作为EDMA的数据源进行传输,其需要配置的参数和中断与EDMA一致。 阅读详情

相关推荐

常学常新:《Attention Is All You Need》万字解读!

常学常新:《Attention Is All You Need》万字解读!

hunteritself的博客 3688

使用oprofile分析性能瓶颈

使用oprofile分析性能瓶颈1. 概述oprofile 是 Linux 平台上,类似 INTEL VTune 的一个功能强大的性能分析工具。其支持两种采样(sampling)方式:基于事件的采样(event based)和基于时间的采样(time based)。基于事件的采样是oprofile只记录特定事件(比如L2 cache miss)的发生次数,当达到

虚拟化开发 704

AI驱动的iOS逆向工程自动化:14阶段工作流与Ghidra集成实践

逆向工程是软件安全分析的核心技术,通过反汇编、调试等手段解析程序内部逻辑与数据流。其原理在于将编译后的二进制代码还原为可理解的逻辑结构,从而发现潜在漏洞或理解软件行为。在移动安全领域,iOS逆向工程具有重要技术价值,能够用于安全审计、漏洞挖掘与恶意软件分析。传统iOS逆向依赖ipsw、class-dump、Frida等工具链组合,存在学习曲线陡峭与流程碎片化问题。本文介绍的ios-reverse-skills项目创新性地将14阶段逆向工程方法论封装为AI可调用的标准化脚本集,通过Ghidra脚本实现Swif

weixin_27268733的博客 446

Oprofile性能分析工具

OProfile介绍 OProfile是Linux系统的性能分析工具,是一个开源的profiling工具,使用性能计数器来统计信息,能够以非常低的代价剖析程序性能,而且可以对内核进行profiling。它统计的信息非常的多,可以得到cache的缺失率,memory的访存信息,分支预测错误率等。主要支持x86、power处理器,已经移植到龙芯系列处理器,包括龙芯2F、龙芯3A、龙芯3B等。OPro

yarsen的专栏 1824

MATLAB Appdesigner开发独立桌面App全流程(一):以打开串口功能为例介绍Appdesigner的基本使用

本文详细介绍了Appdesigner的基本使用,以串口功能为例介绍按钮回调函数的实现以及控件之间通信的问题

Zhuwany的博客 3万+

Cadence OrCAD Capture 保持元器件编号情况复制元件,复制后元器件编号与复制前不同的问题解决

如下图所示复制时,已经勾选了“Preserve reference on copy”但是复制后的编号却与复制前不一样。本文简单介绍其原因及解决方法。

fydar的博客 3173

Linux 平台上的 Oprofile 性能分析工具

http://blog.csdn.net/wlsfling/article/details/5876134 内容概要        1.oprofile介绍        2.oprofile安装及Linux内核编译        3.oprofile使用       一、oprofile 介绍        oprofile 是 Linux 平台上,类似 INTEL VTune

1687

C#实现网络寻路(附完整源码)

C#实现网络寻路(附完整源码)

希望我的博客,能帮上你解决学习中工作中所遇到的问题 431

linux下vtune使用

安装:http://www.cnblogs.com/jiu0821/p/5943533.html 终端输入amplxe-gui,打开vtune界面。 点击new project,进入project properties界面。进行配置: target:target type选择launch application,application选择程序可执行文件,application paramet...

weixin_33730836的博客 3224

01-系统技术架构师必备——软件架构设计基础与核心概念

摘要 本文系统阐述了软件架构设计的核心概念与方法论,重点涵盖以下内容:1)软件架构的四大要素(构件、连接件、约束、配置)及其边界划分;2)Garlan & Shaw五大架构风格(数据流、调用/返回、独立构件、虚拟机、仓库)的典型应用场景;3)基于电商库存系统的架构选型实战案例,展示如何根据业务需求(高并发、最终一致性)选择事件驱动架构配合Saga模式;4)介绍ABSD、DSSA等主流架构方法论及ISO/IEEE标准体系。文章融合金融与互联网领域的架构实践经验,为技术架构师提供系统性的知识框架和决策参考。

模界 | AI工程化实践者 202

多物理场光学仿真软件:Lumerical_(15).多物理场耦合仿真案例分析

在多物理场光学仿真中,Lumerical 软件提供了强大的工具来模拟复杂的光学系统,包括光子学、热学、力学和电学等多物理场的耦合。本节将通过具体的案例分析,展示如何在 Lumerical 中进行多物理场耦合仿真的开发和实现。我们将从简单的热光效应仿真入手,逐步深入到更复杂的多物理场耦合场景,如光电效应和光力学效应。每个案例都将包括详细的原理说明和具体的代码示例,帮助读者更好地理解和应用这些技术。

kkchenjj的博客 1028

Android性能测试工具--Oprofile

<br /> Android应用的性能如何测试?JAVA层面可以用TraceView,可是用NDK开发出来的是so,TraceView跟踪不了怎么办?问了Google大神,答案是OProfile!Oprofile 是Linux系统下一个低开销的系统全局的性能监视工具,利用处理器上所包含的专用的性能监视硬件(若没有性能监视硬件则使用一个基于计时器的代用品)来收集与性能相关的数据样品。它获得关于内核以及系统上的可执行文件的信息,例如内存是何时被引用的;L2缓存请求的数量;收到的硬件中断数量等。Oprofile的

旁门左道 4549

【OpenFOAM】-olaFlow-算例10-wavemakerTank

采用 Flap和Piston两种方式的动网格进行造波

ou_no的博客 2173

安装oprofile

折腾一下午,起初是系统版本低,安装更新了一下午,然后换了一个software 源,选择的是server china ,进行sudo apt-get install oprofile,才安装成功, 起初一直用的网易的源。     可以打入“whereis php”命令来显示程序的位置。 或者打入“locate php”命令来显示包含php的文件名或目录名及路径。       1.

2013--咱俩继续潜行。 2564

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

最新的sdio 4.0 spec 协议标准 带书签 高清完整PDF版

Part-E1-SDIO-Specification-Ver4.00-Final-120220.pdf:最新的sdio 4.0 spec 协议标准 带书签 高清完整PDF版,包括SDIO 接口的外设,SDIO 接口官方协议等。

Linux虚拟机上安装性能测试工具OProfile

OProfile是Linux平台支持的一款功能强大的性能分析工具。网络上很多关于如何安装在虚拟机上安装OProfile的文章,但很多都存在这样或那样的问题。现经本人整理和实验后,其在Linux上虚拟机上的安装过程如下: ①、安装虚拟机 为了保证虚拟机能够正常启动,在安装虚拟机的过程中,请将磁盘模式设置为IDE。否则,升级内核后,将会报"pci 18.2: no compatible bridg

做事先做人! 3806

IDEA的使用指南

IDEA基于java的使用手册,可以最快速的上手,在使用中不断的丰富自己的使用技巧.

性能测试工具Oprofile

Oprofile 简介   性能测试的神器。其结果最为准确,为什么呢?请看oprofile的测试原理。 其原理是:现在的很多 CPU都提供一个所谓性能计数器的东西(performance counter),大致的原理就是程序可以注册告诉CPU对什么event感

浮白 8235

OV9734 DATASHEET,完整规格书

OV9734完整规格书,包括电气参数,尺寸规格,寄存器配置表等

oProfile

oProfile的安装与使用 2012-03-28 20:18:20 分类: LINUX 0.引言 基于DPDK的发包工具的性能今天已经达到双向1900Wpps了,比昨天又高了200Wpps,正是得益于oProfile检测与调优的结果,而且今天还只是很简单的用了一下(类似于下面的示例),跟踪出对几个结构体字段的访问比较缓慢,于是对结构体字段进行了仔细的顺序调整与Cache对

xu_ya_fei的专栏 512

应用OProfile作性能测试(1)

评测 是表示不同性能特性和特征的数据的形式化总结或分析,它通常以图形和表的形式的出现。评测表提供为特定的处理器事件收集的采样的百分数或数量,比如高速缓存线路故障的数量、传输后备缓存( TLB )故障的数量,等等。 Oprofile 是用于 Linux 的若干种评测和性能监控工具中的一种。它可以工作在不同的体系结构上,包括 IA32, IA64 和 AMD Athlon 系列。它的开销小,将被包含在(Linux)2.6 版的内核中。Oprofile可以帮助用户识别诸如循环的展开、高速缓存的使用率低、低效的类型

我本书生 1013

性能测试:oprofile的学习使用

一、oprofile简介 Oprofile是linux上的性能监测工具,有人说是性能测试的神器。通过CPU硬件提供的性能计数器对事件进行采样,从代码层面分析程序的性能消耗情况,找出程序性能的问题点。 oProfile是Linux平台上的一个功能强大的性能分析工具,支持两种采样(sampling)方式:基于事件的采样(eventbased)和基于时间的采样(timebased)。 基...

weixin_30849591的博客 1234

OProfile在Andorid上使用

OProfile作为一个Linux的工具,可以分析kernel和应用的性能。因此如何将OProfile应用于Android对于发现并解决Android的性能具有很重要的意义。本文以下将介绍如何在Android上应用OProfile。

Sunny的小窝 5269

Android移植oprofile性能监测工具

Android移植oprofile性能监测工具 关于oprofile的移植,在Ubuntu Server 10.04平台上交叉编译,移植到Android,经过实践,以下是交叉编译的正确步骤,不保证在其他环境中能正确运行,以下是编译环境: build: Ubuntu Server 10.04 host: Android-2.2r2 cross compiler: mips-lin

gzshun 4894

c++性能测试工具——Oprofile的使用

本文介绍了Linux系统性能测试工具Oprofile及其使用方法。Oprofile是一个低开销、跨平台的性能分析工具,新版本使用operf替代opcontrol,支持用户态和内核态数据采集。文章详细说明了安装方法(apt-get安装)和operf的使用命令格式,包括分析指定进程、系统范围分析等选项,并给出具体示例演示如何采集进程性能数据及生成报告。最后指出Oprofile虽功能强大且跨平台支持良好,但在不同硬件平台上使用时需注意可能的依赖差异。全文提供了从安装到实际应用的完整指南。

fpcc的专栏 301

oprofile5

Oprofile 简介   性能测试的神器。其结果最为准确,为什么呢?请看oprofile的测试原理。 其原理是:现在的很多 CPU都提供一个所谓性能计数器的东西(performance counter),大致的原理就是程序可以注册告诉CPU对什么event感兴趣(比如CPU_CYCLE,CPU经历了一次时钟周期),然后CPU在执 行了相应的操作后,就会在性能计数器上加1,这样

cybertan的专栏 2791

Linux性能测试工具:Oprofile, KFT, Gprof

Linux性能测试工具:Oprofile, KFT, Gprof  (2011-11-02 14:19:44) 转载▼ 标签:  杂谈 分类: 服务器设计 性能测试工具一般分这么几种 1)收集CPU的performance counter。CPU里面有很多performance counter,打开 之后,会记录CPU某些事件

kyokowl的专栏 1511

oProfile的安装与使用

0.引言 基于DPDK的发包工具的性能今天已经达到双向1900Wpps了,比昨天又高了200Wpps,正是得益于oProfile检测与调优的结果,而且今天还只是很简单的用了一下(类似于下面的示例),跟踪出对几个结构体字段的访问比较缓慢,于是对结构体字段进行了仔细的顺序调整与Cache对齐(之前急于功能实现,没顾及这些字段的排布),结果性能马上飙升了200Wpps,开心死我了。后天(明天外出办理其

SdustLiYang的专栏 2258
上一篇: 应用OProfile作性能测试(1)
下一篇: 十年学会编程---聆听前辈的声音
stanjiang2010
博客等级 码龄17年 153粉丝 62原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值