Android的DDMS中的Threads的各個字段的含義

ideDDMS線程顯示圖如下:

該標籤頁顯示瞭如下信息:

  • 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秒鐘)


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章