Series reviewed by: [email protected]
-----Original Message----- From: Yao, Jiewen [mailto:[email protected]] Sent: Wednesday, June 8, 2016 8:27 PM To: Zeng, Star <[email protected]>; [email protected] Cc: Gao, Liming <[email protected]>; Shia, Cinnamon <[email protected]>; Carsey, Jaben <[email protected]> Subject: RE: [PATCH V2 1/3] MdeModulePkg: Extend PEI_PERFORMANCE_LOG_HEADER Looks good. Series reviewed by: [email protected] > -----Original Message----- > From: Zeng, Star > Sent: Wednesday, June 8, 2016 6:24 PM > To: [email protected] > Cc: Gao, Liming <[email protected]>; Yao, Jiewen > <[email protected]>; Cinnamon Shia <[email protected]>; Carsey, > Jaben <[email protected]> > Subject: [PATCH V2 1/3] MdeModulePkg: Extend > PEI_PERFORMANCE_LOG_HEADER > > Add and assign CpuFreq/TimerStartValue/TimerEndValue into > PEI_PERFORMANCE_LOG_HEADER > > Cc: Liming Gao <[email protected]> > Cc: Jiewen Yao <[email protected]> > Cc: Cinnamon Shia <[email protected]> > Cc: Jaben Carsey <[email protected]> > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Star Zeng <[email protected]> > --- > MdeModulePkg/Include/Guid/Performance.h | 9 > +++++++-- > MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.c | 9 > +++++++++ > 2 files changed, 16 insertions(+), 2 deletions(-) > > diff --git a/MdeModulePkg/Include/Guid/Performance.h > b/MdeModulePkg/Include/Guid/Performance.h > index c40046c87811..ac2ef4b6ef0a 100644 > --- a/MdeModulePkg/Include/Guid/Performance.h > +++ b/MdeModulePkg/Include/Guid/Performance.h > @@ -4,7 +4,7 @@ > * performance protocol interfaces. > * performance variables. > > -Copyright (c) 2009 - 2013, Intel Corporation. All rights > reserved.<BR> > +Copyright (c) 2009 - 2016, Intel Corporation. All rights > +reserved.<BR> > This program and the accompanying materials are licensed and made > available under the terms and conditions of the BSD License that > accompanies this distribution. > The full text of the license may be found at @@ -32,12 +32,17 @@ > typedef struct { > UINT64 EndTimeStamp; > ///< End time point. > } PEI_PERFORMANCE_LOG_ENTRY; > > +#define PEI_PERFORMANCE_LOG_REVISION 0x1 > + > // > // The header must be aligned at 8 bytes. > // > typedef struct { > UINT32 NumberOfEntries; ///< The number of all > performance log entries. > - UINT32 Reserved; > + UINT32 Revision; > + UINT64 CpuFreq; > + UINT64 TimerStartValue; > + UINT64 TimerEndValue; > } PEI_PERFORMANCE_LOG_HEADER; > > > diff --git > a/MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.c > b/MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.c > index 62527b2c34d1..9cd2eee98988 100644 > --- a/MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.c > +++ b/MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.c > @@ -53,6 +53,9 @@ InternalGetPerformanceHobLog ( > EFI_HOB_GUID_TYPE *GuidHob; > UINTN PeiPerformanceSize; > UINT16 PeiPerformanceLogEntries; > + UINT64 Freq; > + UINT64 StartValue; > + UINT64 EndValue; > > ASSERT (PeiPerformanceLog != NULL); > ASSERT (PeiPerformanceIdArray != NULL); @@ -80,6 +83,12 @@ > InternalGetPerformanceHobLog ( > *PeiPerformanceLog = BuildGuidHob > (&gPerformanceProtocolGuid, PeiPerformanceSize); > *PeiPerformanceLog = ZeroMem (*PeiPerformanceLog, > PeiPerformanceSize); > > + (*PeiPerformanceLog)->Revision = > PEI_PERFORMANCE_LOG_REVISION; > + Freq = GetPerformanceCounterProperties (&StartValue, &EndValue); > + (*PeiPerformanceLog)->CpuFreq = Freq; > + (*PeiPerformanceLog)->TimerStartValue = StartValue; > + (*PeiPerformanceLog)->TimerEndValue = EndValue; > + > PeiPerformanceSize = sizeof (UINT32) * > PeiPerformanceLogEntries; > *PeiPerformanceIdArray = BuildGuidHob > (&gPerformanceExProtocolGuid, PeiPerformanceSize); > *PeiPerformanceIdArray = ZeroMem (*PeiPerformanceIdArray, > PeiPerformanceSize); > -- > 2.7.0.windows.1 _______________________________________________ edk2-devel mailing list [email protected] https://lists.01.org/mailman/listinfo/edk2-devel

