From nobody Thu Apr 18 18:13:33 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+42068+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+42068+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1560151758; cv=none; d=zoho.com; s=zohoarc; b=i6eIP7gMl4bpSxqUPjAeu3DS4BP+oKkD+tOKCtH5IhianeC8YHH+56DRXT4CAdL8tpDc/OTCuXLyfAKJVuZb550Za3WAP0oyLhHr5wZ76Bsu5SBcET0pnpNZ+zBfYTkAfW6OIu7NoQZnXEYILlbqSDVNiHLr/QxbYcZHsXXDCOQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560151758; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To:ARC-Authentication-Results; bh=Ovs6EiKZq9sj+UTXs23eNV7eZzD+HM0mqSuASELUy9A=; b=a5U+XfWh/iRPpQ1H5R6Ym/Rp+R/yAOhWCoOj+PsCUbqcwpRwXE92NZZWX0/3fE74d2PREUNWqdC7r/84WpEIYS0Ez14VlCLyhGtQg0zE7OUxW2N+ck9xDPjCmsmMePFq0IsgbEQQcT+vkdilPZXA2MBVkIp1Q96l/6qDZ1NEEyk= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+42068+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1560151758396989.6317949678348; Mon, 10 Jun 2019 00:29:18 -0700 (PDT) Return-Path: X-Received: from mga17.intel.com (mga17.intel.com []) by groups.io with SMTP; Mon, 10 Jun 2019 00:29:17 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Jun 2019 00:29:17 -0700 X-ExtLoop1: 1 X-Received: from fieedk001.ccr.corp.intel.com ([10.239.33.119]) by fmsmga001.fm.intel.com with ESMTP; 10 Jun 2019 00:29:15 -0700 From: "Gao, Zhichao" To: devel@edk2.groups.io Cc: Bret Barkelew , Jian J Wang , Hao A Wu , Ray Ni , Star Zeng , Liming Gao , Sean Brogan , Michael Turner Subject: [edk2-devel] [PATCH 1/6] MdeModulePkg/DxeMain: Add performance code Date: Mon, 10 Jun 2019 15:28:50 +0800 Message-Id: <20190610072855.2800-2-zhichao.gao@intel.com> In-Reply-To: <20190610072855.2800-1-zhichao.gao@intel.com> References: <20190610072855.2800-1-zhichao.gao@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,zhichao.gao@intel.com Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1560151757; bh=QIogyXU9SNp5fI8VfCqy9lzWqk6sGnSICnb+KzdRzSs=; h=Cc:Date:From:Reply-To:Subject:To; b=RNsdp+iIlGDPgfvATfJDlG+kjfOtiR/89K6pNJ12j63AEGLt4nnPQS107H84cYonM04 wLOrVmpWxF2htaTgZwVjVbPz9tpIh2Ju7VAL8Y9GBm9ZoLsnR+VmDIkwy/xo9brQ/B0cB H0S/Rwm0yfObTTAU2GX+ojXzpGU1PwzGVU8= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" From: Bret Barkelew REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1888 Add missing PERF_FUNCTION_END before the return statement. Cc: Jian J Wang Cc: Hao A Wu Cc: Ray Ni Cc: Star Zeng Cc: Liming Gao Cc: Sean Brogan Cc: Michael Turner Cc: Bret Barkelew Signed-off-by: Zhichao Gao Reviewed-by: Hao A Wu --- MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c b/MdeModulePkg/C= ore/Dxe/Dispatcher/Dispatcher.c index c310b40b52..001a26aa62 100644 --- a/MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c +++ b/MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c @@ -418,6 +418,7 @@ CoreDispatcher ( // // If the dispatcher is running don't let it be restarted. // + PERF_FUNCTION_END (); return EFI_ALREADY_STARTED; } =20 @@ -432,6 +433,7 @@ CoreDispatcher ( &DxeDispatchEvent ); if (EFI_ERROR (Status)) { + PERF_FUNCTION_END (); return Status; } =20 --=20 2.21.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#42068): https://edk2.groups.io/g/devel/message/42068 Mute This Topic: https://groups.io/mt/32001826/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Thu Apr 18 18:13:33 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+42069+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+42069+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1560151759; cv=none; d=zoho.com; s=zohoarc; b=XuZeBqge3E3yNp1ssgTAchVOVziIbiROfWJBqI58RkUOCN8iYOmANOs9+NGFfCtiW6gBW9AV+XV91Su9Xl/PiP1sEXGpPN8KPaoHHVAFSLmzbX8Tp7kAUTcfIuGL09hu4BwSBfCmXM0/HN0PZHAowg0iOVazWN0fRSwpj51/5r4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560151759; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To:ARC-Authentication-Results; bh=6PMsNMFgxRqx1Yz77kpuZkbcf9lGJeeNClaqccHP+Cg=; b=m3xZbTeMZxmafPXvnLMiKMUlF/CZXV2wGPOjx3Z+RzAzuLE8UBAlZlAf11/LOnIYXmNK2m0uGrAPkvk8mifb1+xehZEwQqEzcn+2q6KSolAPdqiyDyNEVrSXiAugokit+JS4GJI+dXgwEQ5kObStiUy+q6MOW7T9oxkxW3c9OsU= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+42069+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1560151759667178.5796053229734; Mon, 10 Jun 2019 00:29:19 -0700 (PDT) Return-Path: X-Received: from mga17.intel.com (mga17.intel.com []) by groups.io with SMTP; Mon, 10 Jun 2019 00:29:18 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Jun 2019 00:29:18 -0700 X-ExtLoop1: 1 X-Received: from fieedk001.ccr.corp.intel.com ([10.239.33.119]) by fmsmga001.fm.intel.com with ESMTP; 10 Jun 2019 00:29:17 -0700 From: "Gao, Zhichao" To: devel@edk2.groups.io Cc: Bret Barkelew , Jian J Wang , Hao A Wu , Ray Ni , Star Zeng , Liming Gao Subject: [edk2-devel] [PATCH 2/6] MdeModule/PeiMain: Add performance code Date: Mon, 10 Jun 2019 15:28:51 +0800 Message-Id: <20190610072855.2800-3-zhichao.gao@intel.com> In-Reply-To: <20190610072855.2800-1-zhichao.gao@intel.com> References: <20190610072855.2800-1-zhichao.gao@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,zhichao.gao@intel.com Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1560151759; bh=j77IQ+jdKaEjoh1NE4RaFzcocuHljcH5wUrn4231jog=; h=Cc:Date:From:Reply-To:Subject:To; b=krcleQpqjj6Hk17O4Pyhc4wbRU+WilXUbpxoXzmQVBqAi7/g4ySCrvd9YuW58ALqEHI WmP8hBsMSyy1oKoRn6Ju+Y0+zGrOc321oYHdgnsDzSvhT0tGuiIHhJgx8R0QIdtL4qnKA qBvqEZcbYLojNwqk8pQqhjzpB6h9oGKTi1M= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" From: Bret Barkelew REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1888 Add performance code for PeiDisaptcher function and Image function. 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(+) diff --git a/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c b/MdeModulePkg/C= ore/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); // // 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 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 =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)EntryPo= int; } } @@ -1252,6 +1260,8 @@ PeiDispatcher ( // } while (Private->PeimNeedingDispatch && Private->PeimDispatchOnThisPass= ); =20 + PERF_FUNCTION_END (); + } =20 /** --=20 2.21.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#42069): https://edk2.groups.io/g/devel/message/42069 Mute This Topic: https://groups.io/mt/32001827/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Thu Apr 18 18:13:33 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+42070+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+42070+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1560151761; cv=none; d=zoho.com; s=zohoarc; b=WsIzB1HKirvVShYf3DKuGoERELcvPvBYnTCCzklGIxkojAvHcXgERe9Oecd39B160RGImnI2j/sfeM87epFBqXqvfbaj6nbHb5AJ3TmLfbYFhDJhb/5aHgRdJOR+0QnKW/KoKllbkImuENKPcujgv+IlTrOvly9MqiALcUWq0lw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560151761; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To:ARC-Authentication-Results; bh=wyNXwgdodAwwtVQynhNoDYT4wFRs/rz7huSsIjd34fQ=; b=A7hwprgXUFSd/m1GqKanQc3DOZchIhM2M+KPmV+wBhkSbVToQ6mzfueVODRWb99AMzuWG3lFjJ8Z0njM3J2hswgVMf7GvgKEnZe8Q91sVZ1tJ3UP/WvynxcbvjKr0du8G4LUqn6sJy9zFuxDDjDW4LP75mxdo8f7XWFXrt0B2Vg= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+42070+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 15601517612021000.5210797955438; Mon, 10 Jun 2019 00:29:21 -0700 (PDT) Return-Path: X-Received: from mga17.intel.com (mga17.intel.com []) by groups.io with SMTP; Mon, 10 Jun 2019 00:29:20 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Jun 2019 00:29:20 -0700 X-ExtLoop1: 1 X-Received: from fieedk001.ccr.corp.intel.com ([10.239.33.119]) by fmsmga001.fm.intel.com with ESMTP; 10 Jun 2019 00:29:18 -0700 From: "Gao, Zhichao" To: devel@edk2.groups.io Cc: Bret Barkelew , Jian J Wang , Hao A Wu , Ray Ni , Star Zeng , Liming Gao Subject: [edk2-devel] [PATCH 3/6] MdeModulePkg/UefiBootManagerLib: Change performance code Date: Mon, 10 Jun 2019 15:28:52 +0800 Message-Id: <20190610072855.2800-4-zhichao.gao@intel.com> In-Reply-To: <20190610072855.2800-1-zhichao.gao@intel.com> References: <20190610072855.2800-1-zhichao.gao@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,zhichao.gao@intel.com Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1560151760; bh=2w2zwTOSZsYopiRo/5kTaLpAdWucyVVsaV/R7/5Fl6Y=; h=Cc:Date:From:Reply-To:Subject:To; b=nEYDMAwV+HQ48cmtLobggqloU2vfiGgjmaYMvYjoQ0uxqOhwDFfRm5uqG75SvL9dLx3 Xp2icquG/pw7PwwaJsxJo9VOxA87MSJjH706pXWn9TXi2lm8Z3AcfgEPjXC/KoxfeWHDO UOeYwipDbT46sKe/TNVXzZHoAy68NRCcijo= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" 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. Use PERF_CROSSMODULE_END and PERF_CROSSMODULE_BEGIN to get the info of one boot image's performance. 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/MdeModulePk= g/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) OptionNumbe= r); + 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"); + PERF_CROSSMODULE_END ("BDS"); + PERF_CROSSMODULE_BEGIN ("BDS"); =20 REPORT_STATUS_CODE (EFI_PROGRESS_CODE, PcdGet32 (PcdProgressCodeOsLoader= Start)); =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); =20 // // Destroy the RAM disk --=20 2.21.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#42070): https://edk2.groups.io/g/devel/message/42070 Mute This Topic: https://groups.io/mt/32001828/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Thu Apr 18 18:13:33 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+42071+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+42071+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1560151762; cv=none; d=zoho.com; s=zohoarc; b=L4PwnouzS4UqipodwgMpWUudYmRqb5tvBP6oz/Dv6G9MYGVQVtCUu8u2lVpkurHkF7VfOX0f59Lfp0ly2nufpW6uD+nH01j4HlyoHN0LrXkyyYzd2sScdacMftsTTD/B+j6ik3kHNWUz7vwuOSMsaL+pEIrdT7VrM9GRGG0P+Qw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560151762; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To:ARC-Authentication-Results; bh=MddRUXB4FbBm4e+4c9Go6JNwqIr6AzATYqBPGiLfBg4=; b=k89vX7WTjVMZ/nVY1miasoegMVaZ7umzvXUZGApnp9qLqNUOVCneChf5Y+j51Aq/CTnrYe12TnschpgD4wItkONugTc297J3lR1ewL297EtcLADpMhJ8XJto60Xp7fR30dRNjTMeFqHcQWfY3XZ6/9V3S5m/NOIdY6Vb5h4gAWU= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+42071+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1560151762195263.29139290521823; Mon, 10 Jun 2019 00:29:22 -0700 (PDT) Return-Path: X-Received: from mga17.intel.com (mga17.intel.com []) by groups.io with SMTP; Mon, 10 Jun 2019 00:29:21 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Jun 2019 00:29:21 -0700 X-ExtLoop1: 1 X-Received: from fieedk001.ccr.corp.intel.com ([10.239.33.119]) by fmsmga001.fm.intel.com with ESMTP; 10 Jun 2019 00:29:20 -0700 From: "Gao, Zhichao" To: devel@edk2.groups.io Cc: Bret Barkelew , Chao Zhang , Jiewen Yao , Jian Wang Subject: [edk2-devel] [PATCH 4/6] SecurityPkg/Tcg2Dxe: Change performance code Date: Mon, 10 Jun 2019 15:28:53 +0800 Message-Id: <20190610072855.2800-5-zhichao.gao@intel.com> In-Reply-To: <20190610072855.2800-1-zhichao.gao@intel.com> References: <20190610072855.2800-1-zhichao.gao@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,zhichao.gao@intel.com Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1560151761; bh=ez/ALLXfPjEZXzQaTu/ly9FaoPZ0a9LI5Mjvo16mE4k=; h=Cc:Date:From:Reply-To:Subject:To; b=tb8+fXuN27iA0q/MpP9SOQDEMDZSOjA//0/FtmoAxIvydSjZ4brvGDrtm1vfcBBnzt6 kuJ+xBRSXOOu4g31q0SgMVH1rFXMcRzozoJ9rkx+6J+yQYef71GEE5jXSuCgnqvD5dwFo AsTwtzo1/5Cytd2AumUEP9OPE7nfTgQvt+4= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" From: Bret Barkelew REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1888 Use PERF_FUNCTION_BEGIN and PERF_FUNCTION_END to replace PERF_START_EX and PERF_FUNCTION_END. Cc: Chao Zhang Cc: Jiewen Yao Cc: Jian Wang Signed-off-by: Zhichao Gao --- SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c b/SecurityPkg/Tcg/Tcg2Dxe/Tc= g2Dxe.c index a2729457b7..001e0aac4d 100644 --- a/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c +++ b/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c @@ -45,8 +45,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #include #include =20 -#define PERF_ID_TCG2_DXE 0x3120 - typedef struct { CHAR16 *VariableName; EFI_GUID *VendorGuid; @@ -2250,7 +2248,7 @@ OnReadyToBoot ( EFI_STATUS Status; TPM_PCRINDEX PcrIndex; =20 - PERF_START_EX (mImageHandle, "EventRec", "Tcg2Dxe", 0, PERF_ID_TCG2_DXE); + PERF_FUNCTION_BEGIN (); if (mBootAttempts =3D=3D 0) { =20 // @@ -2332,7 +2330,7 @@ OnReadyToBoot ( // Increase boot attempt counter. // mBootAttempts++; - PERF_END_EX (mImageHandle, "EventRec", "Tcg2Dxe", 0, PERF_ID_TCG2_DXE + = 1); + PERF_FUNCTION_END (); } =20 /** --=20 2.21.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#42071): https://edk2.groups.io/g/devel/message/42071 Mute This Topic: https://groups.io/mt/32001829/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Thu Apr 18 18:13:34 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+42072+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+42072+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1560151763; cv=none; d=zoho.com; s=zohoarc; b=kLUjbMGjGkXxYJTtS+5YD9YkAsPfBlv4AMDmIfDeWWzvEvuS01eBFPT5xWyg4Ya6kPi2/XowF97vd6HQMJV1gN6m+IdmK/Sr4ij9O9ghJqSNQ0Qfh+YtUKUhTuBa3tJbrlweKXJHdpbayk2siKydhAwpUF/GCB+7nN/IJ27FRgc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560151763; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To:ARC-Authentication-Results; bh=T7joXoRciXltT/N/ebolB8Z/kJLY+NkFDbXzoZB/h0E=; b=k4px5gym5SYZuHOqJQpzMa448s1/kEGqN7/iTcH9gW89rsK0B5k6JXdIwn4XlTXvGdERCWgVULzTn18WTVPFEHJrEoIoQdCV+e0646YW1DK6xKNPLAy3RiymbuKmHp9y819uZSDHI7ogNL3qK/izKvhVFIqTbnIk7uIwvBeWXKY= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+42072+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1560151763374674.2479469984501; Mon, 10 Jun 2019 00:29:23 -0700 (PDT) Return-Path: X-Received: from mga17.intel.com (mga17.intel.com []) by groups.io with SMTP; Mon, 10 Jun 2019 00:29:22 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Jun 2019 00:29:22 -0700 X-ExtLoop1: 1 X-Received: from fieedk001.ccr.corp.intel.com ([10.239.33.119]) by fmsmga001.fm.intel.com with ESMTP; 10 Jun 2019 00:29:21 -0700 From: "Gao, Zhichao" To: devel@edk2.groups.io Cc: Bret Barkelew , Chao Zhang , Jiewen Yao , Jian Wang Subject: [edk2-devel] [PATCH 5/6] SecurityPkg/Tcg2Pei: Change performance code Date: Mon, 10 Jun 2019 15:28:54 +0800 Message-Id: <20190610072855.2800-6-zhichao.gao@intel.com> In-Reply-To: <20190610072855.2800-1-zhichao.gao@intel.com> References: <20190610072855.2800-1-zhichao.gao@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,zhichao.gao@intel.com Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1560151763; bh=4wwL2UPcng0cEKoARBWew2wCUE9BSR0vBt2jTntxOJc=; h=Cc:Date:From:Reply-To:Subject:To; b=F3PYvsbRAbTyZ/ymGBo/kwEGq8I+cYJwNwCH2GheFvTfJxbDUZjCJgvQhfgwRvbAMCe tU2KmUTR8772sC9fPnKR1l+3kuBO8fQTd6HMrKd3fNFBWxcXRzJmC/y2pgUrZBq/ia93z 2+n8RDUzEGyMfTjjxDhlw5WbEf+aCmiCDoo= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" From: Bret Barkelew REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1888 Use PERF_FUNCTION_BEGIN and PERF_FUNCTION_END to replace PERF_START_EX and PERF_FUNCTION_END. Cc: Chao Zhang Cc: Jiewen Yao Cc: Jian Wang Signed-off-by: Zhichao Gao --- SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c b/SecurityPkg/Tcg/Tcg2Pei/Tc= g2Pei.c index f28f33fdec..4b5388726c 100644 --- a/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c +++ b/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c @@ -1,7 +1,7 @@ /** @file Initialize TPM2 device and measure FVs before handing off control to DXE. =20 -Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.
+Copyright (c) 2015 - 2019, Intel Corporation. All rights reserved.
Copyright (c) 2017, Microsoft Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent =20 @@ -38,8 +38,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #include #include =20 -#define PERF_ID_TCG2_PEI 0x3080 - typedef struct { EFI_GUID *EventGuid; EFI_TCG2_EVENT_LOG_FORMAT LogFormat; @@ -651,7 +649,7 @@ MeasureMainBios ( EFI_FV_INFO VolumeInfo; EFI_PEI_FIRMWARE_VOLUME_PPI *FvPpi; =20 - PERF_START_EX (mFileHandle, "EventRec", "Tcg2Pei", 0, PERF_ID_TCG2_PEI); + PERF_FUNCTION_BEGIN (); =20 // // Only measure BFV at the very beginning. Other parts of Static Core Ro= ot of @@ -682,7 +680,7 @@ MeasureMainBios ( =20 Status =3D MeasureFvImage ((EFI_PHYSICAL_ADDRESS) (UINTN) VolumeInfo.FvS= tart, VolumeInfo.FvSize); =20 - PERF_END_EX (mFileHandle, "EventRec", "Tcg2Pei", 0, PERF_ID_TCG2_PEI + 1= ); + PERF_FUNCTION_END (); =20 return Status; } --=20 2.21.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#42072): https://edk2.groups.io/g/devel/message/42072 Mute This Topic: https://groups.io/mt/32001831/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Thu Apr 18 18:13:34 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+42073+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+42073+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1560151764; cv=none; d=zoho.com; s=zohoarc; b=Tu0icltSL8Mc4vIvnjOt7HYSkQl7ZXD2Es97Nscnuk1n2k3hs+dp9j99dA9qk/svKNyd/ZZhvup6sjziz9hJwttyJ/WOd63Wbz/whd0YVmrtyPD2iabGaHhWEoXF8ATYyYPgvAASwbkkrJ/pxEH3V3pSQBm/4TFQ6rNkGH/7cPs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560151764; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To:ARC-Authentication-Results; bh=r220rgGsM9Y/yjS0oh5SIa5ZmNWSR/wA+5DzagkkeZQ=; b=M3OKUaBLv4vDFA7ISOZt8NCr7INLOQFg0ANFbrOMUQldx7iDDmGf/uiIaMQf24DzlFgI8mq3DevwNafS8vB7V50uybcI63xEjcpFSFKxHBKQEKSP6NAvwA6c5fosBTsSh0Ax9uVQo3GkLrdP59MQwWdO2uU3WVso4966PXSpvq8= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+42073+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 156015176447953.40208514569997; Mon, 10 Jun 2019 00:29:24 -0700 (PDT) Return-Path: X-Received: from mga17.intel.com (mga17.intel.com []) by groups.io with SMTP; Mon, 10 Jun 2019 00:29:23 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Jun 2019 00:29:23 -0700 X-ExtLoop1: 1 X-Received: from fieedk001.ccr.corp.intel.com ([10.239.33.119]) by fmsmga001.fm.intel.com with ESMTP; 10 Jun 2019 00:29:22 -0700 From: "Gao, Zhichao" To: devel@edk2.groups.io Cc: Bret Barkelew , Ray Ni , Rangasai V Chaganty Subject: [edk2-devel] [PATCH 6/6] IntelSiliconPkg/IntelVtdDxe: Change the performance code Date: Mon, 10 Jun 2019 15:28:55 +0800 Message-Id: <20190610072855.2800-7-zhichao.gao@intel.com> In-Reply-To: <20190610072855.2800-1-zhichao.gao@intel.com> References: <20190610072855.2800-1-zhichao.gao@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,zhichao.gao@intel.com Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1560151764; bh=NOFS3HfB9QIWA7e1xGCXZSmaU5GfeIbZDR0/n0xOVVQ=; h=Cc:Date:From:Reply-To:Subject:To; b=NswE7Cv5Yh20402I4bf6JkVi7IKcYEVpztdiI8u6KJcQgss3//osJ9CTeKq47WYDdMa +IbeihNItwk0aN8FrIDWk0ZVCSYZR7+hv4kpCyvbDwetZ5hTSbbW+UtI7Cho6YPp5CfRo IYUghlcg1RGgoNL4LHK8XNDKRkw1OxfPaVY= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" From: Bret Barkelew REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1888 Use PERF_INMODULE_BEGIN and PERF_INMODULE_END to replace PERF_CODE. Cc: Ray Ni Cc: Rangasai V Chaganty Signed-off-by: Zhichao Gao --- .../Feature/VTd/IntelVTdDxe/IntelVTdDxe.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/IntelVTdDxe.c b/IntelS= iliconPkg/Feature/VTd/IntelVTdDxe/IntelVTdDxe.c index a6287be2cf..501933da5c 100644 --- a/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/IntelVTdDxe.c +++ b/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/IntelVTdDxe.c @@ -230,7 +230,6 @@ VTdSetAttribute ( UINT16 Segment; VTD_SOURCE_ID SourceId; CHAR8 PerfToken[sizeof("VTD(S0000.B00.D00.F00)")]; - UINT32 Identifier; =20 DumpVtdIfError (); =20 @@ -257,18 +256,12 @@ VTdSetAttribute ( } Status =3D RequestAccessAttribute (Segment, SourceId, DeviceAddress, L= ength, IoMmuAccess); } else { - PERF_CODE ( - AsciiSPrint (PerfToken, sizeof(PerfToken), "S%04xB%02xD%02xF%01x", S= egment, SourceId.Bits.Bus, SourceId.Bits.Device, SourceId.Bits.Function); - Identifier =3D (Segment << 16) | SourceId.Uint16; - PERF_START_EX (gImageHandle, PerfToken, "IntelVTD", 0, Identifier); - ); + AsciiSPrint (PerfToken, sizeof (PerfToken), "S%04xB%02xD%02xF%01x", Se= gment, SourceId.Bits.Bus, SourceId.Bits.Device, SourceId.Bits.Function); + PERF_INMODULE_BEGIN (PerfToken); =20 Status =3D SetAccessAttribute (Segment, SourceId, DeviceAddress, Lengt= h, IoMmuAccess); =20 - PERF_CODE ( - Identifier =3D (Segment << 16) | SourceId.Uint16; - PERF_END_EX (gImageHandle, PerfToken, "IntelVTD", 0, Identifier); - ); + PERF_INMODULE_END (PerfToken); } =20 if (!EFI_ERROR(Status)) { --=20 2.21.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#42073): https://edk2.groups.io/g/devel/message/42073 Mute This Topic: https://groups.io/mt/32001832/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-