当前位置:网站首页>Analysis of camera memory memory leakage (II)
Analysis of camera memory memory leakage (II)
2022-06-26 03:46:00 【Cmatrix204】
adopt Provider Yes com.android.camera2 Conduct memory Monitoring is only equivalent to monitoring a process memory info Information monitoring , When a real memory leak occurs , A separate check camera.android.camera2 A single package is certainly not complete check Problem point , Can pass sysinfo The corresponding /proc/meminfo In the message MemAvailable The displayed size is used to view the macro usage , Then the process of doubt is passed dumpsys meminfo The way to check Specific skeptical processes , Now in order to Camera Module as an example .
One 、sysinfo The information determines the problem time node
Every time 2min Printing system meminfo Of sysinfo log, Before and after the time node when the relevant problem occurs, you can go through sysinfo The approximate time point of meminfo Is there a problem with the status of .
Specific tracking log as follows :
Let's see if there is crash And so on camera Crumble log produce

analysis sysinfo dependent memAvailable, Every time 2min Within 200M Left and right memory Information fluctuation , In a 2min Within the band of 800M Memory fluctuations , The abnormal occurrence here will lead to camera crash And other related information to release the occupied memory, resulting in large memory fluctuations .

22:52:25-22:54:26 Analyze other main log Corresponding node discovery com.android.camera OOM abnormal ( It's like reporting an error :lowmemory) Error message .
Two 、 adopt dumpsys meminfo Memory occupation of pressure measurement and positioning related processes
Yes camera Related to each process memory Monitor and handle the usage . 1.
1. Through the command dump camera Application layer related memory
adb shell "dumpsys meminfo com.android.camera2 | awk '/Graphics|Java Heap:|Native Heap:|TOTAL PSS/' " >>meminfo.txt

2. Through the command dump camera HAL/FrameWork Layer dependent memory Information
adb shell ps -A | grep camera

see camera HAL Related memory information
adb shell "dumpsys meminfo 504" >> meminfo_cameraprovider.txt

see camera FrameWork Layer related memory information
adb shell "dumpsys meminfo 726" >> meminfo_cameraserver.txt
Finally, for each test memory Total Pss Information for statistics , Draw as a related process and take continuous photos memory Relevant charts can be used to visually observe the relevant memory consumption , The view is as follows :


Exhibition information platform Camera The related process

MTK platform Camera The related process 
summary
Memory related exceptions are certainly not as easy to handle as other problems , Repeated pressure test is required , Identify specific outliers , Even need to borrow addr2line -e -f Parse dynamic link library , Locate the function interface corresponding to the stack address when the exception occurs ;objdump -S -D Disassembly related lib, Identify specific problem points ; Finally, if you can locate a specific memory application point , It will be much better to solve it .
边栏推荐
- 【LOJ#6718】九个太阳「弱」化版(循环卷积,任意模数NTT)
- [paper notes] learning to grasp with primitive shaped object policies
- Navicat16 wireless trial
- ABP framework Practice Series (II) - Introduction to domain layer
- Various errors in kitti2bag installation
- 高性能算力中心 — RoCE — Overview
- QPS的概念和实现
- Partition, column, list
- 面试阿里测开岗失败后,被面试官在朋友圈吐槽了......(心塞)
- Solve the problem that the uniapp plug-in Robin editor reports an error when setting the font color and background color
猜你喜欢

Some mobile phones open USB debugging, and the solution to installation failure

高性能算力中心 — RoCE — Overview
![MySQL advanced Chapter 1 (installing MySQL under Linux) [2]](/img/24/0795ebd2a0673d48c5e0f9d18842d1.png)
MySQL advanced Chapter 1 (installing MySQL under Linux) [2]

用eclipse连mysql数据库出错然后出现图中的话是咋回事呀

MySQL addition, deletion, query and modification (Advanced)

Camera-memory内存泄漏分析(三)

MySQL高级部分( 四: 锁机制、SQL优化 )

Classic model - Nin & googlenet

评价——层次分析

Drag and drop
随机推荐
ASP. Net startup and running mechanism
WebRTC系列-网络传输之7-ICE补充之偏好(preference)与优先级(priority)
【LOJ#6718】九个太阳「弱」化版(循环卷积,任意模数NTT)
DETR3D 多2d图片3D检测框架
Can string be changed?
MySQL stored procedure
Uni app custom selection date 2 (September 16, 2021)
USB驱动-debug
Binary search
JS to achieve the effect of text marquee
mysql存储过程
Worm copy construction operator overload
redux-thunk 简单案例,优缺点和思考
[hash table] a very simple zipper hash structure, so that the effect is too poor, there are too many conflicts, and the linked list is too long
Procédures stockées MySQL
Dynamic segment tree leetcode seven hundred and fifteen
2022.6.20-----leetcode. seven hundred and fifteen
动态线段树leetcode.715
Kotlin uses viewpager2+fragment+bottomnavigationview to implement the style of the switching module of the bottom menu bar.
Is it safe to open a fund account? How to apply