From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.20, mailfrom: hao.a.wu@intel.com) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by groups.io with SMTP; Fri, 14 Jun 2019 01:43:57 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Jun 2019 01:43:57 -0700 X-ExtLoop1: 1 Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by FMSMGA003.fm.intel.com with ESMTP; 14 Jun 2019 01:43:56 -0700 Received: from fmsmsx155.amr.corp.intel.com (10.18.116.71) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.408.0; Fri, 14 Jun 2019 01:43:56 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by FMSMSX155.amr.corp.intel.com (10.18.116.71) with Microsoft SMTP Server (TLS) id 14.3.408.0; Fri, 14 Jun 2019 01:43:56 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.185]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.246]) with mapi id 14.03.0439.000; Fri, 14 Jun 2019 16:43:54 +0800 From: "Wu, Hao A" To: "Gao, Zhichao" , "devel@edk2.groups.io" CC: Bret Barkelew , "Wang, Jian J" , "Ni, Ray" , "Zeng, Star" , "Gao, Liming" Subject: Re: [PATCH 2/6] MdeModule/PeiMain: Add performance code Thread-Topic: [PATCH 2/6] MdeModule/PeiMain: Add performance code Thread-Index: AQHVH145BLfTesnqj0K7dPOEv1otIKaazwtg Date: Fri, 14 Jun 2019 08:43:53 +0000 Message-ID: References: <20190610072855.2800-1-zhichao.gao@intel.com> <20190610072855.2800-3-zhichao.gao@intel.com> In-Reply-To: <20190610072855.2800-3-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 2/6] MdeModule/PeiMain: Add performance code >=20 > From: Bret Barkelew >=20 > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1888 >=20 > Add performance code for PeiDisaptcher function and Image function. >=20 > Cc: Jian J Wang > Cc: Hao A Wu > Cc: Ray Ni > Cc: Star Zeng > Cc: Liming Gao > Signed-off-by: Zhichao Gao > --- > MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c | 10 ++++++++++ > 1 file changed, 10 insertions(+) >=20 > 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; >=20 > + PERF_FUNCTION_BEGIN (); > + > PeiServices =3D (CONST EFI_PEI_SERVICES **) &Private->Ps; > PeimEntryPoint =3D NULL; > PeimFileHandle =3D NULL; > @@ -1004,6 +1006,7 @@ PeiDispatcher ( > Private->CurrentFileHandle =3D PeimFileHandle; > Private->CurrentPeimFvCount =3D Index1; > Private->CurrentPeimCount =3D Index2; > + PERF_LOAD_IMAGE_BEGIN (NULL); > Status =3D PeiLoadImage ( > (CONST EFI_PEI_SERVICES **) &Private->Ps, > PeimFileHandle, > @@ -1012,6 +1015,7 @@ PeiDispatcher ( > &AuthenticationState > ); > if (Status =3D=3D 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 =3D PeiLoadImage ( > PeiServices, > PeimFileHandle, > @@ -1126,6 +1131,7 @@ PeiDispatcher ( > &AuthenticationState > ); > if (Status =3D=3D EFI_SUCCESS) { > + PERF_LOAD_IMAGE_END (PeimFileHandle); > // > // The PEIM has its dependencies satisfied, and its entr= y 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 =3D PeiLoadImage ( > PeiServices, > PeimFileHandle, > @@ -1205,6 +1212,7 @@ PeiDispatcher ( > &AuthenticationState > ); > if (Status =3D=3D EFI_SUCCESS) { > + PERF_LOAD_IMAGE_END (PeimFileHandle); > PeimEntryPoint =3D (EFI_PEIM_ENTRY_POINT2)(UINTN)Entry= Point; > } > } > @@ -1252,6 +1260,8 @@ PeiDispatcher ( > // > } while (Private->PeimNeedingDispatch && Private- > >PeimDispatchOnThisPass); >=20 > + PERF_FUNCTION_END (); > + > } >=20 > /** > -- > 2.21.0.windows.1