In the commit message "The error message "Timer library instance error!" should 
be for the case about duration > EndTimeStamp if CountUp or duration < 
StartTimeStamp if CountDown", you were saying when the Error will be TRUE, 
right?
If CountUp, Error will be TRUE when duration > EndTimeStamp, it is correct.
But if CoundDown, Error will be *FALSE* when duration < StartTimeStamp 
according to "Error = (BOOLEAN)(Duration > Measurement->StartTimeStamp".

Thanks,
Star
-----Original Message-----
From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Shia, 
Cinnamon
Sent: Friday, April 29, 2016 7:03 PM
To: Zeng, Star <star.z...@intel.com>
Cc: Carsey, Jaben <jaben.car...@intel.com>; edk2-devel@lists.01.org; Qiu, 
Shumin <shumin....@intel.com>
Subject: Re: [edk2] [PATCH 2/2] PerformancePkg/Dp_App: Fix the error message 
"Timer library instance error!"

Hi Star,

Thanks for your review.

"duration < StartTimeStamp" is for the case of the timer counting down.

Below is the source code for your reference:

if (TimerInfo.CountUp) {
  Duration = Measurement->EndTimeStamp - Measurement->StartTimeStamp;
  Error = (BOOLEAN)(Duration > Measurement->EndTimeStamp);  } else {
  Duration = Measurement->StartTimeStamp - Measurement->EndTimeStamp;
  Error = (BOOLEAN)(Duration > Measurement->StartTimeStamp);  }

Thanks,
Cinnamon Shia

On 2016?4?29?, at 13:30, Zeng, Star 
<star.z...@intel.com<mailto:star.z...@intel.com>> wrote:

Cinnamon,

On 2016/4/29 10:42, Cinnamon Shia wrote:
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.

The information "duration < StartTimeStamp" should be "duration > 
StartTimeStamp", right?

With this updated, you can have my Reviewed-by: Star Zeng 
<star.z...@intel.com<mailto:star.z...@intel.com>>.
Same comments to another patch in ShellPkg.

If you agree, you do not need resend the patch, I can help push the patches.

I have other comments are not related to these patches.
Could you help send patch to remove "HP_ISS_EDK2_CONTRIUTION" in 
ShellPkg\Library\UefiDpLib\DpTrace.c comments?
And could you send patch to remove InitCumulativeData() in 
PerformancePkg\Dp_App\Dp.c as the function is not used by Dp in PerformancePkg?


Thanks,
Star


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 
<cinnamon.s...@hpe.com<mailto:cinnamon.s...@hpe.com>>
---
 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.


_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to