在使用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/