From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=fail (domain: intel.com, ip: , mailfrom: zhichao.gao@intel.com) 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 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 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: [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> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: <20190610072855.2800-1-zhichao.gao@intel.com> References: <20190610072855.2800-1-zhichao.gao@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Bret Barkelew 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. 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/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); - ); + PERF_INMODULE_END ("BdsAttempt"); + PERF_CROSSMODULE_END ("BDS"); + PERF_CROSSMODULE_BEGIN ("BDS"); 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); // // Destroy the RAM disk -- 2.21.0.windows.1