VSPerfReportVSPerfReport

VSPerfReport 命令列工具可用來建立使用「Visual StudioVisual Studio 分析工具」分析資料檔案的報告。VSPerfReport command line tool is used to create reports using Visual StudioVisual Studio Profiling Tools profiling data files. 預設報告格式為 .csv 檔案。The default report format is a .csv file.

VSPerfReport 會使用下列語法︰VSPerfReport uses the following syntax:

VSPerfReport [/U] vspfilename [/options]

請注意,filename 必須是有效的 .vsp 或 .vsps 檔案。Note that filename must be a valid .vsp or .vsps file.

VSPerfReport 命令列工具也可以用來比較 .vsp 或 .vsps 檔案。The VSPerfReport command line tool is also used to compare .vsp or .vsps files. 若要產生差異 ("diff") 報告,請使用下列語法︰To generate a difference ("diff") report, use the following syntax:

VSPerfReport [/U] /diff vspfilename1 vspfilename2 [/options]

vspfilename1 and vspfilename2 必須是有效的 .vsp 或 .vsps 檔案。vspfilename1 and vspfilename2 must be valid .vsp or .vsps files.

符號檔Symbol files

若要顯示符號資訊 (例如函式名稱與行號),VSPerfReport 需要存取已分析元件的符號 (.PDB) 檔與 Windows 符號檔。To display symbol information such as function names and line numbers, VSPerfReport requires access to the symbol (.PDB) files of the profiled components and to Windows symbol files. 如需詳細資訊,請參閱 如何:從命令列指定符號檔位置For more information, see How to: Specify symbol file locations from the command line.

一般報告選項General report options

下表描述一般報告格式選項,以及選取要報告之資料的選項。The following table describes the general report formatting options and the options that select the data to be reported.

選項。Options 描述Description
UU 報告輸出和重新導向的主控台輸出是以 Unicode 撰寫。Report output and redirected console output are written as Unicode. 務必優先指定此選項。Must be the first option specified.
Summary:[types]Summary:[types] 建立一或多個類型的報告。Creates one or more types of reports.

- All - 產生所有報告類型。- All - all report types are generated.
- CallerCallee - 函式之間的父/子關聯性。- CallerCallee - parent/child relationships between functions.
- Function - 已呼叫的函式。- Function - functions called.
- CallTree - 已呼叫的函式階層。- CallTree - hierarchy of functions called.
- Counter - 所有的標記,以及 Windows 效能計數器的值。- Counter - all marks together with Windows performance counter values.
- Ip - 已分析的指令。- Ip - instructions profiled.
- Life - 已配置物件的存留期 (已收集配置資料時可以使用)。- Life - lifetime of allocated objects (available when allocation data has been collected.)
- Line 原始程式碼行設定檔資料。- Line source code line profile data.
- Header - 報告包含檔案標頭資訊。- Header - report contains file header information.
- Mark 所有標記。- Mark all marks.
- Module - 已分析的模組。- Module - modules profiled.
- Process - 已分析的處理序。- Process - processes profiled.
- Thread - 已分析的執行緒。- Thread - threads profiled.
- Type - 配置的類型。- Type - allocated types.
- Contention - 資源爭用。- Contention - resource contentions.
- RuleWarnings - 效能規則問題- RuleWarnings - performance rule issues
- ETW - 程式碼分析執行中所收集的所有 Windows 事件追蹤 (ETW) 事件。- ETW - all Event Tracing for Windows (ETW) events collected in the profiling run. .etl 資料檔案必須位於其原始位置,或位於包含 .vsp 或 .vsps 檔案的目錄。The .etl data file must be in its original location or in the directory containing the .vsp or .vsps file.
XMLXml 以 XML 格式輸出報告。Output report in XML format.
CallTraceCallTrace 建立函式進入與離開、ETW 事件和標記的清單。Creates a list of function entry and exits, ETW events, and marks.
ClearPackedSymbolsClearPackedSymbols 從分析工具資料檔案移除先前內嵌的符號。Removes previously embedded symbols from a profiler data file. 在第二次執行 PackSymbols 之前,執行此命令。Run this command before running PackSymbols a second time.
SymbolPath:pathSymbolPath: path 指定包含分析工具資料檔案符號的一或多個搜尋路徑或符號伺服器。Specifies one or more search paths or symbol servers that contain symbols for the profiler data file.
DebugSymPathDebugSymPath 列出搜尋符號以及是否找到符號的位置。Lists the locations that are searched for symbols and whether they are found. 這個選項適合解決符號解析問題。This option is useful to resolve symbol resolution issues.
PackSymbolsPackSymbols 將符號儲存到分析資料 (.vsp) 檔案中,這樣不需要符號 (.pdb) 檔案就能進行分析。Saves symbols into the profiling data (.vsp) file so that symbol (.pdb) files are not required for analysis.
Output: path|filenameOutput: path|filename 指定產生之報告檔案的替代位置。Specifies an alternate location for the generated report files. 根據預設,會在目前的目錄中建立報告。By default, reports are created in the current directory.
SummaryFileSummaryFile 分析並將已分析的資訊儲存於 .vsps 摘要檔中。Analyze and save the analyzed information in a .vsps summary file.
PrintMarksPrintMarks 在指定的報告檔案中顯示所有標記的名稱與時間戳記。Show the names and timestamps for all marks in the specified report file.
?? 顯示使用資訊。Displays usage information.
NoLogoNoLogo 當執行報告時,隱藏版本資訊。Hides version information when the report is running.
UserRulesDirectoryUserRulesDirectory 指定包含使用者定義之效能規則的目錄 [尚未實作]。Specifies directory containing user-defined performance rules [Not yet implemented].

