From: "Gao, Zhichao" <zhichao.gao@intel.com>
To: devel@edk2.groups.io
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>,
Ray Ni <ray.ni@intel.com>,
Rangasai V Chaganty <rangasai.v.chaganty@intel.com>
Subject: [PATCH 6/6] IntelSiliconPkg/IntelVtdDxe: Change the performance code
Date: Mon, 10 Jun 2019 15:28:55 +0800 [thread overview]
Message-ID: <20190610072855.2800-7-zhichao.gao@intel.com> (raw)
In-Reply-To: <20190610072855.2800-1-zhichao.gao@intel.com>
From: Bret Barkelew <Bret.Barkelew@microsoft.com>
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 <ray.ni@intel.com>
Cc: Rangasai V Chaganty <rangasai.v.chaganty@intel.com>
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
---
.../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
prev parent reply other threads:[~2019-06-10 7:29 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-10 7:28 [PATCH 0/6] Change the performance code Gao, Zhichao
2019-06-10 7:28 ` [PATCH 1/6] MdeModulePkg/DxeMain: Add " Gao, Zhichao
2019-06-14 8:43 ` Wu, Hao A
2019-06-10 7:28 ` [PATCH 2/6] MdeModule/PeiMain: " Gao, Zhichao
2019-06-14 8:43 ` Wu, Hao A
2019-06-10 7:28 ` [PATCH 3/6] MdeModulePkg/UefiBootManagerLib: Change " Gao, Zhichao
2019-06-14 8:43 ` Wu, Hao A
2019-06-17 4:47 ` Dandan Bi
2019-06-18 5:51 ` Liming Gao
2019-06-10 7:28 ` [PATCH 4/6] SecurityPkg/Tcg2Dxe: " Gao, Zhichao
2019-06-10 7:28 ` [PATCH 5/6] SecurityPkg/Tcg2Pei: " Gao, Zhichao
2019-06-10 7:28 ` Gao, Zhichao [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190610072855.2800-7-zhichao.gao@intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox