Branch: refs/heads/master Home: https://github.com/tianocore/edk2 Commit: d6101acb083eb0b79e3ca35c18ea87003850e3c4 https://github.com/tianocore/edk2/commit/d6101acb083eb0b79e3ca35c18ea87003850e3c4 Author: Oliver Smith-Denny <o...@microsoft.com> Date: 2025-05-05 (Mon, 05 May 2025)
Changed paths: M MdeModulePkg/Core/Dxe/Gcd/Gcd.c Log Message: ----------- MdeModulePkg: Shortcircuit GCD Dumping Logic if Not Printing 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 <o...@microsoft.com> To unsubscribe from these emails, change your notification settings at https://github.com/tianocore/edk2/settings/notifications _______________________________________________ edk2-commits mailing list edk2-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-commits