Commit 1a5fa06
authored
Format output xml and align GUID format for fpdt_parser (#1006)
Format output xml and align GUID format for fpdt_parser.
Apply `minidom` to format the output xml of the `fpdt_parser.py` to improve readability.
The script was not adding entries to FBDT table so the output is not a proper tree structure.
Before it was:
```
|- fbpt_header
|- fbpt_record
|- fbpt_record
```
Now it is:
```
|- fbpt_header
| |- fbpt_record
| |- fbpt_record
```
it can be properly consumed by `perf_report_generator.py` to generate perf report. Before this change there will be 0 entries in the report because the input structure doesn't match what the script needs.
Update the GUID format for different entries to make sure the output GUID format stay the same and can be recognized by the perf_report_generator.py.
Add xml formatter to make sure the output xml more readable.
Examples for GUID format change:
```
Before this fix:
For DynamicStringEvent:
`<GUID Value="23C9322F-2AF2-476A-BC4C-26BC-8826-6C71"/>`
For DualGuidStringEvent:
`<GUID1 Value="6D33944A-EC75-4855-A54D-809C75241F6C"/>`
`<GUID2 Value="7B94C75C-36A4-4AA4-A1DF-14BC9A049AE4"/>`
After this fix:
All event guids will be in the same format of
`<GUID1 Value="6D33944A-EC75-4855-A54D-809C75241F6C"/>`
```
With this change the `perf_report_generator.py` can successfully parse these GUIDs and map to the right module name.
- [x] Breaking change?
Detail of the changes can be seen above. The structure and content of the output xml for `fpdt_parser.py` changed.
- [x] Integration instruction:
Use `fpdt_parser.py` first and use the output xml file as the input for the `perf_report_generator.py` to get perf report.1 parent 0dc2700 commit 1a5fa06
File tree
2 files changed
+29
-15
lines changed- edk2toolext/perf
- tests.unit
2 files changed
+29
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| 80 | + | |
80 | 81 | | |
81 | 82 | | |
82 | 83 | | |
| |||
576 | 577 | | |
577 | 578 | | |
578 | 579 | | |
579 | | - | |
| 580 | + | |
580 | 581 | | |
581 | 582 | | |
582 | 583 | | |
| |||
705 | 706 | | |
706 | 707 | | |
707 | 708 | | |
708 | | - | |
| 709 | + | |
709 | 710 | | |
710 | 711 | | |
711 | 712 | | |
| |||
873 | 874 | | |
874 | 875 | | |
875 | 876 | | |
876 | | - | |
| 877 | + | |
877 | 878 | | |
878 | 879 | | |
879 | 880 | | |
880 | 881 | | |
881 | 882 | | |
882 | 883 | | |
883 | 884 | | |
884 | | - | |
| 885 | + | |
885 | 886 | | |
886 | 887 | | |
887 | 888 | | |
| |||
1473 | 1474 | | |
1474 | 1475 | | |
1475 | 1476 | | |
| 1477 | + | |
1476 | 1478 | | |
1477 | 1479 | | |
1478 | 1480 | | |
| |||
1612 | 1614 | | |
1613 | 1615 | | |
1614 | 1616 | | |
1615 | | - | |
1616 | | - | |
1617 | | - | |
| 1617 | + | |
| 1618 | + | |
| 1619 | + | |
1618 | 1620 | | |
1619 | 1621 | | |
1620 | 1622 | | |
| |||
1638 | 1640 | | |
1639 | 1641 | | |
1640 | 1642 | | |
| 1643 | + | |
1641 | 1644 | | |
1642 | | - | |
| 1645 | + | |
1643 | 1646 | | |
1644 | | - | |
1645 | | - | |
| 1647 | + | |
| 1648 | + | |
| 1649 | + | |
| 1650 | + | |
| 1651 | + | |
| 1652 | + | |
| 1653 | + | |
| 1654 | + | |
| 1655 | + | |
| 1656 | + | |
1646 | 1657 | | |
1647 | 1658 | | |
1648 | 1659 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
342 | 342 | | |
343 | 343 | | |
344 | 344 | | |
345 | | - | |
| 345 | + | |
346 | 346 | | |
347 | 347 | | |
348 | 348 | | |
| |||
614 | 614 | | |
615 | 615 | | |
616 | 616 | | |
617 | | - | |
618 | | - | |
| 617 | + | |
| 618 | + | |
619 | 619 | | |
620 | 620 | | |
621 | 621 | | |
| |||
1115 | 1115 | | |
1116 | 1116 | | |
1117 | 1117 | | |
| 1118 | + | |
1118 | 1119 | | |
1119 | 1120 | | |
1120 | 1121 | | |
| |||
1268 | 1269 | | |
1269 | 1270 | | |
1270 | 1271 | | |
1271 | | - | |
| 1272 | + | |
1272 | 1273 | | |
1273 | 1274 | | |
1274 | 1275 | | |
| |||
1297 | 1298 | | |
1298 | 1299 | | |
1299 | 1300 | | |
| 1301 | + | |
1300 | 1302 | | |
1301 | 1303 | | |
1302 | 1304 | | |
1303 | | - | |
| 1305 | + | |
| 1306 | + | |
1304 | 1307 | | |
1305 | 1308 | | |
1306 | 1309 | | |
| |||
0 commit comments