Android CallStack使用

   

Android.bp文件里添加:

shared_libs: [
        ...
        "libutilscallstack",
    ]

代码里添加:android::CallStack stack("Debug info");即可。打印效果如下:

04-30 02:53:49.037   530   904 D Debug info: #00 pc 00000000001a8c6c  /system/lib64/libcameraservice.so (android::Camera3Device::HalInterface::configureStreams(camera_metadata const*, android::camera3::camera_stream_configuration*, std::__1::vector<unsigned int, std::__1::allocator<unsigned int> > const&)+2420)
04-30 02:53:49.037   530   904 D Debug info: #01 pc 00000000001a63b0  /system/lib64/libcameraservice.so (android::Camera3Device::configureStreamsLocked(int, android::CameraMetadata const&, bool)+3164)
04-30 02:53:49.037   530   904 D Debug info: #02 pc 00000000001a56f8  /system/lib64/libcameraservice.so (android::Camera3Device::filterParamsAndConfigureLocked(android::CameraMetadata const&, int)+384)
04-30 02:53:49.037   530   904 D Debug info: #03 pc 000000000019586c  /system/lib64/libcameraservice.so (android::Camera3Device::configureStreams(android::CameraMetadata const&, int)+228)
04-30 02:53:49.037   530   904 D Debug info: #04 pc 00000000001545c0  /system/lib64/libcameraservice.so (android::CameraDeviceClient::endConfigure(int, android::CameraMetadata const&, long, std::__1::vector<int, std::__1::allocator<int> >*)+792)
04-30 02:53:49.037   530   904 D Debug info: #05 pc 0000000000046f8c  /system/lib64/libcamera_client.so (android::hardware::camera2::BnCameraDeviceUser::onTransact(unsigned int, android::Parcel const&, android::Parcel*, unsigned int)+2068)
04-30 02:53:49.037   530   904 D Debug info: #06 pc 000000000003c810  /system/lib64/libbinder.so (android::BBinder::transact(unsigned int, android::Parcel const&, android::Parcel*, unsigned int)+248)
04-30 02:53:49.037   530   904 D Debug info: #07 pc 0000000000046068  /system/lib64/libbinder.so (android::IPCThreadState::executeCommand(int)+1024)
04-30 02:53:49.037   530   904 D Debug info: #08 pc 0000000000045ba0  /system/lib64/libbinder.so (android::IPCThreadState::getAndExecuteCommand()+160)
04-30 02:53:49.037   530   904 D Debug info: #09 pc 0000000000046410  /system/lib64/libbinder.so (android::IPCThreadState::joinThreadPool(bool)+68)
04-30 02:53:49.037   530   904 D Debug info: #10 pc 000000000006c2b4  /system/lib64/libbinder.so (android::PoolThread::threadLoop()+24)
04-30 02:53:49.037   530   904 D Debug info: #11 pc 0000000000012094  /system/lib64/libutils.so (android::Thread::_threadLoop(void*)+260)
04-30 02:53:49.037   530   904 D Debug info: #12 pc 0000000000011964  /system/lib64/libutils.so (thread_data_t::trampoline(thread_data_t const*)+404)
04-30 02:53:49.037   530   904 D Debug info: #13 pc 00000000000b1810  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+264)
04-30 02:53:49.037   530   904 D Debug info: #14 pc 00000000000512f0  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)

Android12 亲测有效

相关推荐

  1. conda使用,pip使用

    2024-04-30 12:16:01       58 阅读
  2. VueUse使用

    2024-04-30 12:16:01       68 阅读
  3. Git<span style='color:red;'>使用</span>

    Git使用

    2024-04-30 12:16:01      60 阅读
  4. netty使用

    2024-04-30 12:16:01       55 阅读
  5. gdb<span style='color:red;'>使用</span>

    gdb使用

    2024-04-30 12:16:01      63 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-04-30 12:16:01       94 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-04-30 12:16:01       101 阅读
  3. 在Django里面运行非项目文件

    2024-04-30 12:16:01       82 阅读
  4. Python语言-面向对象

    2024-04-30 12:16:01       91 阅读

热门阅读

  1. 发送json 发送对象

    2024-04-30 12:16:01       25 阅读
  2. selenium处理下拉框、警告框

    2024-04-30 12:16:01       31 阅读
  3. Software Development Tools COMP220

    2024-04-30 12:16:01       30 阅读
  4. 记录一些容易遗忘的东西

    2024-04-30 12:16:01       32 阅读
  5. Models_M1

    Models_M1

    2024-04-30 12:16:01      29 阅读
  6. element_Plus中表格和分页的使用

    2024-04-30 12:16:01       36 阅读
  7. 【python】python基础1

    2024-04-30 12:16:01       30 阅读
  8. 美国洛杉矶服务器托管需要了解什么?

    2024-04-30 12:16:01       30 阅读
  9. 2024 Google SEO【全面优化网页体验】

    2024-04-30 12:16:01       29 阅读