public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Gao, Liming" <liming.gao@intel.com>
To: "Bi, Dandan" <dandan.bi@intel.com>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: "Zeng, Star" <star.zeng@intel.com>
Subject: Re: [patch 1/2] MdeModulePkg/DxeLoadFunc: Add use case for new Perf macro
Date: Wed, 25 Jul 2018 14:07:17 +0000	[thread overview]
Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E2C0D7B@SHSMSX104.ccr.corp.intel.com> (raw)
In-Reply-To: <20180719064402.54872-1-dandan.bi@intel.com>

Reviewed-by: Liming Gao <liming.gao@intel.com>

> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Dandan Bi
> Sent: Thursday, July 19, 2018 2:44 PM
> To: edk2-devel@lists.01.org
> Cc: Zeng, Star <star.zeng@intel.com>; Gao, Liming <liming.gao@intel.com>
> Subject: [edk2] [patch 1/2] MdeModulePkg/DxeLoadFunc: Add use case for new Perf macro
> 
> Add an example case for the usage of
> PERF_EVENT_SIGNAL_BEGIN/PERF_EVENT_SIGNAL_END
> 
> Cc: Liming Gao <liming.gao@intel.com>
> Cc: Star Zeng <star.zeng@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Dandan Bi <dandan.bi@intel.com>
> ---
>  MdeModulePkg/Core/DxeIplPeim/DxeIpl.h           | 3 ++-
>  MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf         | 1 +
>  MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c | 4 ++++
>  3 files changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/MdeModulePkg/Core/DxeIplPeim/DxeIpl.h b/MdeModulePkg/Core/DxeIplPeim/DxeIpl.h
> index 6f8e13d213..9ea88a399b 100644
> --- a/MdeModulePkg/Core/DxeIplPeim/DxeIpl.h
> +++ b/MdeModulePkg/Core/DxeIplPeim/DxeIpl.h
> @@ -1,10 +1,10 @@
>  /** @file
>    Master header file for DxeIpl PEIM. All source files in this module should
>    include this file for common definitions.
> 
> -Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
> +Copyright (c) 2006 - 2018, 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
>  which accompanies this distribution.  The full text of the license may be found at
>  http://opensource.org/licenses/bsd-license.php
> 
> @@ -46,10 +46,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
>  #include <Library/PcdLib.h>
>  #include <Library/S3Lib.h>
>  #include <Library/RecoveryLib.h>
>  #include <Library/DebugAgentLib.h>
>  #include <Library/PeiServicesTablePointerLib.h>
> +#include <Library/PerformanceLib.h>
> 
>  #define STACK_SIZE      0x20000
>  #define BSP_STORE_SIZE  0x4000
> 
> 
> diff --git a/MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf b/MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf
> index 7deeb8f270..302934283a 100644
> --- a/MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf
> +++ b/MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf
> @@ -77,10 +77,11 @@
>    BaseLib
>    PeimEntryPoint
>    DebugLib
>    DebugAgentLib
>    PeiServicesTablePointerLib
> +  PerformanceLib
> 
>  [LibraryClasses.ARM, LibraryClasses.AARCH64]
>    ArmMmuLib
> 
>  [Ppis]
> diff --git a/MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c b/MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c
> index d5aa0474b0..8a939b6c24 100644
> --- a/MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c
> +++ b/MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c
> @@ -318,11 +318,13 @@ HandOffToDxeCore (
>      PageTables = CreateIdentityMappingPageTables (BaseOfStack, STACK_SIZE);
> 
>      //
>      // End of PEI phase signal
>      //
> +    PERF_EVENT_SIGNAL_BEGIN (gEndOfPeiSignalPpi.Guid);
>      Status = PeiServicesInstallPpi (&gEndOfPeiSignalPpi);
> +    PERF_EVENT_SIGNAL_END (gEndOfPeiSignalPpi.Guid);
>      ASSERT_EFI_ERROR (Status);
> 
>      AsmWriteCr3 (PageTables);
> 
>      //
> @@ -435,11 +437,13 @@ HandOffToDxeCore (
>      }
> 
>      //
>      // End of PEI phase signal
>      //
> +    PERF_EVENT_SIGNAL_BEGIN (gEndOfPeiSignalPpi.Guid);
>      Status = PeiServicesInstallPpi (&gEndOfPeiSignalPpi);
> +    PERF_EVENT_SIGNAL_END (gEndOfPeiSignalPpi.Guid);
>      ASSERT_EFI_ERROR (Status);
> 
>      if (BuildPageTablesIa32Pae) {
>        AsmWriteCr3 (PageTables);
>        //
> --
> 2.14.3.windows.1
> 
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel


      parent reply	other threads:[~2018-07-25 14:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-19  6:44 [patch 1/2] MdeModulePkg/DxeLoadFunc: Add use case for new Perf macro Dandan Bi
2018-07-19  6:44 ` [patch 2/2] SecurityPkg/Tcg: " Dandan Bi
2018-07-24  5:09   ` Zhang, Chao B
2018-07-25 14:07   ` Gao, Liming
2018-07-25 14:07 ` Gao, Liming [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A89E2EF3DFEDB4C8BFDE51014F606A14E2C0D7B@SHSMSX104.ccr.corp.intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox