Android的DDMS中的Threads的各个字段的含义

在使用DDMS调试代码时,Threads窗口中各个字段的含义从网上搜了下,如下所示:

该标签页显示了如下信息:

  • ID

    – a VM-assigned unique thread ID. In Dalvik, these are odd numbers starting from 3.

    – 虚拟机分配的唯一线程ID. 在 Dalvik, 该数字是一个从3开始的奇数.

  • Tid

    – the Linux thread ID. For the main thread in a process, this will match the process ID.

    – Linux 线程 ID. 进程中主线程的ID, 会同进程的ID相匹配.

  • Status

    – the VM thread status. Daemon threads are shown with a ‘*’. This will be one of the following:

    – 虚拟机线程状态. 守护进程会附带一个’*’. 状态信息列表如下:

    • running – executing application code  – 正在执行应用程序
    • sleeping – called Thread.sleep()  – 执行了Thread.sleep() 方法
    • monitor – waiting to acquire a monitor lock – 在正等待获取一个监听锁
    • wait – in Object.wait() – 在Object.wait() 方法中
    • native – executing native code  – 执行了原生代码
    • vmwait – waiting on a VM resource – 正在等待一个虚拟机资源
    • zombie – thread is in the process of dying  – 该线程已死
    • init – thread is initializing (you shouldn’t see this) – 线程正在初始化 (你不会看到这个)
    • starting – thread is about to start (you shouldn’t see this either) – 线程正在启动中 (这个你也不会看到)
  • utime

    – cumulative time spent executing user code, in “jiffies” (usually 10ms). Only available under Linux.

    – 执行用户代码的累计时间, 单位为”jiffies(表示系统启动以来的tick数)” (通常是 10ms). 仅在Linux系统中适用.

  • stime

    – cumulative time spent executing system code, in “jiffies” (usually 10ms).

    – 执行系统代码的累计时间, 单位为”jiffies(表示系统启动以来的tick数)”.

  • Name

    – the name of the thread

    – 线程的名字

“ID” and “Name” are set when the thread is started. The remaining fields are updated periodically (default is every 4 seconds).

“ID” 和 “Name” 在进程启动的时候就会显示. 其余的字段每个一段时间更新一次(默认是4秒钟)

参考: http://goodhank.blog.163.com/blog/static/599726902010129304242/

你可能感兴趣的:(Android)