Oprofile 移植到Android

2025年(第十一届)全国大学生统计建模大赛论文及选题分析 基于数据驱动决策:整个研究围绕给定的洪水灾害相关数据进行深入挖掘和分析,从数据清洗、特征分析、模型建立到最终预测,每一步都以数据为基础,通过对数据的有效利用来揭示洪水灾害发生的相关规律和特征,为洪水灾害的风险评估和预测提供依据,符合数据引领未来决策的理念。实际应用导向:洪水灾害是现实中严重影响人类生命财产安全和社会经济发展的重要问题,本研究旨在实现对洪水灾害的预测,其成果可直接应用于防洪减灾工作,如洪水预警、风险评估与区划等,对实际防灾减灾工作具有重要的指导意义,体现了以数据为支撑服务实际应用的特点。 阅读详情
Oprofile 移植

工具的编译参考
http://blog.csdn.net/louieuser/article/details/6152175

工具使用:
1.创建一个AVD,启动模拟器时,用我们编译好的kernel替换SDK自带的kernel
C:\Users\maricoliu>emulator @android2.3 -partition-size 300 -kernel ~\kernel-qemu
注:由于要向系统中push我们的程序,请分配足够的大小,否则会出现no space left on device错误,用-partition-size指定大小

2.安装busybox,Oprofile
将我们编译好的busybox和Oprofile装入模拟器
进入adb shell中,创建两个文件夹
#mkdir /data/busybox
#mkdir /data/oprofile
在控制台执行如下命令:
C:\Users\maricoliu>adb push ~\busybox /data/busybox/
Oprofile工具只要将以op开头的文件装入模拟器就可以:
C:\Users\maricoliu>adb push ~\oprofile\opcontrol /data/oprofile/
C:\Users\maricoliu>adb push ~\oprofile\opannotate /data/oprofile/
……(其余不再列出)
回到shell中,安装busybox,增加Oprofile文件的执行权限
#cd /data/busybox
#chmod 777 busybox
#./busybox –install busybox
#cd /data/oprofile
#chmod 777 op*

3.运行Oprofile
#export PATH=$PATH:/data/busybox
#export PATH=$PATH:/data/oprofile
# mount -o remount rw /
# mount -o rw,remount -t yaffs2 /dev/mtdblock3 /system
#ln -s /proc/mounts /etc/mtab  (建立一个软连接,后面有说明)
# opcontrol --init     //初始化,只需运行一次
# opcontrol --setup --callgraph=2 --session-dir=/result/ --no-vmlinux
# opcontrol --start
opcontrol --start
Using 2.6+ OProfile kernel interface.
Using log file /result/samples/oprofiled.log
Daemon started.
Profiler running.
# opcontrol --status
opcontrol --status
Daemon running: pid 773
Separate options: none
vmlinux file: none
Image filter: none
Call-graph depth: 2

运行你的程序

# opcontrol --dump   //收集采样数据
# opcontrol --stop //停止profiler
Stopping profiling.
#opreport --session-dir=/result/       //查看报告


遇到的问题:
1.出现错误 :

test: not found
id: not found
test: not found
grep: not found
test: not found
grep: not found
test: not found
…………

这是由于 Android 提供的命令过于精简,因此需要移植 busybox ,来运行 opcontrol 。按照上面的步骤安装busybox后,任然出现此错误,google后得知,要修改 opcontrol 文件如下:
BINDIR =”/data/busybox”
PATH 中加入 /data/busybox
查看opcontrol源码后发下未加入/data/busybox,现以加入

2.出现错误
./opcontrol --init
grep: /etc/mtab: No such file or directory
grep: /etc/mtab: No such file or directory
Kernel support not available, missing opcontrol --init as root

# touch /etc/mtab
# ./opcontrol  --init
Kernel support not available, missing opcontrol --init as root ?

通过对 opcontrol 的分析发现它是通过对执行" grep oprofile /proc/modules >/dev/null " 的返回值为判断条件还进行操作的,开始由于 mtab 文件里没有 oprofile 的相关信息,所以要执行 "mount -t oprofilefs nodev /dev/oprofile >/dev/null" 而linux 标准文件系统在执行了此命令之后将会与之相关的 mount 信息写入 /etc/mtab 中,而执行了umount 之后相关信息将从/etc/mtab文件中删除,而通过相关的操作之后发busybox系统中的 mtab 文件并无任何改变,通过google 之后知道原来新的busybox 使用 /proc/mounts 代替了 /etc/mtab,故在/etc 下建一个指 /proc/mounts 名为 mtab 的链接就绕过这个问题    

