summaryrefslogtreecommitdiff
path: root/IntelFrameworkModulePkg
diff options
context:
space:
mode:
authorjgong5 <jgong5@6f19259b-4bc3-4df7-8a09-765794883524>2010-02-08 02:12:47 +0000
committerjgong5 <jgong5@6f19259b-4bc3-4df7-8a09-765794883524>2010-02-08 02:12:47 +0000
commit07341a33f2500cadd31ede356cac546c28e03ae5 (patch)
tree63c087fc1a146847354dd2448be74393463ad7d1 /IntelFrameworkModulePkg
parent85e385f42b3a93dd51d76173eb4083f9caf803d7 (diff)
downloadedk2-platforms-07341a33f2500cadd31ede356cac546c28e03ae5.tar.xz
Assume Tick value 1 as the beginning time of boot.
This is part of the fix of #202075 to make sure the usage model below doesn’t break: PERF_START (0, “Token1”, “Module1”, 1); PERF_END (0, “Token1”, Module1”, 0); git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9943 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'IntelFrameworkModulePkg')
-rw-r--r--IntelFrameworkModulePkg/Library/GenericBdsLib/Performance.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/IntelFrameworkModulePkg/Library/GenericBdsLib/Performance.c b/IntelFrameworkModulePkg/Library/GenericBdsLib/Performance.c
index 6bb60c1500..8f152a8e26 100644
--- a/IntelFrameworkModulePkg/Library/GenericBdsLib/Performance.c
+++ b/IntelFrameworkModulePkg/Library/GenericBdsLib/Performance.c
@@ -263,6 +263,12 @@ WriteBootToOsPerformanceData (
}
EntryIndex++;
if ((Handle == Handles[Index]) && (EndTicker != 0)) {
+ if (StartTicker == 1) {
+ StartTicker = StartValue;
+ }
+ if (EndTicker == 1) {
+ EndTicker = StartValue;
+ }
Ticker += CountUp ? (EndTicker - StartTicker) : (StartTicker - EndTicker);
}
}
@@ -303,6 +309,12 @@ WriteBootToOsPerformanceData (
ZeroMem (&mPerfData, sizeof (PERF_DATA));
AsciiStrnCpy (mPerfData.Token, Token, PERF_TOKEN_LENGTH);
+ if (StartTicker == 1) {
+ StartTicker = StartValue;
+ }
+ if (EndTicker == 1) {
+ EndTicker = StartValue;
+ }
Ticker = CountUp ? (EndTicker - StartTicker) : (StartTicker - EndTicker);
mPerfData.Duration = (UINT32) DivU64x32 (Ticker, (UINT32) Freq);