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:23 -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:23 -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:22 -0700 From: "Gao, Zhichao" To: devel@edk2.groups.io Cc: Bret Barkelew , Ray Ni , Rangasai V Chaganty Subject: [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> 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_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/IntelSiliconPkg/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; DumpVtdIfError (); @@ -257,18 +256,12 @@ VTdSetAttribute ( } Status = RequestAccessAttribute (Segment, SourceId, DeviceAddress, Length, IoMmuAccess); } else { - PERF_CODE ( - AsciiSPrint (PerfToken, sizeof(PerfToken), "S%04xB%02xD%02xF%01x", Segment, SourceId.Bits.Bus, SourceId.Bits.Device, SourceId.Bits.Function); - Identifier = (Segment << 16) | SourceId.Uint16; - PERF_START_EX (gImageHandle, PerfToken, "IntelVTD", 0, Identifier); - ); + AsciiSPrint (PerfToken, sizeof (PerfToken), "S%04xB%02xD%02xF%01x", Segment, SourceId.Bits.Bus, SourceId.Bits.Device, SourceId.Bits.Function); + PERF_INMODULE_BEGIN (PerfToken); Status = SetAccessAttribute (Segment, SourceId, DeviceAddress, Length, IoMmuAccess); - PERF_CODE ( - Identifier = (Segment << 16) | SourceId.Uint16; - PERF_END_EX (gImageHandle, PerfToken, "IntelVTD", 0, Identifier); - ); + PERF_INMODULE_END (PerfToken); } if (!EFI_ERROR(Status)) { -- 2.21.0.windows.1