Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Native内存泄漏检测,Android 10以上版本LeakRecordMap size为0 #282

Open
gogi2010 opened this issue Aug 13, 2024 · 2 comments
Open

Comments

@gogi2010
Copy link

用Demo最新版本2.2.2测试多款机型,荣耀、小米、华为,发现仅Andorid 10返回的LeakRecordMap size不为0,Andorid 11-14 LeakRecordMap size都是0,是不是还不支持,还是配置有问题?

以下是Android 10测试的日志,发现libmemunreachable打印的对象未减少的情况下,LeakRecordMap size开始大幅度减少,是不是检测机制也有问题啊?如下日志,当libmemunreachable有342对象时,LeakRecordMap size为331,当libmemunreachable有336对象时,LeakRecordMap size变成14了,掉的太快了

2024-08-13 21:12:00.030 5176-5278/com.kwai.koom.demo I/NativeLeakTest: TestNewArrayLeak 0x78460c4e88 size 23616
2024-08-13 21:12:00.030 5176-5278/com.kwai.koom.demo I/NativeLeakTest: TestNewArrayLeak 0x7834cba188 size 19248
2024-08-13 21:12:02.888 5176-5269/com.kwai.koom.demo I/libmemunreachable: unreachable memory detection done
2024-08-13 21:12:02.889 5176-5269/com.kwai.koom.demo E/libmemunreachable: 312931792 bytes in 342 allocations unreachable out of 349725184 bytes in 34243 allocations
2024-08-13 21:12:03.992 5176-5269/com.kwai.koom.demo I/NativeLeakMonitor: LeakRecordMap size: 331
2024-08-13 21:12:03.999 5176-5269/com.kwai.koom.demo D/ForceDarkHelper: updateByCheckExcludeList: pkg: com.kwai.koom.demo activity: com.kwai.koom.demo.nativeleak.NativeLeakTestActivity@d5e1a0f
2024-08-13 21:12:04.011 5176-5269/com.kwai.koom.demo D/ForceDarkHelper: updateByCheckExcludeList: pkg: com.kwai.koom.demo activity: com.kwai.koom.demo.nativeleak.NativeLeakTestActivity@d5e1a0f
2024-08-13 21:12:04.041 5176-5269/com.kwai.koom.demo I/Toast: Show toast from OpPackageName:com.kwai.koom.demo, PackageName:com.kwai.koom.demo
2024-08-13 21:12:08.628 5176-5269/com.kwai.koom.demo I/libmemunreachable: unreachable memory detection done
2024-08-13 21:12:08.629 5176-5269/com.kwai.koom.demo E/libmemunreachable: 292606552 bytes in 336 allocations unreachable out of 354347272 bytes in 69910 allocations
2024-08-13 21:12:08.687 5176-5269/com.kwai.koom.demo I/NativeLeakMonitor: LeakRecordMap size: 14
2024-08-13 21:12:08.688 5176-5269/com.kwai.koom.demo D/ForceDarkHelper: updateByCheckExcludeList: pkg: com.kwai.koom.demo activity: com.kwai.koom.demo.nativeleak.NativeLeakTestActivity@d5e1a0f
2024-08-13 21:12:08.689 5176-5269/com.kwai.koom.demo D/ForceDarkHelper: updateByCheckExcludeList: pkg: com.kwai.koom.demo activity: com.kwai.koom.demo.nativeleak.NativeLeakTestActivity@d5e1a0f
2024-08-13 21:12:08.704 5176-5269/com.kwai.koom.demo I/Toast: Show toast from OpPackageName:com.kwai.koom.demo, PackageName:com.kwai.koom.demo
2024-08-13 21:12:50.665 5176-5269/com.kwai.koom.demo I/libmemunreachable: unreachable memory detection done
2024-08-13 21:12:50.665 5176-5269/com.kwai.koom.demo E/libmemunreachable: 292615344 bytes in 275 allocations unreachable out of 353958360 bytes in 56350 allocations
2024-08-13 21:12:50.668 5176-5269/com.kwai.koom.demo I/NativeLeakMonitor: LeakRecordMap size: 0
2024-08-13 21:13:06.548 5176-5269/com.kwai.koom.demo I/libmemunreachable: unreachable memory detection done
2024-08-13 21:13:06.549 5176-5269/com.kwai.koom.demo E/libmemunreachable: 292615344 bytes in 275 allocations unreachable out of 353963256 bytes in 56368 allocations
2024-08-13 21:13:06.551 5176-5269/com.kwai.koom.demo I/NativeLeakMonitor: LeakRecordMap size: 0

@Xinmeng322
Copy link

Xinmeng322 commented Aug 13, 2024 via email

@gogi2010
Copy link
Author

你的邮件已收到。

你好,能否先给个Android 11-14是否支持Native泄漏检测的结论呀,我们有个问题排查需要用的这个Native泄漏检测功能,很着急

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants