Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Q35 Performance

Performance on Q35 is managed by a Rust component that writes and publishes the Firmware Basic Boot Performance Table (FBPT). For more information on the functionality of the performance component, see the performance component documentation in the main patina repo. This document focuses on how to collect and interpret performance results.

Collecting Performance

1. Enable the Performance Component

The performance component must be enabled to collect FBPT results. Example code can be found under Enabling Performance Measurements in the main patina repo.

Note

Performance collection is already enabled by default for Q35 in patina-dxe-core-qemu.

2. Boot and Collect FBPT Binary

When enabled, the performance component collects FBPT results during UEFI boot. This is done by setting BLD_*_PERF_TRACE_ENABLE=TRUE as a build variable to stuart_build:

stuart_build -c Platforms/QemuQ35Pkg/PlatformBuild.py --flashrom BLD_*_PERF_TRACE_ENABLE=TRUE

For more information on the stuart system, see Building the Firmware.

To collect raw FBPT results from the UEFI shell, FbptDump.efi must be built. Add the following to your platform .dsc:

UefiTestingPkg\PerfTests\FbptDump\FbptDump.inf

The source code for FbptDump is in mu_plus.

3. Interpret Performance Results

Pip Modules

Two tools are necessary to convert the resulting .bin file into a readable HTML results file.

First, install edk2-pytool-extensions:

pip install edk2-pytool-extensions

Then, run fpdt_parser to retrieve the XML, and perf_report_generator to retrieve the final HTML page:

fpdt_parser -b path_to_bin_file.bin -x output_file_name.xml
perf_report_generator -i path_to_xml_file.xml -r output_file_name.html -s path_to_directory_with_guids/

Scripts

There are two scripts to convert the FBPT binary dump into usable results in edk2-pytool-extensions:

Sample Result

An example of these results can be found in the Sample Q35 Performance Report.