mirror of https://github.com/acidanthera/audk.git
ArmVirtPkg: disable list length checks in NOOPT and DEBUG builds
In NOOPT and DEBUG builds, if "PcdMaximumLinkedListLength" is nonzero, then several LIST_ENTRY *node* APIs in BaseLib compare the *full* list length against the PCD. This turns the time complexity of node-level APIs from constant to linear, and that of full-list manipulations from linear to quadratic. (See some example OVMF numbers in the previous patch.) Checking list lengths against an arbitrary maximum -- default value, and current ArmVirtPkg setting: 1,000,000 -- seems useless even in NOOPT and DEBUG builds, while the cost is significant; so set the PCD to 0. Cc: Ard Biesheuvel <ard.biesheuvel@arm.com> Cc: Julien Grall <julien@xen.org> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Philippe Mathieu-Daudé <philmd@redhat.com> Cc: Sami Mujawar <sami.mujawar@arm.com> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3152 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Acked-by: Ard Biesheuvel <ard.biesheuvel@arm.com> Message-Id: <20210113085453.10168-11-lersek@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
This commit is contained in:
parent
d3f3c94201
commit
6e55868631
|
@ -290,7 +290,7 @@
|
|||
[PcdsFixedAtBuild.common]
|
||||
gEfiMdePkgTokenSpaceGuid.PcdMaximumUnicodeStringLength|1000000
|
||||
gEfiMdePkgTokenSpaceGuid.PcdMaximumAsciiStringLength|1000000
|
||||
gEfiMdePkgTokenSpaceGuid.PcdMaximumLinkedListLength|1000000
|
||||
gEfiMdePkgTokenSpaceGuid.PcdMaximumLinkedListLength|0
|
||||
gEfiMdePkgTokenSpaceGuid.PcdSpinLockTimeout|10000000
|
||||
gEfiMdePkgTokenSpaceGuid.PcdUefiLibMaxPrintBufferSize|320
|
||||
|
||||
|
|
Loading…
Reference in New Issue