That is a very good enhancement, so that we can have a generic DP tool to work 
on all platforms, ideally.

I fully agree that we should remove TimerLib dependency, because TimerLib is 
the platform scope.
There should be no compatibility concern because DP tool should bind to each 
platform build.

But I have a little concern on the "PerfDataMemAddr" variable dependency, 
because it is produced by BDS.
Different platforms may have different BDS solution, it might not use the BDS 
in MdeModulePkg or IntelFrameworkModulePkg.

So I recommend we have a way to resolve the problem inside of PerformanceLib 
and zero-touch on BDS.

Some possible ways below:

1)      Extend PEI_PERFORMANCE_LOG_HEADER to include the frequency/start/end 
info.

2)      Extend Performance Library and Protocol to report the 
frequency/start/end info.

I think #1 could be an easy way.

Thank you
Yao Jiewen

> -----Original Message-----
> From: Zeng, Star
> Sent: Wednesday, June 8, 2016 3:57 PM
> To: edk2-devel@lists.01.org
> Cc: Gao, Liming <liming....@intel.com>; Yao, Jiewen
> <jiewen....@intel.com>; Cinnamon Shia <cinnamon.s...@hpe.com>;
> Carsey, Jaben <jaben.car...@intel.com>
> Subject: [PATCH 0/4] Remove TimerLib dependency from DP
>
> Current DP implementation depends on TimerLib, as different
> platforms may implement and use their own TimerLib, it makes
> the dp needs to be built by platform. The TimerLib dependency
> can be removed by using L"PerfDataMemAddr" variable to make
> Dp_App to be generic.
>
> Cc: Liming Gao <liming....@intel.com>
> Cc: Jiewen Yao <jiewen....@intel.com>
> Cc: Cinnamon Shia <cinnamon.s...@hpe.com>
> Cc: Jaben Carsey <jaben.car...@intel.com>
> Star Zeng (4):
>   MdeModulePkg: Add TimerStartValue and TimerEndValue into
> PERF_HEADER
>   IntelFrameworkModulePkg GenericBdsLib: Assign
>     TimerStartValue/TimerEndValue
>   PerformancePkg Dp_App: Remove TimerLib dependency
>   ShellPkg UefiDpLib: Remove TimerLib dependency
>
>  .../Library/GenericBdsLib/Performance.c            |  4 ++-
>  MdeModulePkg/Include/Guid/Performance.h            |  4 ++-
>  .../Library/UefiBootManagerLib/BmPerformance.c     |  4 ++-
>  PerformancePkg/Dp_App/Dp.c                         | 37
> ++++++++++++++--------
>  PerformancePkg/Dp_App/Dp.inf                       |  4 ++-
>  PerformancePkg/Dp_App/DpInternal.h                 |  6 ++--
>  PerformancePkg/Dp_App/DpStrings.uni                |  8 +++--
>  PerformancePkg/Dp_App/DpTrace.c                    | 24
> ++------------
>  PerformancePkg/Dp_App/Literals.c                   |  3 +-
>  ShellPkg/Library/UefiDpLib/Dp.c                    | 37
> ++++++++++++++--------
>  ShellPkg/Library/UefiDpLib/DpInternal.h            |  6 ++--
>  ShellPkg/Library/UefiDpLib/DpTrace.c               | 22 +------------
>  ShellPkg/Library/UefiDpLib/Literals.c              |  3 +-
>  ShellPkg/Library/UefiDpLib/UefiDpLib.inf           |  6 ++--
>  ShellPkg/Library/UefiDpLib/UefiDpLib.uni           |  3 +-
>  ShellPkg/ShellPkg.dsc                              |  1 -
>  16 files changed, 78 insertions(+), 94 deletions(-)
>
> --
> 2.7.0.windows.1
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to