【android】libui:管理GraphicBuffer

此博客围绕Android的libui展开,主要讲述其对GraphicBuffer的管理。在Android开发中,libui对GraphicBuffer的有效管理至关重要,能保障系统图形处理等相关功能的正常运行。
            
#00 pc 0000000000084d9c /apex/com.android.runtime/lib64/bionic/libc.so (__memcpy_aarch64_simd+284) (BuildId: 5ce1b77804344241efd50e639525e040) #01 pc 00000000000a0aac /apex/com.android.vndk.v34/lib64/libc++.so (std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>::__grow_by_and_replace(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, char const*)+192) (BuildId: 8ee00d578a8332cad7dea8ff5d9c6f3a) #02 pc 00000000000a057c /apex/com.android.vndk.v34/lib64/libc++.so (std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>::assign(char const*, unsigned long)+100) (BuildId: 8ee00d578a8332cad7dea8ff5d9c6f3a) #03 pc 0000000000042054 /vendor/lib64/hw/mt6989/android.hardware.graphics.mapper@4.0-impl-mediatek.so (arm::mapper::common::get_metadata(private_handle_t const*, arm::mapper::common::metadata_descriptor const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char>>&, std::__1::function<arm::mapper::common::mapper_error (void const*, std::__1::vector<unsigned char, std::__1::allocator<unsigned char>>*)>)+564) (BuildId: a1628775f37193cf88788b2abd381032) #04 pc 000000000003d6f4 /vendor/lib64/hw/mt6989/android.hardware.graphics.mapper@4.0-impl-mediatek.so (arm::mapper::common::get(void const*, arm::mapper::common::metadata_descriptor const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char>>&, std::__1::function<arm::mapper::common::mapper_error (void const*, std::__1::vector<unsigned char, std::__1::allocator<unsigned char>>*)>)+372) (BuildId: a1628775f37193cf88788b2abd381032) #05 pc 0000000000032d00 /vendor/lib64/hw/mt6989/android.hardware.graphics.mapper@4.0-impl-mediatek.so (arm::mapper::GrallocMapper::get(void*, android::hardware::graphics::mapper::V4_0::IMapper::MetadataType const&, std::__1::function<void (android::hardware::graphics::mapper::V4_0::Error, android::hardware::hidl_vec<unsigned char> const&)>)+656) (BuildId: a1628775f37193cf88788b2abd381032) #06 pc 000000000001a0cc /system/lib64/android.hardware.graphics.mapper@4.0.so (android::hardware::graphics::mapper::V4_0::BsMapper::get(void*, android::hardware::graphics::mapper::V4_0::IMapper::MetadataType const&, std::__1::function<void (android::hardware::graphics::mapper::V4_0::Error, android::hardware::hidl_vec<unsigned char> const&)>)+140) (BuildId: 8b93d45c0a86b43aa16a7677171595db) #07 pc 0000000000048cf0 /system/lib64/libui.so (int android::Gralloc4Mapper::get<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>(native_handle const*, android::hardware::graphics::mapper::V4_0::IMapper::MetadataType const&, int (*)(android::hardware::hidl_vec<unsigned char> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>*), std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>*) const+128) (BuildId: 24aaaa159cfed588c363c360a3e24c69) #08 pc 0000000000054c84 /system/lib64/libui.so (android::GraphicBuffer::unflatten(void const*&, unsigned long&, int const*&, unsigned long&)+500) (BuildId: 24aaaa159cfed588c363c360a3e24c69) #09 pc 000000000014c08c /system/lib64/libgui.so (android::Parcel::FlattenableHelper<android::GraphicBuffer>::unflatten(void const*, unsigned long, int const*, unsigned long)+60) (BuildId: 75e650b57753482e1e25c6615477b815) #10 pc 00000000000754a0 /system/lib64/libbinder.so (android::Parcel::read(android::Parcel::FlattenableHelperInterface&) const+784) (BuildId: 9eab5f4500f6156bca8298eab3c8594e) #11 pc 00000000001551dc /system/lib64/libgui.so (android::BufferData::readFromParcel(android::Parcel const*)+1052) (BuildId: 75e650b57753482e1e25c6615477b815) #12 pc 00000000000e7864 /system/lib64/libgui.so (android::layer_state_t::read(android::Parcel const&)+3140) (BuildId: 75e650b57753482e1e25c6615477b815) #13 pc 00000000000e4978 /system/lib64/libgui.so (android::TransactionState::readFromParcel(android::Parcel const*)+1384) (BuildId: 75e650b57753482e1e25c6615477b815) #14 pc 00000000000e364c /system/lib64/libgui.so (android::BnSurfaceComposer::onTransact(unsigned int, android::Parcel const&, android::Parcel*, unsigned int)+204) (BuildId: 75e650b57753482e1e25c6615477b815) #15 pc 0000000000383f80 /system/bin/surfaceflinger (android::SurfaceFlinger::onTransact(unsigned int, android::Parcel const&, android::Parcel*, unsigned int)+288) (BuildId: 433a4a608a36dd5751c7c58dca23022a) #16 pc 000000000004d910 /system/lib64/libbinder.so (android::BBinder::transact(unsigned int, android::Parcel const&, android::Parcel*, unsigned int)+320) (BuildId: 9eab5f4500f6156bca8298eab3c8594e) #17 pc 000000000004e0b0 /system/lib64/libbinder.so (android::IPCThreadState::executeCommand(int)+1136) (BuildId: 9eab5f4500f6156bca8298eab3c8594e) #18 pc 0000000000075f44 /system/lib64/libbinder.so (android::IPCThreadState::joinThreadPool(bool)+452) (BuildId: 9eab5f4500f6156bca8298eab3c8594e) #19 pc 0000000000075ae0 /system/lib64/libbinder.so (android::PoolThread::threadLoop()+96) (BuildId: 9eab5f4500f6156bca8298eab3c8594e) #20 pc 0000000000019368 /system/lib64/libutils.so (android::Thread::_threadLoop(void*)+248) (BuildId: e41f2bc353059dc14cf4ee6b493447a4) #21 pc 000000000001bac4 /system/lib64/libutils.so (libutil_thread_trampoline(void*) (.__uniq.226528677032898775202282855395389835431)+20) (BuildId: e41f2bc353059dc14cf4ee6b493447a4) #22 pc 000000000009c8f8 /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+232) (BuildId: 5ce1b77804344241efd50e639525e040) #23 pc 000000000008ee50 /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: 5ce1b77804344241efd50e639525e040) 根据这个堆栈分析下是在做什么操作,怎么发生的踩内存问题
最新发布
12-05
10-27 02:33:44.994449 16007 16007 F DEBUG : signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0x00000074695bf000 10-27 02:33:44.994472 16007 16007 F DEBUG : x0 b400007329600000 x1 00000074695bef80 x2 000000002b1b74b4 x3 b400007329632734 10-27 02:33:44.994483 16007 16007 F DEBUG : x4 00000074947764c4 x5 b4000073547e9c78 x6 0000000000000000 x7 0000000030000000 10-27 02:33:44.994493 16007 16007 F DEBUG : x8 00000000000000b4 x9 176ecfb51b558e94 x10 000000000003994b x11 0000000000000001 10-27 02:33:44.994557 16007 16007 F DEBUG : x12 0000000000200000 x13 0000007437f3ed90 x14 000000000000000c x15 000000000000000d 10-27 02:33:44.994569 16007 16007 F DEBUG : x16 000000739f2d5a50 x17 0000007437f58c80 x18 0000007363ad8000 x19 000000002b1e9c78 10-27 02:33:44.994579 16007 16007 F DEBUG : x20 0000007370fee580 x21 0000000000000000 x22 0000000000000016 x23 0000000000000000 10-27 02:33:44.994589 16007 16007 F DEBUG : x24 0000007370fee581 x25 0000000000000000 x26 000000002b1e9c80 x27 000000746958c84c 10-27 02:33:44.994599 16007 16007 F DEBUG : x28 b400007329600000 x29 0000007370fee4b0 10-27 02:33:44.994610 16007 16007 F DEBUG : lr 000000739f2c0ab0 sp 0000007370fee4b0 pc 0000007437f58d9c pst 0000000020001000 10-27 02:33:44.994623 16007 16007 F DEBUG : 24 total frames 10-27 02:33:44.994635 16007 16007 F DEBUG : backtrace: 10-27 02:33:44.994651 16007 16007 F DEBUG : #00 pc 0000000000084d9c /apex/com.android.runtime/lib64/bionic/libc.so (__memcpy_aarch64_simd+284) (BuildId: 5ce1b77804344241efd50e639525e040) 10-27 02:33:44.994683 16007 16007 F DEBUG : #01 pc 00000000000a0aac /apex/com.android.vndk.v34/lib64/libc++.so (std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>::__grow_by_and_replace(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, char const*)+192) (BuildId: 8ee00d578a8332cad7dea8ff5d9c6f3a) 10-27 02:33:44.994696 16007 16007 F DEBUG : #02 pc 00000000000a057c /apex/com.android.vndk.v34/lib64/libc++.so (std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>::assign(char const*, unsigned long)+100) (BuildId: 8ee00d578a8332cad7dea8ff5d9c6f3a) 10-27 02:33:44.994713 16007 16007 F DEBUG : #03 pc 0000000000042054 /vendor/lib64/hw/mt6989/android.hardware.graphics.mapper@4.0-impl-mediatek.so (arm::mapper::common::get_metadata(private_handle_t const*, arm::mapper::common::metadata_descriptor const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char>>&, std::__1::function<arm::mapper::common::mapper_error (void const*, std::__1::vector<unsigned char, std::__1::allocator<unsigned char>>*)>)+564) (BuildId: a1628775f37193cf88788b2abd381032) 10-27 02:33:44.994727 16007 16007 F DEBUG : #04 pc 000000000003d6f4 /vendor/lib64/hw/mt6989/android.hardware.graphics.mapper@4.0-impl-mediatek.so (arm::mapper::common::get(void const*, arm::mapper::common::metadata_descriptor const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char>>&, std::__1::function<arm::mapper::common::mapper_error (void const*, std::__1::vector<unsigned char, std::__1::allocator<unsigned char>>*)>)+372) (BuildId: a1628775f37193cf88788b2abd381032) 10-27 02:33:44.994740 16007 16007 F DEBUG : #05 pc 0000000000032d00 /vendor/lib64/hw/mt6989/android.hardware.graphics.mapper@4.0-impl-mediatek.so (arm::mapper::GrallocMapper::get(void*, android::hardware::graphics::mapper::V4_0::IMapper::MetadataType const&, std::__1::function<void (android::hardware::graphics::mapper::V4_0::Error, android::hardware::hidl_vec<unsigned char> const&)>)+656) (BuildId: a1628775f37193cf88788b2abd381032) 10-27 02:33:44.994759 16007 16007 F DEBUG : #06 pc 000000000001a0cc /system/lib64/android.hardware.graphics.mapper@4.0.so (android::hardware::graphics::mapper::V4_0::BsMapper::get(void*, android::hardware::graphics::mapper::V4_0::IMapper::MetadataType const&, std::__1::function<void (android::hardware::graphics::mapper::V4_0::Error, android::hardware::hidl_vec<unsigned char> const&)>)+140) (BuildId: 8b93d45c0a86b43aa16a7677171595db) 10-27 02:33:44.994805 16007 16007 F DEBUG : #07 pc 0000000000048cf0 /system/lib64/libui.so (int android::Gralloc4Mapper::get<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>(native_handle const*, android::hardware::graphics::mapper::V4_0::IMapper::MetadataType const&, int (*)(android::hardware::hidl_vec<unsigned char> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>*), std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>*) const+128) (BuildId: 24aaaa159cfed588c363c360a3e24c69) 10-27 02:33:44.994830 16007 16007 F DEBUG : #08 pc 0000000000054c84 /system/lib64/libui.so (android::GraphicBuffer::unflatten(void const*&, unsigned long&, int const*&, unsigned long&)+500) (BuildId: 24aaaa159cfed588c363c360a3e24c69) 10-27 02:33:44.994840 16007 16007 F DEBUG : #09 pc 000000000014c08c /system/lib64/libgui.so (android::Parcel::FlattenableHelper<android::GraphicBuffer>::unflatten(void const*, unsigned long, int const*, unsigned long)+60) (BuildId: 75e650b57753482e1e25c6615477b815) 10-27 02:33:44.994852 16007 16007 F DEBUG : #10 pc 00000000000754a0 /system/lib64/libbinder.so (android::Parcel::read(android::Parcel::FlattenableHelperInterface&) const+784) (BuildId: 9eab5f4500f6156bca8298eab3c8594e) 10-27 02:33:44.994862 16007 16007 F DEBUG : #11 pc 00000000001551dc /system/lib64/libgui.so (android::BufferData::readFromParcel(android::Parcel const*)+1052) (BuildId: 75e650b57753482e1e25c6615477b815) 10-27 02:33:44.994872 16007 16007 F DEBUG : #12 pc 00000000000e7864 /system/lib64/libgui.so (android::layer_state_t::read(android::Parcel const&)+3140) (BuildId: 75e650b57753482e1e25c6615477b815) 10-27 02:33:44.994885 16007 16007 F DEBUG : #13 pc 00000000000e4978 /system/lib64/libgui.so (android::TransactionState::readFromParcel(android::Parcel const*)+1384) (BuildId: 75e650b57753482e1e25c6615477b815) 10-27 02:33:44.994896 16007 16007 F DEBUG : #14 pc 00000000000e364c /system/lib64/libgui.so (android::BnSurfaceComposer::onTransact(unsigned int, android::Parcel const&, android::Parcel*, unsigned int)+204) (BuildId: 75e650b57753482e1e25c6615477b815) 10-27 02:33:44.994906 16007 16007 F DEBUG : #15 pc 0000000000383f80 /system/bin/surfaceflinger (android::SurfaceFlinger::onTransact(unsigned int, android::Parcel const&, android::Parcel*, unsigned int)+288) (BuildId: 433a4a608a36dd5751c7c58dca23022a) 10-27 02:33:44.994988 16007 16007 F DEBUG : #16 pc 000000000004d910 /system/lib64/libbinder.so (android::BBinder::transact(unsigned int, android::Parcel const&, android::Parcel*, unsigned int)+320) (BuildId: 9eab5f4500f6156bca8298eab3c8594e) 10-27 02:33:44.994998 16007 16007 F DEBUG : #17 pc 000000000004e0b0 /system/lib64/libbinder.so (android::IPCThreadState::executeCommand(int)+1136) (BuildId: 9eab5f4500f6156bca8298eab3c8594e) 10-27 02:33:44.995008 16007 16007 F DEBUG : #18 pc 0000000000075f44 /system/lib64/libbinder.so (android::IPCThreadState::joinThreadPool(bool)+452) (BuildId: 9eab5f4500f6156bca8298eab3c8594e) 10-27 02:33:44.995017 16007 16007 F DEBUG : #19 pc 0000000000075ae0 /system/lib64/libbinder.so (android::PoolThread::threadLoop()+96) (BuildId: 9eab5f4500f6156bca8298eab3c8594e) 10-27 02:33:44.995027 16007 16007 F DEBUG : #20 pc 0000000000019368 /system/lib64/libutils.so (android::Thread::_threadLoop(void*)+248) (BuildId: e41f2bc353059dc14cf4ee6b493447a4) 10-27 02:33:44.995036 16007 16007 F DEBUG : #21 pc 000000000001bac4 /system/lib64/libutils.so (libutil_thread_trampoline(void*) (.__uniq.226528677032898775202282855395389835431)+20) (BuildId: e41f2bc353059dc14cf4ee6b493447a4) 10-27 02:33:44.995046 16007 16007 F DEBUG : #22 pc 000000000009c8f8 /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+232) (BuildId: 5ce1b77804344241efd50e639525e040) 10-27 02:33:44.995076 16007 16007 F DEBUG : #23 pc 000000000008ee50 /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: 5ce1b77804344241efd50e639525e040) 踩内存问题,发生在哪儿,可能造成该问题的原因
12-04
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值