篩選選項Filter options

下表描述用於篩選可用資料的選項。The following table describes the options to filter the available data.

選項。Options 描述Description
JustMyCode[[ caller ] [, callee ]]JustMyCode[:[caller][,callee]] 只顯示使用者應用程式函式呼叫;隱藏系統呼叫。Only show user application function calls; hide system calls.

- 無參數 - 隱藏所有系統函式。- No parameters - hide all system functions.
- caller - 顯示呼叫應用程式函式的一個系統函式層級。- caller - show one level of system functions that call application functions.
- callee - 顯示使用者應用程式函式所呼叫的一個系統函式層級。- callee - show one level of system functions that are called by user application functions.
StartTime:[]StartTime:[value] 只顯示值 (以毫秒為單位) 之後所收集的資料。Only show data collected after value (in milliseconds.)
EndTime:[]EndTime:[value] 只顯示值 (以毫秒為單位) 之前所收集的資料。Only show data collected before value (in milliseconds.)
FilterFile: VSPFFileFilterFile: VSPFFile 指定從 [Visual Studio 效能報告] 視窗所產生之篩選器檔案的位置。Specifies the location of a filter file that was generated from the Visual Studio Performance Report window.
MsFilter:[starttime,duration]MsFilter:[starttime,duration] 只顯示從 starttime 直到 duration 長度(以毫秒為單位) 的資料。Only show data from starttime until the length of duration (in milliseconds.)
進程:[pid]Process:[pid] 只顯示來自所指定處理序的資料。Only show data from the specified process.
Thread:[threadid]Thread:[threadid] 只顯示來自所指定執行緒的資料。Only show data from the specified thread.
Thread:[threadid,processid]Thread:[threadid,processid] 只顯示來自與指定處理序相關聯之指定執行緒的資料。Only show data from the specified thread associated with the specified process.

差異報告選項Difference report options

下表描述用來比較報告檔案的選項。The following table describes the options for comparing report files.

選項。Options 描述Description
Diff vspfile1 vspfile2Diff vspfile1 vspfile2 比較兩個報告檔案 (.vsp 或 .vsps)。Compare two report files (.vsp or .vsps) files. 使用 diff 選項將會忽略摘要選項。Summary options will be ignored using the diff option.
Diff:[value]Diff:[value] 低於此臨界值將會略過兩個值之間的差異。Below this threshold value the difference between two values will be disregarded. 此外,將不會顯示包含值低於此臨界值的新資料。Also, new data with values under this threshold will not be shown.
DiffTable:[tablename]DiffTable:[tablename] 使用此特定資料表來比較檔案。Use this specific table to compare files. 預設為函式資料表。The default is the functions table.
DiffColumn:[columnname]DiffColumn:[columnname] 使用此特定資料行來比較值。Use this specific column compare values. 預設為專有樣本百分比資料行。The default is the exclusive samples percent column.
QueryDiffTablesQueryDiffTables 列出提供之兩個報告檔案的有效資料表和資料行。List the valid tables and columns for the two report files provided.

另請參閱See also