diff options
author | Oliver Smith-Denny <osde@microsoft.com> | 2025-04-17 14:02:56 -0700 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2025-05-05 20:51:44 +0000 |
commit | d6101acb083eb0b79e3ca35c18ea87003850e3c4 (patch) | |
tree | 8f2ae0eef8d442ca3434f2993b14fa4e47a7dac1 /BaseTools/BinWrappers | |
parent | 2cff8743ced9c2f79014a19077e91537fb938bb8 (diff) | |
download | edk2-master.tar.gz edk2-master.tar.bz2 edk2-master.zip |
CoreDumpGcdMemorySpaceMap() gets called on every update to
the GCD, but it only prints if DEBUG_GCD is set. However,
the compiler is not smart enough to remove all of this logic
if we are not printing anything, so we end up needlessly
allocating memory for the copy of the map and spending many
cycles looping through each entry, only to not print anything.
This code is compiled out on release builds, but slows down
debug builds that aren't printing at DEBUG_GCD level.
This patch updates CoreDumpGcdMemorySpaceMap() to shortcircuit
and immediately exit if DEBUG_GCD is not set. It also adds
the same logic to CoreDumpGcdIoSpaceMap(), which is called
less frequently, but has the same issue.
Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
Diffstat (limited to 'BaseTools/BinWrappers')
0 files changed, 0 insertions, 0 deletions