public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Ni, Ray" <ray.ni@intel.com>
To: devel@edk2.groups.io
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>,
	Zhiguang Liu <zhiguang@liu@intel.com>,
	Michael D Kinney <michael.d.kinney@intel.com>
Subject: [PATCH 6/6] SimicsOpenBoardPkg: Disable DriverBindingSupport perf logging
Date: Wed, 24 May 2023 20:28:52 +0800	[thread overview]
Message-ID: <20230524122852.2047-7-ray.ni@intel.com> (raw)
In-Reply-To: <20230524122852.2047-1-ray.ni@intel.com>

DriverBindingSupport() is called lots of time during post.
If it's also included in the perf logging, it's very easy to use all
the FPDT table memory pre-allocated at EndOfDxe because the
driver binding connect process happens after EndOfDxe.

PcdExtFpdtBootRecordPadSize was added for holding the
perf-logging records after EndOfDxe. But the DriverBindingSupport
records are just too many. For example, SimicsOpenBoardPkg has
to set this PCD to almost 100x bigger than the default value in order
to hold all the perf-logging records.

Platform developers are usually not aware of missing some records
after EndOfDxe because those records are all about driverbinding
support/start/stop. But if we add more perf-logging inside SMM,
those SMM records will be missed in the final FPDT table because
DxeCorePerformanceLib collects those SMM records at ReadyToBoot
event. Since the FPDT cannot hold all driverbinding records, it
definitely cannot hold those SMM records as well.

So in order to hold all SMM perf loggings, either platform should
set PcdExtFpdtBootRecordPadSize to a large enough value, or
as what this patch does, to disable the driverbinding support
perf-logging.

Signed-off-by: Ray Ni <ray.ni@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Zhiguang Liu <zhiguang@liu@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
---
 .../BoardX58Ich10/OpenBoardPkgPcd.dsc                 | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkgPcd.dsc b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkgPcd.dsc
index b6672d1a78..6b969ab1f5 100644
--- a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkgPcd.dsc
+++ b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkgPcd.dsc
@@ -132,7 +132,16 @@
   gEfiMdePkgTokenSpaceGuid.PcdMaximumGuidedExtractHandler|0x10
   gEfiMdePkgTokenSpaceGuid.PcdPerformanceLibraryPropertyMask|0x0
 !if gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable == TRUE
-  gEfiMdePkgTokenSpaceGuid.PcdPerformanceLibraryPropertyMask|0x1
+  #  BIT0 - Enable Performance Measurement.<BR>
+  #  BIT1 - Disable Start Image Logging.<BR>
+  #  BIT2 - Disable Load Image logging.<BR>
+  #  BIT3 - Disable Binding Support logging.<BR>
+  #  BIT4 - Disable Binding Start logging.<BR>
+  #  BIT5 - Disable Binding Stop logging.<BR>
+  #  BIT6 - Disable all other general Perfs.<BR>
+  #  BIT1-BIT6 are evaluated when BIT0 is set.<BR>
+  #  Enable performance measurement but disable driver binding support logging.
+  gEfiMdePkgTokenSpaceGuid.PcdPerformanceLibraryPropertyMask|0x09
 !endif
 !if $(TARGET) == "RELEASE"
   gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropertyMask|0x03
-- 
2.39.1.windows.1


  parent reply	other threads:[~2023-05-24 12:29 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-24 12:28 [PATCH 0/6] Fine tune SimicsOpenBoardPkg Ni, Ray
2023-05-24 12:28 ` [PATCH 1/6] SimicsOpenBoardPkg: Remove un-used PlatformBootManagerLib Ni, Ray
2023-05-24 12:28 ` [PATCH 2/6] SimicsOpenBoardPkg: Remove logic that loads variable from disk file Ni, Ray
2023-05-24 12:28 ` [PATCH 3/6] SimicsOpenBoardPkg: Enable serial terminal Ni, Ray
2023-05-24 12:28 ` [PATCH 4/6] MinPlatform/build_bios.py: Support performance enabled build Ni, Ray
2023-05-24 23:07   ` Chiu, Chasel
2023-05-25  0:44     ` Ni, Ray
2023-05-24 12:28 ` [PATCH 5/6] SimicsOpenBoardPkg: Add "dp" command in performance build Ni, Ray
2023-05-24 12:28 ` Ni, Ray [this message]
     [not found] ` <17621420EF808DC9.12947@groups.io>
2023-05-25  2:10   ` [edk2-devel] [PATCH 1/6] SimicsOpenBoardPkg: Remove un-used PlatformBootManagerLib Ni, Ray
     [not found] ` <17621421B6E6FB43.8048@groups.io>
2023-05-25  2:10   ` [edk2-devel] [PATCH 2/6] SimicsOpenBoardPkg: Remove logic that loads variable from disk file Ni, Ray
     [not found] ` <17621422F0AEB994.8048@groups.io>
2023-05-25  2:11   ` [edk2-devel] [PATCH 6/6] SimicsOpenBoardPkg: Disable DriverBindingSupport perf logging Ni, Ray
     [not found] ` <176214229D12BE31.8048@groups.io>
2023-05-25  2:11   ` [edk2-devel] [PATCH 5/6] SimicsOpenBoardPkg: Add "dp" command in performance build Ni, Ray
     [not found] ` <17621421D3F4CA3E.12947@groups.io>
2023-05-25  2:11   ` [edk2-devel] [PATCH 3/6] SimicsOpenBoardPkg: Enable serial terminal Ni, Ray
2023-05-26  6:36 ` [edk2-devel] [PATCH 0/6] Fine tune SimicsOpenBoardPkg Zhiguang Liu

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=20230524122852.2047-7-ray.ni@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