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.136, mailfrom: hao.a.wu@intel.com) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by groups.io with SMTP; Fri, 14 Jun 2019 01:43:39 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Jun 2019 01:43:39 -0700 X-ExtLoop1: 1 Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by fmsmga001.fm.intel.com with ESMTP; 14 Jun 2019 01:43:38 -0700 Received: from fmsmsx102.amr.corp.intel.com (10.18.124.200) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.408.0; Fri, 14 Jun 2019 01:43:38 -0700 Received: from shsmsx154.ccr.corp.intel.com (10.239.6.54) by FMSMSX102.amr.corp.intel.com (10.18.124.200) with Microsoft SMTP Server (TLS) id 14.3.408.0; Fri, 14 Jun 2019 01:43:37 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.185]) by SHSMSX154.ccr.corp.intel.com ([169.254.7.156]) with mapi id 14.03.0439.000; Fri, 14 Jun 2019 16:43:36 +0800 From: "Wu, Hao A" 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 Thread-Topic: [PATCH 3/6] MdeModulePkg/UefiBootManagerLib: Change performance code Thread-Index: AQHVH146LkEzJJm0a0KMkccDICp9Tqaaz4Yg Date: Fri, 14 Jun 2019 08:43:35 +0000 Message-ID: References: <20190610072855.2800-1-zhichao.gao@intel.com> <20190610072855.2800-4-zhichao.gao@intel.com> In-Reply-To: <20190610072855.2800-4-zhichao.gao@intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: hao.a.wu@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable > -----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, Lim= ing > Subject: [PATCH 3/6] MdeModulePkg/UefiBootManagerLib: Change > performance code >=20 > From: Bret Barkelew >=20 > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1888 >=20 > 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?) > 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: >=20 > 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(-) >=20 > 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); > } >=20 > - PERF_START_EX (gImageHandle, "BdsAttempt", NULL, 0, (UINT32) > OptionNumber); > + PERF_INMODULE_BEGIN ("BdsAttempt"); >=20 > // > // 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); > - ); > + 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) && (De= vicePathSubType (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? >=20 > REPORT_STATUS_CODE (EFI_PROGRESS_CODE, PcdGet32 > (PcdProgressCodeOsLoaderStart)); >=20 > @@ -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 >=20 > // > // Destroy the RAM disk > -- > 2.21.0.windows.1