本文转自:http://blog.csdn.net/innost/article/details/9008691
在软件开发过程中,想必很多读者都遇到过系统性能问题。而解决系统性能问题的几个主要步骤是:
- 测评:对系统进行大量有针对性的测试,以得到合适的测试数据。
- 分析系统瓶颈:分析测试数据,找到其中的hotspot(热点,即bottleneck)。
- 性能优化:对hotspot相关的代码进行优化。
由上述步骤可知,性能优化的目标对象是hotspot。如果找到的hotspot并非真正的热点,则性能优化的结果必然是事倍功半甚至竹篮打水一场空。所以,作为Android性能调优相关知识的第一部分,本篇首先将向读者介绍Android平台中三个重要的性能测试工具,它们能很好得帮助开发者找到hotspot。
一Traceview介绍
1.1 Traceview简介
Traceview是Android平台特有的数据采集和分析工具,它主要用于分析Android中应用程序的hotspot。Traceview本身只是一个数据分析工具,而数据的采集则需要使用Android SDK中的Debug类或者利用DDMS工具。二者的用法如下:
- 开 发者在一些关键代码段开始前调用Android SDK中Debug类的startMethodTracing函数,并在关键代码段结束前调用stopMethodTracing函数。这两个函数运行过 程中将采集运行时间内该应用所有线程(注意,只能是Java线程)的函数执行情况,并将采集数据保存到/mnt/sdcard/下的一个文件中。开发者然 后需要利用SDK中的Traceview工具来分析这些数据。
- 借助Android SDK中的DDMS工具。DDMS可采集系统中某个正在运行的进程的函数调用信息。对开发者而言,此方法适用于没有目标应用源代码的情况。DDMS工具中Traceview的使用如图1-1所示。
Android Project Butter分析“一文。
相关推荐
FTrace is a relatively new kernel tool for tracing function execution in the Linux kernel. Recently, FTrace added the ability to trace function exit in addition to function entry. This allows for ...
开源项目-evilsocket-ftrace.zip,Go library to trace syscalls using the FTRACE kernel framework.
Introduction to Ftrace Adding function graph tracing to ARM Duration Filtering − Optimizing the discard operation Post-trace analysis tools Performance impact Resources
One of the difficult tasks analyzing Real-... Ftrace also has a rich array of tracing features that can help determine if latencies are caused by the kernel, or simply are a bi-product of an application
ftrace-kernel-hooks-2014-More than just tracing.pdf | 注释
ftrace-kernel-hooks-2014-More than just tracing.pdf
One of the difficult tasks analyzing Real-... Ftrace also has a rich array of tracing features that can help determine if latencies are caused by the kernel, or simply are a bi-product of an application.
介绍Linux Ftrace的入门级读物; 介绍Linux Ftrace的入门级读物; 介绍Linux Ftrace的入门级读物; 介绍Linux Ftrace的入门级读物; 介绍Linux Ftrace的入门级读物;
ftrace-hook Linux内核模块演示了如何使用ftrace框架进行函数挂钩:就像在挂钩函数周围执行任意代码一样。 该代码已根据许可。 如何建造 请考虑使用虚拟机(VirtulBox,VMWare,QEMU等)进行实验。 (不变的)模块...
Ftrace Kernel Hooks-More than just tracing.pdf
工具跟踪促进Linux ftrace工具的执行和后处理
国外牛人讲解的linux containers,图文并茂,便于理解linux container实现
注: android版本为4.4.3,代码编号为KTU84m(google官方代码), 内核为msm,分支为android-msm-hammerhead-3.4-kitkat-mr2。 cg-ftracer在清华大学部署实例 服务器、客户端的概念: 关系:实际上都是服务器,一台...
Daniel Jslin教授分析linux kernel 中的start_kernel详细过程。by the way.可以关注我在csdn上关于linux kernel的课程https://edu.csdn.net/course/detail/9089
linux追踪器ftrace使用合集 很全的 详细介绍
FTRACE 抓取手机trace,连接手机后打开需要抓取的场景,使用文档内指令抓取,trace保存在同级目录trace.txt
ftrace - 简单函数调用示踪器
What you will learn, Understand the role of the Linux kernel and select an appropriate role for your applicationUse Buildroot and Yocto to create embedded Linux systems quickly and efficientlyCreate ...
Linux ftrace和perf_events(又称“ perf”命令)的各种开发中和不受支持的性能分析工具。 ftrace和perf都是内核源代码中包含Linux核心跟踪工具。 您的系统可能已经有ftrace,并且perf通常只是一个软件包添加(请...
ftrace的源代码,可以跟踪linux 内核