public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Liming Gao" <liming.gao@intel.com>
To: "Bi, Dandan" <dandan.bi@intel.com>,
	"Wu, Hao A" <hao.a.wu@intel.com>,
	"Gao, Zhichao" <zhichao.gao@intel.com>,
	"devel@edk2.groups.io" <devel@edk2.groups.io>,
	"Ni, Ray" <ray.ni@intel.com>
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>,
	"Wang, Jian J" <jian.j.wang@intel.com>,
	"Zeng, Star" <star.zeng@intel.com>
Subject: Re: [PATCH 3/6] MdeModulePkg/UefiBootManagerLib: Change performance code
Date: Tue, 18 Jun 2019 05:51:40 +0000	[thread overview]
Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E482D66@SHSMSX104.ccr.corp.intel.com> (raw)
In-Reply-To: <3C0D5C461C9E904E8F62152F6274C0BB40C03720@SHSMSX104.ccr.corp.intel.com>


>-----Original Message-----
>From: Bi, Dandan
>Sent: Monday, June 17, 2019 12:47 PM
>To: Wu, Hao A <hao.a.wu@intel.com>; Gao, Zhichao
><zhichao.gao@intel.com>; devel@edk2.groups.io; Gao, Liming
><liming.gao@intel.com>; Ni, Ray <ray.ni@intel.com>
>Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>; Wang, Jian J
><jian.j.wang@intel.com>; Zeng, Star <star.zeng@intel.com>
>Subject: RE: [PATCH 3/6] MdeModulePkg/UefiBootManagerLib: Change
>performance code
>
>> -----Original Message-----
>> From: Wu, Hao A
>> Sent: Friday, June 14, 2019 4:44 PM
>> To: Gao, Zhichao <zhichao.gao@intel.com>; devel@edk2.groups.io; Bi,
>> Dandan <dandan.bi@intel.com>; Gao, Liming <liming.gao@intel.com>; Ni,
>> Ray <ray.ni@intel.com>
>> Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>; Wang, Jian J
>> <jian.j.wang@intel.com>; Zeng, Star <star.zeng@intel.com>
>> Subject: RE: [PATCH 3/6] MdeModulePkg/UefiBootManagerLib: Change
>> performance code
>>
>> > -----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 3/6] MdeModulePkg/UefiBootManagerLib: Change
>> > performance code
>> >
>> > From: Bret Barkelew <Bret.Barkelew@microsoft.com>
>> >
>> > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1888
>> >
>> > Use PERF_INMODULE_BEGIN and PERF_INMODULE_END to replace
>> > PERF_START_EX, PERF_CODE and PERF_END_EX.
>>
>>
>> Hello Dandan & Liming,
>>
>> May I know the reason for 'PERF_START_EX' & 'PERF_END_EX' macros are
>> not
>> being replaced in commit:
>>
>> Revision: 67e9ab84ef042bd59c4297fdad7f6aece6b7bbca
>> MdeModulePkg: Use new added Perf macros
>>
>> Is there a special reason for this?
>> ('OptionNumber' as the identifier?)
>
>Hi Hao and Zhichao
>
>The 'PERF_START_EX' & 'PERF_END_EX'  here specifies 'OptionNumber' as the
>identifier. We will miss the information of 'OptionNumber' if we replace it with
>new macros. It may impact current usage model. That's why we kept it before.
>For other 'PERF_START_EX' & 'PERF_END_EX'  replacements in this patch
>series may have the similar issue.
>
>Zhichao, please hold the patches that replace 'PERF_START_EX' &
>'PERF_END_EX' firstly, I think it may need more discussion.
>
>Liming, do you have any comments for this?
>

Yes. I don't think the replacement is good. I suggest to keep current, and add new ones. I add my comments below. 

>
>Thanks,
>Dandan
>>
>>
>> > Use PERF_CROSSMODULE_END and PERF_CROSSMODULE_BEGIN to get
>> the
>> > info
>> > of one boot image's performance.
>>
>>
>> Hello Zhichao,
>>
>> May I know what kind of test has been done for this patch?
>> Also, some inline comments below:
>>
>>
>> >
>> > 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/Library/UefiBootManagerLib/BmBoot.c | 9 ++++-----
>> >  1 file changed, 4 insertions(+), 5 deletions(-)
>> >
>> > diff --git a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
>> > b/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
>> > index 952033fc82..af1024cacd 100644
>> > --- a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
>> > +++ b/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
>> > @@ -1812,7 +1812,7 @@ EfiBootManagerBoot (
>> >      BmRepairAllControllers (0);
>> >    }
>> >
>> > -  PERF_START_EX (gImageHandle, "BdsAttempt", NULL, 0, (UINT32)
>> > OptionNumber);
>> > +  PERF_INMODULE_BEGIN ("BdsAttempt");
>> >
>> >    //
>> >    // 5. Adjust the different type memory page number just before booting
>> > @@ -1932,9 +1932,9 @@ EfiBootManagerBoot (
>> >    //
>> >    // Write boot to OS performance data for UEFI boot
>> >    //
>> > -  PERF_CODE (
>> > -    BmEndOfBdsPerfCode (NULL, NULL);
>> > -  );

Seemly, this change is not related to this patch. This code is unused any more. I agree to remove it in another separate patch. 

Thanks
Liming
>> > +  PERF_INMODULE_END ("BdsAttempt");
>>
>>
>> I think the patch missed to replace the below 'PERF_END_EX' macro:
>>
>>   //
>>   if ((DevicePathType (BootOption->FilePath) == BBS_DEVICE_PATH) &&
>> (DevicePathSubType (BootOption->FilePath) == BBS_BBS_DP)) {
>>     ...
>>
>>     PERF_END_EX (gImageHandle, "BdsAttempt", NULL, 0, (UINT32)
>> OptionNumber);
>>     ^^^^^^^^^^^
>>     return;
>>   }
>>
>>
>> > +  PERF_CROSSMODULE_END ("BDS");
>> > +  PERF_CROSSMODULE_BEGIN ("BDS");
>>
>>
>> Could you help to introduce the purpose for the above
>> 'PERF_CROSSMODULE_BEGIN' in more detail?
>>
>>
>> >
>> >    REPORT_STATUS_CODE (EFI_PROGRESS_CODE, PcdGet32
>> > (PcdProgressCodeOsLoaderStart));
>> >
>> > @@ -1947,7 +1947,6 @@ EfiBootManagerBoot (
>> >      //
>> >      BmReportLoadFailure (EFI_SW_DXE_BS_EC_BOOT_OPTION_FAILED,
>> > Status);
>> >    }
>> > -  PERF_END_EX (gImageHandle, "BdsAttempt", NULL, 0, (UINT32)
>> > OptionNumber);
>>
>>
>> The patch excludes the time consumed by StartImage() from performance
>> data
>> for the "BdsAttempt" token.
>>
>> If the image starts successfully, there will not be an matching PERF_END
>> macro for the origin code.
>>
>> Ray, do you think it is a reasonable change here?
>>
>> Best Regards,
>> Hao Wu
>>
>>
>> >
>> >    //
>> >    // Destroy the RAM disk
>> > --
>> > 2.21.0.windows.1


  reply	other threads:[~2019-06-18  5:51 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
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 [this message]
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=4A89E2EF3DFEDB4C8BFDE51014F606A14E482D66@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