How to export Profiler data to BTF format
In this topic:
Best Trace Format (BTF) is a trace format compatible with various timing analysis tools. It stores information in a common CSV format, allowing detailed analysis of system behavior chronologically. winIDEA's Analyzer can export OS-aware traces into BTF. By using Trace Configuration Helper (iTCHi), the configuration for BTF export is part of the Profiler XML automatically.
•winIDEA
•BlueBox
•Task State Profiling
Each Task and ISR object should reference a BTF mapping, as shown in the following listing.
<BTFMappingType>TypeEnum_BTFMapping</BTFMappingType> |
The mapping maps a state to a BTF transition, as shown in Listing 6. The Name-tag is the state as displayed in the winIDEA Profiler timeline, and the Value-tag is the respective BTF transition for a change to that state.
If you already use iTCHi for Task State Profiling, it can be set to automatically create the BTF mapping.
State information is not included by default if you use Running Task/ISR Profiling. To access Task and ISR states for the BTF export, you can configure winIDEA's Analyzer with iTCHi.
The recommended way to export BTF is a Task State trace. Only use the approach below in cases where Task State tracing is not feasible. |
Ensure that both orti_file and profiler_xml_file are included in your iTCHi configuration file. |
Execute iTCHi using the following command: |
itchi-bin.exe --running_taskisr_btf |
Load symbols via Debug | Load Symbols Only. |
This will to ensure the latest Profiler XML is used.
Record a trace with the necessary configuration for: |
•Tasks
•ISRs
•Runnables (optional)
Press the Export button in the Profiler Timeline toolbar. |
In the Export dialog ensure that: |
•BTF is selected as Format.
•You specify an output file.
•Timeline is enabled and Entire session is selected.
Click on Export. |
Example:
<TypeEnum> <Name>TypeEnum_BTFMapping</Name> <Enum><Name>NEW</Name><Value>Active</Value></Enum> <Enum><Name>READY</Name><Value>Ready</Value></Enum> <Enum><Name>READY_SYNC</Name><Value>Ready</Value></Enum> <Enum><Name>RUNNING</Name><Value>Running</Value></Enum> <Enum><Name>WAITING_EVENT</Name><Value>Waiting</Value></Enum> <Enum><Name>WAITING_SEM</Name><Value>Waiting</Value></Enum> <Enum><Name>READ_ASYNC</Name><Value>Waiting</Value></Enum> <Enum><Name>WAITING</Name><Value>Waiting</Value></Enum> <Enum><Name>TERMINATED_TASK</Name><Value>Terminated</Value></Enum> <Enum><Name>TERMINATED_ISR</Name><Value>Terminated</Value></Enum> <Enum><Name>INVALID</Name><Value>Terminated</Value></Enum> <Enum><Name>QUARANTINED</Name><Value>Terminated</Value></Enum> <Enum><Name>SUSPENDED</Name><Value>Terminated</Value></Enum> </TypeEnum> |
•Best Trace Format (BTF) Technical Specification - Vector