• 查看android app 线程信息的命令


    参考:https://my.oschina.net/zhiweiofli/blog/138454

    ps | grep 'joyodream'  找到 app 的pid; joyodream为包名的一部分
    ps -t pid 查找指定pid的线程信息 例如:

     ps -t 14500
    360 手机

    USER PID PPID VSIZE RSS WCHAN PC NAME
    u0_a118 14500 375 2521896 137196 SyS_epoll_ 0000000000 S com.joyodream.bindtest
    u0_a118 14506 14500 2521896 137196 do_sigtime 0000000000 S Signal Catcher
    u0_a118 14507 14500 2521896 137196 poll_sched 0000000000 S JDWP
    u0_a118 14508 14500 2521896 137196 futex_wait 0000000000 S ReferenceQueueD
    u0_a118 14509 14500 2521896 137196 futex_wait 0000000000 S FinalizerDaemon
    u0_a118 14510 14500 2521896 137196 futex_wait 0000000000 S FinalizerWatchd
    u0_a118 14511 14500 2521896 137196 futex_wait 0000000000 S HeapTaskDaemon
    u0_a118 14512 14500 2521896 137196 binder_thr 0000000000 S Binder_1
    u0_a118 14513 14500 2521896 137196 binder_thr 0000000000 S Binder_2
    u0_a118 14515 14500 2521896 137196 SyS_epoll_ 0000000000 S RenderThread
    u0_a118 14517 14500 2521896 137196 futex_wait 0000000000 S mali-mem-purge
    u0_a118 14518 14500 2521896 137196 kbase_read 0000000000 S mali-event-hnd
    u0_a118 14519 14500 2521896 137196 futex_wait 0000000000 S mali-utility-wo
    u0_a118 14520 14500 2521896 137196 futex_wait 0000000000 S mali-utility-wo
    u0_a118 14521 14500 2521896 137196 futex_wait 0000000000 S mali-utility-wo
    u0_a118 14522 14500 2521896 137196 futex_wait 0000000000 S mali-utility-wo
    u0_a118 14523 14500 2521896 137196 futex_wait 0000000000 S mali-utility-wo
    u0_a118 14524 14500 2521896 137196 futex_wait 0000000000 S mali-utility-wo
    u0_a118 14525 14500 2521896 137196 futex_wait 0000000000 S mali-utility-wo
    u0_a118 14526 14500 2521896 137196 futex_wait 0000000000 S mali-utility-wo
    u0_a118 14527 14500 2521896 137196 futex_wait 0000000000 S mali-utility-wo
    u0_a118 14528 14500 2521896 137196 futex_wait 0000000000 S mali-utility-wo
    u0_a118 14529 14500 2521896 137196 futex_wait 0000000000 S mali-renderer
    u0_a118 14530 14500 2521896 137196 futex_wait 0000000000 S mali-hist-dump
    u0_a118 14531 14500 2521896 137196 futex_wait 0000000000 S ged-swd
    u0_a118 14533 14500 2521896 137196 futex_wait 0000000000 S hwuiTask1

    1+ 手机

    u0_a100 19418 284 1609932 43208 ffffffff 00000000 S com.joyodream.bindtest
    u0_a100 19424 19418 1609932 43208 ffffffff 00000000 S Heap thread poo
    u0_a100 19425 19418 1609932 43208 ffffffff 00000000 S Heap thread poo
    u0_a100 19426 19418 1609932 43208 ffffffff 00000000 S Heap thread poo
    u0_a100 19427 19418 1609932 43208 ffffffff 00000000 S Signal Catcher
    u0_a100 19428 19418 1609932 43208 ffffffff 00000000 S JDWP
    u0_a100 19429 19418 1609932 43208 ffffffff 00000000 S ReferenceQueueD
    u0_a100 19430 19418 1609932 43208 ffffffff 00000000 S FinalizerDaemon
    u0_a100 19431 19418 1609932 43208 ffffffff 00000000 S FinalizerWatchd
    u0_a100 19432 19418 1609932 43208 ffffffff 00000000 S HeapTrimmerDaem
    u0_a100 19433 19418 1609932 43208 ffffffff 00000000 S GCDaemon
    u0_a100 19434 19418 1609932 43208 ffffffff 00000000 S Binder_1
    u0_a100 19435 19418 1609932 43208 ffffffff 00000000 S Binder_2
    u0_a100 19438 19418 1609932 43208 ffffffff 00000000 S android.bg
    u0_a100 19464 19418 1609932 43208 ffffffff 00000000 S RenderThread
    u0_a100 19465 19418 1609932 43208 ffffffff 00000000 S AsyncQueryWorke
    u0_a100 19470 19418 1609932 43208 ffffffff 00000000 S GL updater
    u0_a100 19474 19418 1609932 43208 ffffffff 00000000 S hwuiTask1

    一个Hellow world App,包含至少2个Binder线程(偶尔出现3个),FinalizerDaemon线程、FinalizerWatchd线程、RenderThread、主线程、ReferenceQueued、HeapTaskDaemon、SignalCatcher、GCDaemon、hwuiTask

     
  • 相关阅读:
    使用nfs在Linux与macOS之间分享文件
    git不切换分支实现pull
    js模块化 AMD规范
    React Hooks之useImperativeHandle
    js模块化 cmd规范
    js react源码中seal和freeze的使用
    Nodejs 获取系统home目录或者系统配置的home环境变量
    如何取消http请求
    js模块化 ES6 引入第三方模块 模块化到底做了什么
    关于chrome 无法在application界面修改cookie的解决方法
  • 原文地址:https://www.cnblogs.com/lipeil/p/6015542.html
Copyright © 2020-2023  润新知