Reviewed-by: Jaben Carsey <[email protected]>
> -----Original Message----- > From: edk2-devel [mailto:[email protected]] On Behalf Of > Cinnamon Shia > Sent: Thursday, April 28, 2016 7:42 PM > To: [email protected] > Cc: Carsey, Jaben <[email protected]>; Qiu, Shumin > <[email protected]>; Zeng, Star <[email protected]> > Subject: [edk2] [PATCH 2/2] PerformancePkg/Dp_App: Fix the error message > "Timer library instance error!" > Importance: High > > When executing shell dp command, there is an error message "Timer library > instance error!" > > The error message "Timer library instance error!" should be for the case > about > duration > EndTimeStamp if CountUp or duration < StartTimeStamp if > CountDown. > > But if the EndTimeStamp of an entry is not added, it should not the case to > catch. > > This change fixes the error message "Timer library instance error!" from the > "BdsAttempt" entry which is logged when trying to boot a boot option. > > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Cinnamon Shia <[email protected]> > --- > PerformancePkg/Dp_App/DpUtilities.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/PerformancePkg/Dp_App/DpUtilities.c > b/PerformancePkg/Dp_App/DpUtilities.c > index b49844a..f5ef9cf 100644 > --- a/PerformancePkg/Dp_App/DpUtilities.c > +++ b/PerformancePkg/Dp_App/DpUtilities.c > @@ -2,6 +2,7 @@ > Utility functions used by the Dp application. > > Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR> > + (C) Copyright 2015-2016 Hewlett Packard Enterprise Development LP<BR> > This program and the accompanying materials > are licensed and made available under the terms and conditions of the BSD > License > which accompanies this distribution. The full text of the license may be > found at > @@ -82,6 +83,10 @@ GetDuration ( > UINT64 Duration; > BOOLEAN Error; > > + if (Measurement->EndTimeStamp == 0) { > + return 0; > + } > + > // PERF_START macros are called with a value of 1 to indicate > // the beginning of time. So, adjust the start ticker value > // to the real beginning of time. > -- > 2.8.1.windows.1 > > _______________________________________________ > edk2-devel mailing list > [email protected] > https://lists.01.org/mailman/listinfo/edk2-devel _______________________________________________ edk2-devel mailing list [email protected] https://lists.01.org/mailman/listinfo/edk2-devel

