MdeModulePkg: Add DEBUG statement when reaching max perf log entries

Add a DEBUG statement when the number of PEI perf log entries
exceeds PcdMaxPeiPerformanceLogEntries

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Samer El-Haj-Mahmoud <samer.el-haj-mahmoud@hpe.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18714 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Samer El-Haj-Mahmoud 2015-11-02 02:38:24 +00:00 committed by lzeng14
parent 8aa6ebe83f
commit 32c8c88df5
1 changed files with 2 additions and 0 deletions

View File

@ -7,6 +7,7 @@
number of performance logging entry is specified by PcdMaxPeiPerformanceLogEntries. number of performance logging entry is specified by PcdMaxPeiPerformanceLogEntries.
Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR> Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
(C) Copyright 2015 Hewlett Packard Enterprise Development LP<BR>
This program and the accompanying materials This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License 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 which accompanies this distribution. The full text of the license may be found at
@ -183,6 +184,7 @@ StartPerformanceMeasurementEx (
InternalGetPerformanceHobLog (&PeiPerformanceLog, &PeiPerformanceIdArray); InternalGetPerformanceHobLog (&PeiPerformanceLog, &PeiPerformanceIdArray);
if (PeiPerformanceLog->NumberOfEntries >= PcdGet8 (PcdMaxPeiPerformanceLogEntries)) { if (PeiPerformanceLog->NumberOfEntries >= PcdGet8 (PcdMaxPeiPerformanceLogEntries)) {
DEBUG ((DEBUG_ERROR, "PEI performance log array out of resources\n"));
return RETURN_OUT_OF_RESOURCES; return RETURN_OUT_OF_RESOURCES;
} }
Index = PeiPerformanceLog->NumberOfEntries++; Index = PeiPerformanceLog->NumberOfEntries++;