Speed up SuperPMI (#49962)
authorBruce Forstall <brucefo@microsoft.com>
Sun, 21 Mar 2021 22:07:04 +0000 (15:07 -0700)
committerGitHub <noreply@github.com>
Sun, 21 Mar 2021 22:07:04 +0000 (15:07 -0700)
commit227a992b9c71154f3e40b143a825e4563030432c
treeced66c206e1b77bd7585b727895d2df450a3d4fa
parent81223063790ca5d7312591deb04570938fb80761
Speed up SuperPMI (#49962)

SuperPMI logging was doing a lot of work even if no log output was
asked for. For example, there are LogDebug() calls in the recordRelocation
path that were doing all the printf work and memory allocation even though
we were not logging anything.

Add a fast-path return to avoid all this unnecessary work.
src/coreclr/ToolBox/superpmi/superpmi-shared/logging.cpp