Create a CSV File with External Data
Intel® VTune™
can process and integrate performance statistics collected externally with a
custom сollector or with your target application in parallel with the native
Profiler
VTune
analysis. To achieve this, provide the collected custom data as a
Profiler
csv
file with a predefined structure and save this file to the
VTune
result directory.
Profiler
VTune
can load and process the following data types:
Profiler
To make the
VTune
interpret the custom statistics from the
Profiler
csv
file, make sure the file format meets the following requirements:
File Name
csv
filename should specify the hostname where your custom collector gathered the data, following these format requirements:
Filename format:
[
user-defined
]-hostname-<hostname-of-system
>.csv Where:
- [is an option string, for example, describing the type of data collecteduser-defined]
- -hostname-is arequiredtext that must be specified verbatim
- <is the name of the system where the data is collected. If you use a custom collector you can retrieve the hostname by using thehostname-of-system>environment variable. If you create a CSV file to import into an existing result, you can either refer to the Summary window that provides the required hostname in theVTUNE_HOSTNAMECollection and Platform Infosection >Computer name, or check the correspondingsummary report:vtune.-r <result> -R summaryvtune
Example:
phases-hostname-octagon53.csv
If the hostname in the
csv
file name is not specified or specified incorrectly, the
VTune
displays the imported data with the following limitations:
Profiler
- Event timestamps are represented in the UTC format.
- Only global data (not attributed to specific threads/processes) are displayed.
Format for Interval Values
Interval data may be optionally bound to a thread ID.
VTune
represents data not bound to a particular thread (there are no TID values in the
Profiler
csv
file) as
frames
. Data bound to a thread (there are TID values in the
csv
file) is represented as
tasks
.
For imported
interval
values, use 5 columns, where the order of columns is important:
name,start_tsc.[QPC|CLOCK_MONOTONIC_RAW|RDTSC|UTC],end_tsc,[pid],[tid]
Column Name
| Description
|
---|---|
name | Name of an event.
|
start_tsc.[QPC|CLOCK_MONOTONIC_RAW|RDTSC|UTC] | Event start timestamp. This column name has a
QPC|CLOCK_MONOTONIC_RAW ,
RDTSC or
UTC suffix that indicates the type of a timestamp counter:
|
end_tsc | Event end timestamp.
|
pid | Process ID, provided optionally. Absence of a value in this field does not affect how a result is imported except for extremely rare cases when the following conditions are all met:
You may specify this field as an empty value within the data, or skip it from both file header and data entirely.
|
tid | Thread ID, provided optionally. If a value is specified in this field, the interval will be interpreted as a Task; otherwise, interval will be interpreted and shown as a Frame.
You may specify this field as an empty value within the data, or skip it from both file header and data entirely.
|
Format for Discrete Values
You can import two types of discrete values:
- Cumulative data type (for example, distance, hardware event count), specified with the.COUNTsuffix in thecsvfile
- Instantaneous data type (for example, power consumption, temperature), specified with the.INSTsuffix in thecsvfile
The following format is required:
tsc.[QPC|CLOCK_MONOTONIC_RAW|RDTSC|UTC],
CounterName1
.COUNT|INST[,CounterName2
.COUNT|INST],[pid],[tid]Column Name
| Description
|
---|---|
tsc.[QPC|CLOCK_MONOTONIC_RAW|RDTSC|UTC] | Event start timestamp. This column has a
QPC|CLOCK_MONOTONIC_RAW ,
RDTSC , or
UTC suffix that indicates the type of a timestamp counter:
|
CounterName1 | Name of the event. Each counter has a separate column.
COUNT suffix is used to specify a cumulative counter value.
INST suffix is used to specify instantaneous counter values.
|
pid | Process ID, provided optionally. Absence of a value in this field does not affect how a result is imported except for extremely rare cases when the following conditions are all met:
You may specify this field as an empty value within the data, or skip it from both file header and data entirely.
|
tid | Thread ID, provided optionally. If a value is specified in this field, the interval will be interpreted as a Task; otherwise, interval will be interpreted and shown as a Frame.
You may specify this field as an empty value within the data, or skip it from both file header and data entirely.
|
Additional Requirements
- Make sure eachcsvfile contains only one table. If you need to load several tables, create severalcsvfiles with one table per file.
- Use commas as value separators.
- Use RDTSC, UTC or performance counter (QueryPerformanceCounteron Windows OS andCLOCK_MONOTONIC_RAWon Linux OS) to specify events timestamp.