Filter and Group Command Line Reports
You can manage
reports from command line by using the following options:
vtune
Group Report Data
Use the
group-by option to group data in your report by some value, such as function. For multiple grouping levels, add arguments separated by commas (no spaces). Grouping columns show up first in the view.
To display a list of available groupings for a particular report, use
-help report
.
<report_name>
Examples:
- Write stack information for all functions in the threading analysis resultr00trand group data by call stack:vtune -report callstacks -r r001tr -group-by callstack
- Generate a hotspots report grouping data in this order:Process,Process ID,Module, andFunction:vtune -report hotspots -r r002hs –group-by process,process-id,module,function
Example:
Generate a report from the Microarchitecture Exploration
r001ue
result, and sort data in ascending order by the event columns INST_RETIRED.ANY
and
CPU_CLK_UNHALTED.CORE
.
vtune -report hw-events -r r001ue -sort-asc INST_RETIRED.ANY,CPU_CLK_UNHALTED.CORE
Filter Reports by Program Unit
You can narrow down your report to display performance data for a particular program unit by using this option:
where:
- <is one of the following values:program_unit>basic-block,frame,function,function-sync-obj,module,process,source-file,source-line,sync-obj,task,thread,computing-task,computing-instance
- <=|!=>are the operators 'equal to' (include) or 'not equal to' (exclude or filter out)
- <is the value to include or excludevalue>
- To display a list of available filters for a particular report, use-report.<report_name>-result<result_dir>-filter=?
- To specify multiple filter items, use multiple-filteroption attributes. Multiple values for the same column are combined with 'OR'. Values for different columns are combined with 'AND'.
Examples:
- Display a Hotspots report on the most recent result in the current working directory, but only include data on thesamplemodule:vtune -report hotspots -filter module=sample
- Include data from bothsample.dllandsample2.dllmodules, excluding all other modules:vtune -report hotspots -filter module=sample.dll -filter module=sample2.dll
- Display a Hotspots report that includes data for all processes exceptapp:vtune -report hotspots -filter process!=app
Filter by Call Stack Mode
You can filter the report by call stack display mode to set whether system functions display in the call stack data in your report
call-stack-mode
Possible values:
all
,
user-only
,
user-plus-one
.
Example:
Generate a Hotspots report from the most recent compatible result, group the result data by function, and only display user functions and system functions called directly from user functions:
vtune -report hotspots -group-by function -call-stack-mode user-plus-one
Filter by Column Name
To display a list of columns available for a particular report, type:
-report <
vtune
report_name
> -r <result_dir
> column=?Examples:
- Show grouping and data columns only for event columns with the*INST_RETIRED.*string in the title:vtune -R hw-events -r r000hs --column=INST_RETIRED.
- Show grouping and data columns only for columns with theIdleandSpinstrings in the title:vtune -R hotspots -r r001hs --column=Idle,Spin
Filter by Time Interval
To view data for a specific time range only, use the
option, where:
- <is the elapsed time in seconds for the start of the included time range. If unspecified, the time range begins at zero.begin_time>
- <is the elapsed time in seconds for the end of the included time range. If unspecified, the time range ends at total elapsed time.end_time>
Examples:
- Generate a Hotspots report from the r001tr result, grouped by the value in the function column. For thetime-filter, the start of the range is specified as 1.25, and the end of the range is left unbounded, so the report includes data starting from 1.25 seconds of elapsed time to the time when analysis completes:vtune -report hotspots -result-dir r001tr -group-by function -time-filter 1.25:
- Generate a Hotspots report from the r001tr result, grouped by the value in the function column. For thetime-filter, the start of the range is not specified, and the end of the range is 5.0, so the report includes data from the start of the analysis data to 5.0 seconds of elapsed time:vtune -report hotspots -result-dir r001tr -group-by function -time-filter :5.0
- Generate a report for both start and end values of the range specified, so the report includes data from 1.25 second to 5.0 seconds of elapsed time:vtune -report hotspots -result-dir r001tr -group-by function -time-filter 1.25:5.0