# ln –s /proc/mounts /etc/mtab
可能会遇到link failed file exists错误,请确保/etc/目录下面没有mtab文件,有的话删除
 
工具在本人csdn上传资源中。
统信UOS1070批量整机备份安装标准化方案 Linux整机备份是政企级操作系统交付的核心能力,其本质是将系统状态、硬件适配、安全策略与部署流程在启动阶段原子化固化。基于内核overlayfs与initrd可编程机制,Ventoy实现了ISO镜像与定制配置的解耦部署,显著提升UOS专业版1070在多机型环境下的兼容性、可审计性与复现一致性。该方案规避传统克隆工具的镜像膨胀、硬件绑定和策略注入失效等缺陷,适用于无网、高合规、强管控场景,广泛支撑政务终端、教育机房及金融网点的规模化交付。 阅读详情

相关推荐

SV--对象拷贝、参数化的类

对象拷贝,参数化的类

创芯人--fly的博客 1573

Android 移植oprofil性能监测工具

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

jishublog 169

AIDC储能技术:AI数据中心的高效能源解决方案

储能技术作为现代数据中心的核心支撑系统,通过电化学能量存储与释放实现电力供需平衡。其核心原理在于利用电池管理系统(BMS)实现毫秒级响应,配合光伏等可再生能源构成光储融合系统。在AI算力爆发的背景下,AIDC储能系统展现出三大技术价值:应对脉冲式电力需求、保障供电连续性、提升绿色能源占比。典型应用场景包括大模型训练中心、超算设施等对电力质量要求苛刻的环境。当前行业聚焦10C超高倍率电芯和直流侧耦合架构等创新方案,其中磷酸铁锂电池凭借三维极耳设计和液冷系统等技术突破,成为AIDC储能的主流选择。

weixin_29189377的博客 127

Android上oprofile使用说明

Android上oprofile使用说明 1.    目的 本文介绍了oprofile的功能并基于Android 2.1介绍了使用oprofile的基本方法和步骤。本文的读者为软件开发人员和白盒测试人员。 2.    oprofile简介 Oprofile是用于Linux的若干种评测和性能监控工具中的一种,它可以工作在不同的体系结构上,包括IA32、IA64、AMDAthlon系列及ARM

正在學習Android~ 1548

mysql8.0安装及配置超详细教程_mysql-8.0.15-winx64

MySQL8.0配置教程, 全网最详,同时有本地mysql和小皮系统见另一篇

小诺言的博客 2万+

保姆级教程:用NodeMediaClient在Android实现RTMP拉流播放(附避坑指南)

本文提供了一份详尽的Android平台RTMP拉流播放实现与深度调优指南。重点介绍了如何使用NodeMediaClient库进行集成,并针对视频卡顿、花屏等常见问题,从渲染引擎选择(SurfaceView与TextureView)、解码策略、缓冲区优化到高级网络自适应等方面提供了实战解决方案与避坑技巧。

weixin_29261711的博客 445

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

AD24层次原理图设计避坑指南:如何解决端口连接与自动交叉引用问题

本文深入解析AD24层次原理图设计的核心机制,聚焦端口连接错误、自动交叉引用干扰等常见问题。通过对比自上而下与自下而上设计流程,提供端口类型匹配、命名规范等实用解决方案,并指导如何关闭烦人的红色框线视觉干扰,帮助工程师高效避坑,实现复杂系统的模块化设计。

wdx01234567的博客 623

Android性能测试工具--Oprofile

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

旁门左道 4549

把 OData V4 服务真正发布出去:事务码 /IWFND/V4_ADMIN 在 SAP S/4HANA On-Premise 里的定位与用法

本文介绍了SAP S/4HANA中的事务码/IWFND/V4_ADMIN,这是SAP Gateway管理OData V4服务的关键工具。该事务码主要负责将后端注册的OData V4服务以服务组形式发布到前端,并维护系统别名路由、测试入口和日志跳转。与OData V2不同,V4采用服务组概念以支持跨服务导航,类似商场统一管理多个专柜。文章还通过实际案例说明,未发布服务组会导致BAS等工具无法发现OData V4服务,并提供了验证服务组状态的访问路径和ABAP示例代码。

2007 年 ~ 2025 年,深耕 SAP 技术 18 年 221

使用virtuoso gds转lef操作方法

