性能优化:抓取开机trace给perfetto分析--Recording traces on Android boot

告别ADB连接!Perfetto无接触式开机trace采集全攻略(Android 10+通用版) 本文详细介绍了在Android 10及以上系统中,如何利用Perfetto实现无需ADB连接的开机性能trace采集。通过配置系统属性与优化采集策略,开发者可以自动获取完整的设备启动轨迹,有效解决传统调试方法在早期启动阶段无法连接、数据丢失的痛点,为嵌入式与移动端性能优化提供强大支持。 阅读详情
AI摘要

本文介绍在Android 13及以上版本中,通过配置perfetto boottrace实现开机过程全自动Trace采集的方法。重点包括定制化boottrace.pbtxt配置文件(支持指定tags、延长采样时长、启用Android日志)、将配置文件推送至/data/misc/perfetto-configs/、启用perfetto_trace_on_boot服务,以及重启后通过Perfetto Web UI导入和分析boottrace.perfetto-trace文件,解决传统adb连接延迟导致无法捕获完整开机Trace的性能优化痛点。

背景:

经常在做性能优化时候,可能会有一个开机时间优化的题目,对于这个题目我们有一个比较明显的痛点:
想要抓取开机启动整个过程的trace,放到perfetto上进分析,但是发现开机过程中无法连接上设备,没办法抓到完整的trace,所以perfetto无法分析出整个开机过程。
那么有没有方法可以不需要依赖adb这种连接设备方式抓取,而是系统开机自己就会智能抓取相关的trace呢?
针对上面的痛点,google在andorid 13上就已经有解决哈
在这里插入图片描述下面来教大家解决这个痛点。

步骤1:

准备好一个config文件,主要用于配置perfetto抓取时候的相关配置,比如要抓哪些tag等,是否也抓取日志等,这个配置官网给了一个最简单的版本

# One buffer allocated within the central tracing binary for the entire trace,
# shared by the two data sources below.
buffers {
  size_kb: 32768
  fill_policy: DISCARD
}

# Ftrace data from the kernel, mainly the process scheduling events.
data_sources {
  config {
    name: "linux.ftrace"
    target_buffer: 0
    ftrace_config {
      ftrace_events: "sched_switch"
      ftrace_events: "sched_waking"
      ftrace_events: "sched_wakeup_new"

      ftrace_events: "task_newtask"
      ftrace_events: "task_rename"

      ftrace_events: "sched_process_exec"
      ftrace_events: "sched_process_exit"
      ftrace_events: "sched_process_fork"
      ftrace_events: "sched_process_free"
      ftrace_events: "sched_process_hang"
      ftrace_events: "sched_process_wait"
    }
  }
}

# Resolve process commandlines and parent/child relationships, to better
# interpret the ftrace events, which are in terms of pids.
data_sources {
  config {
    name: "linux.process_stats"
    target_buffer: 0
  }
}

# 10s trace, but can be stopped prematurely via `adb shell pkill -u perfetto`.
duration_ms: 10000

把上面的文本内容拷贝保存成boottrace.pbtxt文件。
但是说明一下上面的官方给的基本上抓到的trace没办法分析,主要有以下几个问题:
1、抓到trace没有任何的tag,所以分析也就没有任何意义
2、抓取的时间比较短,内存也比较小
3、抓取trace没有android log,不方便和log结合分析

所以整改后的config如下:

