呼叫樹狀圖檢視 - 爭用資料Call Tree view - contention data

[呼叫樹狀圖] 檢視顯示在分析的應用程式中周遊的函式執行路徑。The Call Tree view displays the function execution paths that were traversed in the profiled application. 樹狀圖的根是應用程式或元件的進入點。The root of the tree is the entry point into the application or the component. 每個函式節點都會列出它呼叫的所有函式,以及因函式與其他執行緒或處理序爭用資源而遭封鎖的次數和時間長度。Each function node lists all functions that it called, the number of times that the function was blocked, and the amount of time that the function was blocked because it was contending for a resource with other threads or processes.

[呼叫樹狀圖] 檢視中的值,適用於呼叫樹狀圖中父函式所呼叫的函式執行個體。The values in the Call Tree view are for the function instances that were called by the parent function in the call tree. 百分比值的計算方式是比較函式執行個體值與執行程式碼剖析期間的爭用總數。Percentage values are calculated by comparing the function instance value to the total number of contentions in the profiling run.

反白顯示執行最忙碌路徑Highlight the execution hot path

[呼叫樹狀圖] 檢視可以展開並反白顯示建立了大部分爭用的處理序或函式的執行路徑。The Call Tree view can expand and highlight the execution path of the process or function that created the most contentions.

  • 若要顯示最常使用的路徑,以滑鼠右鍵按一下處理序或函式,然後按一下 [展開最忙碌路徑]。To display the most active path, right-click the process or function, and then click Expand Hot Path.

設定呼叫樹狀圖根節點Set the Call Tree root node

執行程式碼剖析期間的每個處理序都會顯示為根節點。Each process in the profiling run appears as a root node. 若要設定 [呼叫樹狀圖] 檢視的開始節點,以滑鼠右鍵按一下要設為開始節點的節點,然後按一下 [設定根目錄]。To set the starting node of the Call Tree view, right-click the node that you want to set as the start node, and then click Set Root.

設定根節點時,除了所選取節點的樹狀子目錄以外,會從檢視中排除所有其他的項目。When you set the root node, you eliminate all other entries from the view except for the subtree of the node that you selected. 若要將根節點重設回原始節點,在 [呼叫樹狀圖] 檢視上按一下滑鼠右鍵,然後按一下 [重設根目錄]。To reset the root node back to the original node, right-click in the Call Tree view, and then click Reset Root.

ColumnColumn 描述Description
專有封鎖時間Exclusive Blocked Time 在此執行路徑中,此函式的執行個體遭到封鎖而無法在執行程式碼剖析期間執行的時間。The time that instances of this function in this execution path were blocked from executing in the profiling run. 此時間不包括函式所呼叫的子函式封鎖時間。The time does not include the blocked time of child functions that were called by the function.
專有封鎖時間 %Exclusive Blocked Time % 執行程式碼剖析期間,屬於此執行路徑中此函式的專有封鎖時間佔所有封鎖時間的百分比。The percentage of all blocked time in the profiling run that was exclusive blocked time for this function in this execution path.
專有爭用Exclusive Contentions 在此執行路徑中,於此函式的執行個體中發生的爭用數目。The number of contentions that occurred in instances of this function in this execution path. 此數目不包括函式所呼叫之子函式的爭用。The number does not include contentions of child functions called by the function.
專有爭用 %Exclusive Contentions % 執行程式碼剖析期間,當樹狀圖中的父函式呼叫此函式時,屬於此函式執行個體的專用爭用佔所有爭用的百分比。The percentage of all contentions in the profiling run that were exclusive contentions of the instances of this function that were called by the parent function in the call tree.
函數位址Function Address 函式的位址。The address of the function.
函數名稱Function Name 函式的完整格式名稱。The fully qualified name of the function.
內含封鎖時間Inclusive Blocked Time 在此執行路徑中,此函式的執行個體遭到封鎖而無法在執行程式碼剖析期間執行的時間總計。The total time that the instances of this function in this execution path were blocked from executing in the profiling run. 此時間包括函式所呼叫的子函式封鎖時間。The time includes the blocked time of child functions called by the function.
內含封鎖時間 %Inclusive Blocked Time % 執行程式碼剖析期間,屬於此執行路徑中此函式執行個體的內含封鎖時間佔所有封鎖時間的百分比。The percentage of all blocked time in the profiling run that was the inclusive blocked time for the instances of this function in this execution path.
內含爭用Inclusive Contentions 在此執行路徑中,封鎖此函式執行個體的爭用總數。The total number of contentions that blocked instances of this function in this execution path. 此數目包括函式所呼叫之子函式的爭用。The number includes the contentions of child functions called by the function.
內含爭用 %Inclusive Contentions % 執行程式碼剖析期間,屬於此執行路徑中此函式執行個體的內含爭用佔所有爭用的百分比。The percentage of all contentions in the profiling run that were inclusive contentions of the instances of this function in this execution path.
LevelLevel 函式在呼叫樹狀圖中的層級。The level of the function in the call tree. 只存在於 VSReport 命令列報表中。Only in VSReport command-line reports. 如需詳細資訊,請參閱 VSPerfReportFor more information, see in VSPerfReport.
函式行號Function Line Number 原始程式檔中這個函式的開頭行號。The line number of the start of this function in the source file.
模組名稱Module Name 包含該函式的模組名稱。The name of the module that contains the function.
模組路徑Module Path 包含該函式的模組路徑。The path of the module that contains the function.
處理序識別碼Process ID 分析執行的處理序 ID (PID)。The process ID (PID) of the profiling run.
進程名稱Process Name 處理序的名稱。The name of the process.
來源檔案Source File 含有這個函式定義的原始程式檔。The source file that contains the definition for this function.

另請參閱See also