public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Wu, Hao A" <hao.a.wu@intel.com>
To: "Gao, Zhichao" <zhichao.gao@intel.com>,
	"devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>,
	"Wang, Jian J" <jian.j.wang@intel.com>,
	"Ni, Ray" <ray.ni@intel.com>, "Zeng, Star" <star.zeng@intel.com>,
	"Gao, Liming" <liming.gao@intel.com>
Subject: Re: [PATCH 2/6] MdeModule/PeiMain: Add performance code
Date: Fri, 14 Jun 2019 08:43:53 +0000	[thread overview]
Message-ID: <B80AF82E9BFB8E4FBD8C89DA810C6A093C8F08F1@SHSMSX104.ccr.corp.intel.com> (raw)
In-Reply-To: <20190610072855.2800-3-zhichao.gao@intel.com>

> -----Original Message-----
> From: Gao, Zhichao
> Sent: Monday, June 10, 2019 3:29 PM
> To: devel@edk2.groups.io
> Cc: Bret Barkelew; Wang, Jian J; Wu, Hao A; Ni, Ray; Zeng, Star; Gao, Liming
> Subject: [PATCH 2/6] MdeModule/PeiMain: Add performance code
> 
> From: Bret Barkelew <Bret.Barkelew@microsoft.com>
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1888
> 
> Add performance code for PeiDisaptcher function and Image function.
> 
> Cc: Jian J Wang <jian.j.wang@intel.com>
> Cc: Hao A Wu <hao.a.wu@intel.com>
> Cc: Ray Ni <ray.ni@intel.com>
> Cc: Star Zeng <star.zeng@intel.com>
> Cc: Liming Gao <liming.gao@intel.com>
> Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
> ---
>  MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c
> b/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c
> index ba2fd0cae1..0caffe653b 100644
> --- a/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c
> +++ b/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c
> @@ -983,6 +983,8 @@ PeiDispatcher (
>    EFI_FV_FILE_INFO                    FvFileInfo;
>    PEI_CORE_FV_HANDLE                  *CoreFvHandle;
> 
> +  PERF_FUNCTION_BEGIN ();
> +
>    PeiServices = (CONST EFI_PEI_SERVICES **) &Private->Ps;
>    PeimEntryPoint = NULL;
>    PeimFileHandle = NULL;
> @@ -1004,6 +1006,7 @@ PeiDispatcher (
>            Private->CurrentFileHandle   = PeimFileHandle;
>            Private->CurrentPeimFvCount  = Index1;
>            Private->CurrentPeimCount    = Index2;
> +          PERF_LOAD_IMAGE_BEGIN (NULL);
>            Status = PeiLoadImage (
>                      (CONST EFI_PEI_SERVICES **) &Private->Ps,
>                      PeimFileHandle,
> @@ -1012,6 +1015,7 @@ PeiDispatcher (
>                      &AuthenticationState
>                      );
>            if (Status == EFI_SUCCESS) {
> +            PERF_LOAD_IMAGE_END (PeimFileHandle);


One question, what is the reason for the 'PERF_LOAD_IMAGE_END' macro being
only added when PeiLoadImage() returns with no error?

Best Regards,
Hao Wu


>              //
>              // PEIM_STATE_REGISTER_FOR_SHADOW move to
> PEIM_STATE_DONE
>              //
> @@ -1118,6 +1122,7 @@ PeiDispatcher (
>                //
>                // For PEIM driver, Load its entry point
>                //
> +              PERF_LOAD_IMAGE_BEGIN (NULL);
>                Status = PeiLoadImage (
>                           PeiServices,
>                           PeimFileHandle,
> @@ -1126,6 +1131,7 @@ PeiDispatcher (
>                           &AuthenticationState
>                           );
>                if (Status == EFI_SUCCESS) {
> +                PERF_LOAD_IMAGE_END (PeimFileHandle);
>                  //
>                  // The PEIM has its dependencies satisfied, and its entry point
>                  // has been found, so invoke it.
> @@ -1197,6 +1203,7 @@ PeiDispatcher (
>                  //
>                  // Load PEIM into Memory for Register for shadow PEIM.
>                  //
> +                PERF_LOAD_IMAGE_BEGIN (NULL);
>                  Status = PeiLoadImage (
>                             PeiServices,
>                             PeimFileHandle,
> @@ -1205,6 +1212,7 @@ PeiDispatcher (
>                             &AuthenticationState
>                             );
>                  if (Status == EFI_SUCCESS) {
> +                  PERF_LOAD_IMAGE_END (PeimFileHandle);
>                    PeimEntryPoint = (EFI_PEIM_ENTRY_POINT2)(UINTN)EntryPoint;
>                  }
>                }
> @@ -1252,6 +1260,8 @@ PeiDispatcher (
>      //
>    } while (Private->PeimNeedingDispatch && Private-
> >PeimDispatchOnThisPass);
> 
> +  PERF_FUNCTION_END ();
> +
>  }
> 
>  /**
> --
> 2.21.0.windows.1


  reply	other threads:[~2019-06-14  8:43 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-10  7:28 [PATCH 0/6] Change the performance code Gao, Zhichao
2019-06-10  7:28 ` [PATCH 1/6] MdeModulePkg/DxeMain: Add " Gao, Zhichao
2019-06-14  8:43   ` Wu, Hao A
2019-06-10  7:28 ` [PATCH 2/6] MdeModule/PeiMain: " Gao, Zhichao
2019-06-14  8:43   ` Wu, Hao A [this message]
2019-06-10  7:28 ` [PATCH 3/6] MdeModulePkg/UefiBootManagerLib: Change " Gao, Zhichao
2019-06-14  8:43   ` Wu, Hao A
2019-06-17  4:47     ` Dandan Bi
2019-06-18  5:51       ` Liming Gao
2019-06-10  7:28 ` [PATCH 4/6] SecurityPkg/Tcg2Dxe: " Gao, Zhichao
2019-06-10  7:28 ` [PATCH 5/6] SecurityPkg/Tcg2Pei: " Gao, Zhichao
2019-06-10  7:28 ` [PATCH 6/6] IntelSiliconPkg/IntelVtdDxe: Change the " Gao, Zhichao

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=B80AF82E9BFB8E4FBD8C89DA810C6A093C8F08F1@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