buffers {
  size_kb: 65536
  fill_policy: DISCARD
}
buffers {
  size_kb: 4096
  fill_policy: DISCARD
}
data_sources {
  config {
    name: "linux.ftrace"
    ftrace_config {
      ftrace_events: "sched/sched_process_exit"
      ftrace_events: "sched/sched_process_free"
      ftrace_events: "task/task_newtask"
      ftrace_events: "task/task_rename"
      ftrace_events: "sched/sched_switch"
      ftrace_events: "power/suspend_resume"
      ftrace_events: "sched/sched_blocked_reason"
      ftrace_events: "sched/sched_wakeup"
      ftrace_events: "sched/sched_wakeup_new"
      ftrace_events: "sched/sched_waking"
      ftrace_events: "sched/sched_process_exit"
      ftrace_events: "sched/sched_process_free"
      ftrace_events: "task/task_newtask"
      ftrace_events: "task/task_rename"
      ftrace_events: "power/cpu_frequency"
      ftrace_events: "power/cpu_idle"
      ftrace_events: "power/suspend_resume"
      ftrace_events: "ftrace/print"
      atrace_categories: "adb"
      atrace_categories: "aidl"
      atrace_categories: "am"
      atrace_categories: "audio"
      atrace_categories: "binder_driver"
      atrace_categories: "binder_lock"
      atrace_categories: "bionic"
      atrace_categories: "database"
      atrace_categories: "gfx"
      atrace_categories: "hal"
      atrace_categories: "input"
      atrace_categories: "pm"
      atrace_categories: "power"
      atrace_categories: "res"
      atrace_categories: "ss"
      atrace_categories: "view"
      atrace_categories: "wm"
      disable_generic_events: true
    }
  }
}
data_sources {
  config {
    name: "linux.process_stats"
    process_stats_config {
    }
  }
}
data_sources {
  config {
    name: "linux.sys_stats"
    sys_stats_config {
      stat_period_ms: 500
      stat_counters: STAT_CPU_TIMES
      stat_counters: STAT_FORK_COUNT
      cpufreq_period_ms: 500
    }
  }
}
duration_ms: 30000

同样用上面内容保存到boottrace.pbtxt文件。

步骤2

push boottrace.pbtxt文件到/data/misc/perfetto-configs/boottrace.pbtxt

adb push <yourfile> /data/misc/perfetto-configs/boottrace.pbtxt

步骤3

使能相关属性
Enable the perfetto_trace_on_boot service

adb shell setprop persist.debug.perfetto.boottrace 1

这个属性设置以后就可以在下一次开机会自动抓取到perfetto相关trace文件

步骤4

重启设备,获取perfetto的trace文件
执行 adb reboot命令
等待20s,然后等系统桌面显示完整后

adb pull /data/misc/perfetto-traces/boottrace.perfetto-trace

打开
https://ui.perfetto.dev
网站导入boottrace.perfetto-trace进行分析:
在这里插入图片描述

官方链接参考:
https://perfetto.dev/docs/case-studies/android-boot-tracing

点云去噪:基于点云拟合的方法 点云处理是计算机视觉中的重要任务之一,而点云去噪是点云处理的关键步骤之一。在实际应用中,由于采集设备的噪声、运动估计误差或者环境干扰等因素,点云数据中常常包含有噪声点,这些噪声点会对后续的点云分析和处理造成不良影响。一种简单的方法是计算点到拟合曲面的距离,并将距离超过某个阈值的点定义为噪声点,进行过滤。一种简单的方法是计算点到拟合曲面的距离,并将距离超过某个阈值的点定义为噪声点,进行过滤。该方法通过拟合点云数据的曲面模型,对噪声点进行识别和过滤,从而得到更加干净的点云数据。 阅读详情

相关推荐

手把手教你用Simulink+CANoe+Carsim搭建硬件在环仿真环境(避坑指南)

本文是一份详细的硬件在环仿真环境搭建指南,重点讲解如何将Simulink、CANoe和CarSim三大工具进行实战融合。内容涵盖软件版本兼容性、授权避坑、环境配置,并分步演示了从离线联合仿真到实现软实时同步的完整流程,旨在帮助汽车电子工程师高效构建稳定的HIL测试平台。

weixin_29092579的博客 412

抓开机trace的方法

https://source.android.com/devices/tech/perf/boot-timessystrace 允许在启动期间收集内核和 Android 跟踪记录。systrace 的可视化可以帮助分析启动过程中的具体问题。(不过,如果要查看整个启动过程中的平均数量或累计数量,直接查看内核跟踪记录更为方便)。如需在启动过程中启用 systrace,请执行以下操作:在 frameworks/native/cmds/atrace/atrace.rc 中,更改以下行: 更改为: 这将启用跟踪功能(

知难行易 2165

Python量化交易实战:pytdx库高效获取通达信分笔成交数据

本文详细介绍了如何使用Python的pytdx库高效获取通达信分笔成交数据,为量化交易提供关键市场微观结构分析。通过环境搭建、服务器连接、数据获取与清洗的完整流程,帮助开发者快速掌握这一免费高质量数据源,并实现分笔数据的实战分析与应用。

weixin_29061509的博客 1382

Trace 抓取

notes

qq_33942765的博客 3305

搭建ipv6并发代理池

我开了个知识星球,把将本期搭建写成shell脚本已放到了里面,有需要的小伙伴可以自行去取,jd的参数,阿里bxet纯算、快手滑块,Pdd—Anti,ikuai,b站login之-极验3文字,某音ab,瑞数456vmp补环境等等,主要是某些大佬加我问成品,很多人都打着白嫖的手段去加我好友为目的,问完基本就以后没有任何的交集,这样的交好友雀氏没有任何意义。不如我直接开个星球,里面直接放我逆向的成品以及逆向的思路,这样大家各取所需,我也有点收益,意义更明确点,免得浪费大家的时间。我是pve下的ubuntu。

weixin_44697518的博客 1477

C#操作MySQL从入门到精通(3)——新建数据库、新建表

我们要首先新建一个数据库,并且在数据库中新建一系列的表来管理数据库。

qq_34059233的博客 956

Android性能优化--Perfetto抓取trace

开启Android的trace跟踪服务; 使用 adb 抓取; 通过 perfetto 网页抓取; 直接在手机上抓取; 使用 record_android_trace 抓取; 熟悉 perfetto 快捷键,会有事半功倍效果;

分享Android应用和系统开发、音视频编码、性能优化相关知识 4577

【2026OD新机考】【不定滑窗】20260415-API请求日志去重分析【Py/Java/C++/C/JS/Go六种语言OD真题】【欧弟算法】全网注释最详细分类最全的华子OD真题题解

中找到所有的连续的相同元素,同时统计对应的连续相同元素对应的值的平均值。:当右指针为第一个元素(没有前一个元素),或者右指针对应的元素。某微服务系统的日志监控平台需分析API调用记录,日志含大量。相等,说明当前元素仍然属于同一个相同元素窗口,将当前元素值。中的所有元素均相等,并且计算窗口和情况即可。请实现一个函数,对给定的日志数据去重合并处理。位置,表示开启一个新的窗口,此时需要重置窗口和。,为了优化重复的请求记录,存储和后续分析需对。:对应的响应时间数组(毫秒)。重新置为当前右指针的元素值。

weixin_48157259的博客 120

Android系统 抓trace方法(手机及车机)

andorid抓取trace的三种方法,方便简单。

weixin_41872439的博客 7904

【XAI】透视深度学习:CNN与Transformer的可解释性方法

深度学习模型的可解释性方法解析:本文探讨了CNN和Transformer两类主流模型的可解释性技术。针对CNN,介绍了显著性图、类激活图(CAM/Grad-CAM)和基于扰动的方法,通过可视化重要像素区域揭示决策依据。对于Transformer,重点分析了注意力机制可视化及其在文本处理中的应用,并介绍了积分梯度等归因方法。文章包含详细的Python实现示例(使用Captum库),涵盖从MNIST图像显著性分析到BERT文本注意力可视化,为初学者提供了可操作的技术指南。这些方法有助于增强模型透明度,提升AI系

u012133341的博客 383

SAP GR(Group Reporting)配置篇(一)

GUI组报表的SAP S4HANA1.1全局参数1.1.1 检查全球系统设置菜单路径组报表的SAP S4HANA>合并的全局设置>检查全球系统设置事务代码CXB3说 明定义好分类账、版本、合并科目表后,重新设置。1.2主数据1.2.1定义合并分类账菜单路径组报表的SAP S4HANA>主数据>定义合并分类账事务代码CXL2说 明复制的Y1合并分类账,集团货币为CNY。此功能对分类账进行设置,应用到集团货币分类。

weixin_43853754的博客 1702

perftto开机流程分析用法

peffetto 分析开机启动的流程

我的专栏 1492

室内温度控制仿真(Simulink+PLC)

本篇博客将会带领大家解读Simulink自带的仿真模型(Thermal Model of a House),之后再讨论PLC控制系统控制环境温度的一些经验方法

RXXW_Dor的博客 3467

【android 性能分析之perfetto_trace抓取】

配置好了要抓哪些信息以后还需要配置抓取的时间以及文件大小.如果不是需要长时间抓取的话,如下配置就行,会抓取十秒这样.如果需要抓很长事件可以使用long trace模式,然后把Max duration和Max file size拉大.点击左边的下载就可以把trace下载到本地,上面的Json会丢失信息,一般不使用,systrace格式信息是完整的,用这个最好.自带的trace信息不一定能明确问题点,可以在怀疑的代码中自己加上trace。有时候需要和别人协同分析,那么就需要把trace文件同步给别人.

