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 co
de– 正在執行應用程式
sleeping – called Thread.sleep()– 執行了Thread.sleep() 方法
monitor – waiting to acquire a monitor lock– 在正等待獲取一個監聽鎖
wait – in Object.wait()– 在Object.wait() 方法中
native – executing native co
de– 執行了原生程式碼
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秒鐘)
轉載於:https://my.oschina.net/tingzi/blog/191438