2) 然后,需要创建Pin,这里Pin的概念不同于label/text,是有实际金属的,二者的区别类似于pr中的port和terminal。1) 首先,需要画prBoundary,这个用drawing层的prBoundary画是不行的,不过建议pr阶段就把prBoundary转到gds里,在virtuoso layout中画prBoundary就比较容易。另外,用Create - Create Pin也可以创建pin,更适用于PG pin,操作时先给pg shape打label,最好放正中间。

m0_61544122的博客 1395

android 手机性能测试工具,Android手机系统的性能测试工具

Android手机系统的Android应用的性能如何测试?JAVA层面可以用TraceView,可是用NDKOprofile 是Oprofile的特点如下:l 无需重新编译源代码,如果不进行源代码及分析,连调试信息(-g option to gcc)也不是必须的。l 只在内核中插入一个模块。l 可以分析运行于系统之上的所有代码(禁用中断的代码除外)l 系统的额外开销小,Oprofile会增加1%-...

weixin_35805266的博客 1189

halcon第二讲:焊点提取

本文要完成的任务是将下图中焊点提取出来,对应于halcon例程Blob分析中的ball.hdev。 dev_open_window (0, 0, 512, 512, 'black', WindowHandle) read_image (Image, 'die_03.png') disp_continue_message (WindowHandle, 'black', 'true') sto...

qq_24946843的博客 7176

附录1:Oprofile移植到intel xscale pxa 255开发板

一、 相关资源 根据Oprofile的官方网站,可知需要安装的库。 Required libraries :These libraries are required : popt, bfd, liberty (debian users: libiberty is provided in binutils-dev package), dl, plus the standard C++ libra

Kasmile的专栏 5457

Devexpress16.2.6破解工具

Devexpress16.2.6破解工具Devexpress16.2.6破解工具Devexpress16.2.6破解工具Devexpress16.2.6破解工具

深度学习工具包 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")

Android的性能分析——contents

  Android的性能分析... 1 一、 基本信息:... 1 二、 实验内容简要描述... 2 1. 实验目的... 2 2. 实验内容... 2 3. 实验条件... 2 三、 实验原理... 2 1. Android相关介绍... 2 2. Dalvik相关介绍... 3 3. Oprofile相关介绍... 4 四、 实验过程与结果

Kasmile的专栏 6408

汉书HE8,好用的汇编代码编写工具

汉书HE8,好用的汇编代码编写工具早期编写汇编代码所用功能强大

oprofile 在android中的交叉编译及使用方法1

转载 1 oprofile 相关介绍 Oprofile是用于Linux的若干种评测和性能监控工具中的一种。它可以工作在不同的体系结构上,包括IA32、IA64和AMD Athlon 系列。它的开销小,将被包含在(Linux)2.6版的内核中。               Oprofile可以帮助用户识别诸如循环的展开、高速缓存的使用率低、低效的类型转换和冗余操作、错误预测转移等问题。它收集有

王世宏的专栏 802

lwip-2.0.3

lwip是瑞典计算机科学院(SICS)的Adam Dunkels 开发的一个小型开源的TCP/IP协议栈。实现的重点是在保持TCP协议主要功能的基础上减少对RAM 的占用。

Android性能测试工具

Android应用的性能如何测试?JAVA层面可以用TraceView,可是用NDK开发出来的是so,TraceView跟踪不了怎么办?问了Google大神,答案是OProfile! Oprofile 是Linux系统下一个低开销的系统全局的性能监视工具,利用处理器上所包含的专用的性能监视硬件(若没有性能监视硬件则使用一个基于计时器的代用品)来收集与性...

weixin_33841722的博客 63

Oprofile在Android中的应用

分类: Android2010-08-13 16:00 1428人阅读 评论(0) 收藏 举报 1 oprofile 相关介绍 Oprofile 是用于 Linux 的若干种评测和性能监控工具中的一种。它可以工作在不同的体系结构上,包括 IA32 、 IA64 和 AMD Athlon 系列。它的开销小,将被包含在( Linux ) 2.6 版的内核中。

xiayu98020214的专栏 1282

oprofle在android中的交叉编译及使用3

转载 Android应用的性能如何测试?JAVA层面可以用 TraceView,可是用NDK开发出来的是so,TraceView跟踪不了怎么办?问了Google大神,答案是OProfile! Oprofile 是Linux系统下一个低开销的系统全局的性能监视工具,利用处理器上所包含的专用的性能监视硬件(若没有性能监视硬件则使用一个基于计时器的代用品)来 收集与性能相关的数据样品。它获得关于内核

王世宏的专栏 318
上一篇: How to get root privileges?
下一篇: ubuntu下搭建NDK环境
code_farmer
博客等级 码龄22年 9粉丝 23原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值