qq_25815655的博客 3134

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

C# WinForm 基于DirectShow.dll编写的程序,可边预览边保存视频,音频和图片

基于微软的DirectShow.dll的二次开发1.自动识别连接的摄像头跟麦克风且可以对其进行选择(默认选中第一个)2.可录制wmv和avi两种格式的视频并且都带有音频,avi可以录制的分辨率和帧数进行选择,wmv默认进行了淸晰度优化如不喜欢可去除代码中有相关提示3.可在预览点开之后进行拍照,也可边录制视频边拍照4.添加了视频和音频的压缩功能(酌情使用)这次二次开发发现C#对DirectShow的相关信息太少,这次做完也不敢藏私共享出来,还望大家指正

Android抓trace

trace是分析Android性能问题最直接有效的工具,本文介绍了抓取trace的几种方式。

Tank_Mao的博客 2728

jdk-8u144-linux-x64.tar.gz.

该资源为搭建Linux系统Java环境用,资源的后缀为tar.gz格式的压缩包

抓trace perfetto分析

prefetto 抓trace

b1tb1t的博客 1180

VB摄像头监控

该VB模块可对摄像头捕获的画面进行录像等,可在创建的窗口进行控制

Perfetto 快速上手指南

Perfetto 是 google 从 Android10 开始引入的一个全新的平台级跟踪分析工具。它可以记录 Android 系统运行过程中的关键数据,并通过图形化的形式展示这些数据。Perfetto 不仅可用于系统级的性能分析,也是我们学习系统源码流程的好帮手。

chuyouyinghe的专栏 5770

Android 平台开机时间分析与优化

Android 平台开机时间分析与优化

似霰的博客 4870

Android 抓取Trace 分析冷启动

使用Trace协助分析应用冷启动 冷启动分析 Trace分析

wqh_0625的博客 3921

Android 性能优化【篇四:Trace调试技能汇总】

MTK官方网站介绍了一些关键字来确认IO数据量的请求,详细可以点击我block_rq_insert:表示将一个新的块I/O请求插入到块层请求队列中。当应用程序或者操作系统发起一个读取或写入请求时,这个请求会被插入到块I/O请求队列中等待处理block_rq_issue:表示一个块I/O请求已经提交并开始执行,具体含义是块设备层已经向硬盘或固态驱动器提交了一个请求,并此请求已经在硬盘或驱动器设备上执行。当I/O请求插入到请求队列中表示等待执行,issue。

qq_27672101的博客 1万+

【fwk进阶】抓开机trace-perfetto配置

修改boottrace为可执行文件。

疯子与天才就在一念之间 378

Android Perfetto 学习

可以看到当前CPU负载情况,以及CPU任务工作栈查看对应APP进程,第一排表示进程相关状态,第二排表示主线程执行函数堆栈。

tjpuzm的专栏 1605

性能优化必学基础:perfetto/systrace添加抓取trace块java/c++方法汇总

这些perfetto上展示的执行块slice,其实一般都是在aosp的原生代码中进行的埋点,简单说看到每个slice其实都是有对应的埋点代码,当然这个代码可能是java,c++等,而且哪怕都是java和c++这种也分为是基于源码编译的java,c++代码还是说基于sdk和ndk的java、c++代码,这些都是有差异的,所以针对这些不同的代码和编译情况今天都进行汇总,给大家展示应该如何在自己程序埋入perfetto的slice。跟踪一个动画的开始与结束,可以看出它的执行时长,和同步执行那种单线程完全不一样。

learnframework的博客 1325

抓取perfetto trace

抓取perfetto trace

qq_40731414的博客 516

Android 系统使用 Perfetto 抓取 trace 教程

使用 Perfetto 抓取 trace 的三种方法

Gabriel的专栏 8361

抓开机systrace

可参考原生atrace service修改: /system/etc/init/atrace.rc on property:persist.debug.atrace.boottrace=1 start boottrace # Run atrace with the categories written in a file #service boottrace /system/bin/atrace --async_start -f /data/misc/boottrace/categories...

PefectWorld的博客 982
上一篇: Android.mk和Android.bp同时需要定义一个目标怎么办?
下一篇: 重学perfetto官方高级抓取方案-抓取更多的内容
千里马学框架
博客等级 码龄6年 1万+粉丝 653原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

千里马学框架

帮助你了,就请我喝杯咖啡

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值
⌂ 换网址