From: Star Zeng Date: Mon, 7 Aug 2017 07:28:46 +0000 (+0800) Subject: ShellPkg UefiDpLib: Init CustomCumulativeData.MinDur X-Git-Tag: edk2-stable201903~3642 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=3cf737c74b0f2fa2d2c6a861343bde6fa2473a3f ShellPkg UefiDpLib: Init CustomCumulativeData.MinDur Init CustomCumulativeData.MinDur to PERF_MAXDUR, otherwise the MinDur displayed for custom cumulative data will be always 0, but not the real shortest duration. Cc: Liming Gao Cc: Ruiyu Ni Cc: Cinnamon Shia Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng Reviewed-by: Liming Gao --- diff --git a/ShellPkg/Library/UefiDpLib/Dp.c b/ShellPkg/Library/UefiDpLib/Dp.c index 35ead751be..94fa61c710 100644 --- a/ShellPkg/Library/UefiDpLib/Dp.c +++ b/ShellPkg/Library/UefiDpLib/Dp.c @@ -250,7 +250,7 @@ ShellCommandRunDp ( if (CustomCumulativeData == NULL) { return SHELL_OUT_OF_RESOURCES; } - CustomCumulativeData->MinDur = 0; + CustomCumulativeData->MinDur = PERF_MAXDUR; CustomCumulativeData->MaxDur = 0; CustomCumulativeData->Count = 0; CustomCumulativeData->Duration = 0;