From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.93, mailfrom: liming.gao@intel.com) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by groups.io with SMTP; Mon, 17 Jun 2019 22:51:44 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Jun 2019 22:51:44 -0700 X-ExtLoop1: 1 Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga005.fm.intel.com with ESMTP; 17 Jun 2019 22:51:44 -0700 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 17 Jun 2019 22:51:43 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.185]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.225]) with mapi id 14.03.0439.000; Tue, 18 Jun 2019 13:51:42 +0800 From: "Liming Gao" To: "Bi, Dandan" , "Wu, Hao A" , "Gao, Zhichao" , "devel@edk2.groups.io" , "Ni, Ray" CC: Bret Barkelew , "Wang, Jian J" , "Zeng, Star" Subject: Re: [PATCH 3/6] MdeModulePkg/UefiBootManagerLib: Change performance code Thread-Topic: [PATCH 3/6] MdeModulePkg/UefiBootManagerLib: Change performance code Thread-Index: AQHVH146X3H0nLidtEm0RNkA35ZP/qaaVaiAgAR0+ACAAiNOsA== Date: Tue, 18 Jun 2019 05:51:40 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E482D66@SHSMSX104.ccr.corp.intel.com> References: <20190610072855.2800-1-zhichao.gao@intel.com> <20190610072855.2800-4-zhichao.gao@intel.com> <3C0D5C461C9E904E8F62152F6274C0BB40C03720@SHSMSX104.ccr.corp.intel.com> In-Reply-To: <3C0D5C461C9E904E8F62152F6274C0BB40C03720@SHSMSX104.ccr.corp.intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: liming.gao@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable >-----Original Message----- >From: Bi, Dandan >Sent: Monday, June 17, 2019 12:47 PM >To: Wu, Hao A ; Gao, Zhichao >; devel@edk2.groups.io; Gao, Liming >; Ni, Ray >Cc: Bret Barkelew ; Wang, Jian J >; Zeng, Star >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 ; devel@edk2.groups.io; Bi, >> Dandan ; Gao, Liming ; Ni, >> Ray >> Cc: Bret Barkelew ; Wang, Jian J >> ; Zeng, Star >> 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 >> > >> > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1888 >> > >> > 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 i= t with >new macros. It may impact current usage model. That's why we kept it befor= e. >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.=20 > >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 >> > Cc: Hao A Wu >> > Cc: Ray Ni >> > Cc: Star Zeng >> > Cc: Liming Gao >> > Signed-off-by: Zhichao Gao >> > --- >> > 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 boot= ing >> > @@ -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 m= ore. I agree to remove it in another separate patch.=20 Thanks Liming >> > + PERF_INMODULE_END ("BdsAttempt"); >> >> >> I think the patch missed to replace the below 'PERF_END_EX' macro: >> >> // >> if ((DevicePathType (BootOption->FilePath) =3D=3D BBS_DEVICE_PATH) && >> (DevicePathSubType (BootOption->FilePath) =3D=3D 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