public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "duntan" <dun.tan@intel.com>
To: "Ni, Ray" <ray.ni@intel.com>,
	"devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: "Dong, Eric" <eric.dong@intel.com>,
	"Kumar, Rahul R" <rahul.r.kumar@intel.com>,
	Gerd Hoffmann <kraxel@redhat.com>,
	"Chen, Xiao X" <xiao.x.chen@intel.com>
Subject: Re: [Patch V2 2/2] UefiCpuPkg: Update PT code to support enable collect performance
Date: Wed, 26 Apr 2023 01:27:58 +0000	[thread overview]
Message-ID: <BN9PR11MB5483AC32A3A5CACBFDC9AF3CE5659@BN9PR11MB5483.namprd11.prod.outlook.com> (raw)
In-Reply-To: <MN6PR11MB82449023E00B87C4E8DFC6248C649@MN6PR11MB8244.namprd11.prod.outlook.com>

Thanks for the comments. I'll update the code in next version patch.

Thanks,
Dun

-----Original Message-----
From: Ni, Ray <ray.ni@intel.com> 
Sent: Tuesday, April 25, 2023 10:14 PM
To: Tan, Dun <dun.tan@intel.com>; devel@edk2.groups.io
Cc: Dong, Eric <eric.dong@intel.com>; Kumar, Rahul R <rahul.r.kumar@intel.com>; Gerd Hoffmann <kraxel@redhat.com>; Chen, Xiao X <xiao.x.chen@intel.com>
Subject: RE: [Patch V2 2/2] UefiCpuPkg: Update PT code to support enable collect performance

> @@ -112,6 +115,7 @@ ProcTraceSupport (
>    PROC_TRACE_DATA                              *ProcTraceData;
>    CPUID_STRUCTURED_EXTENDED_FEATURE_FLAGS_EBX  Ebx;
>    CPUID_INTEL_PROCESSOR_TRACE_MAIN_LEAF_ECX    Ecx;
> +  CPUID_INTEL_PROCESSOR_TRACE_MAIN_LEAF_EBX    MainLeafEbx;

1. can you update the "Ecx" to "ProcTraceEcx", and "MainLeafEbx" to "ProcTraceEbx"?

> 
>    //
>    // Check if ProcTraceMemorySize option is enabled (0xFF means 
> disable by
> user)
> @@ -141,6 +145,12 @@ ProcTraceSupport (
>      ProcTraceData->ProcessorData[ProcessorNumber].RtitCtrl.Uint64           =
> AsmReadMsr64 (MSR_IA32_RTIT_CTL);
>      
> ProcTraceData->ProcessorData[ProcessorNumber].RtitOutputBase.Uint64
> = AsmReadMsr64 (MSR_IA32_RTIT_OUTPUT_BASE);
>      ProcTraceData-
> >ProcessorData[ProcessorNumber].RtitOutputMaskPtrs.Uint64 =
> AsmReadMsr64 (MSR_IA32_RTIT_OUTPUT_MASK_PTRS);
> +
> +    if (ProcTraceData->EnablePerformanceCollecting) {
> +      AsmCpuidEx (CPUID_INTEL_PROCESSOR_TRACE,
> CPUID_INTEL_PROCESSOR_TRACE_MAIN_LEAF, NULL, &MainLeafEbx.Uint32, 
> NULL, NULL);

2. There is an existing Cpuid call earlier. Can you get the "EBX" value in the existing
     Cpuid call? And you don't even need to check "EnablePerformanceCollecting" here
     for the capability detection.


      reply	other threads:[~2023-04-26  1:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-25  9:05 [Patch V2 0/2] Update ProcTrace feature code for new requirements duntan
2023-04-25  9:05 ` [Patch V2 1/2] UefiCpuPkg: Update code to support enable ProcTrace only on BSP duntan
2023-04-25 14:09   ` [edk2-devel] " Ni, Ray
2023-04-26  1:28     ` duntan
2023-04-25  9:05 ` [Patch V2 2/2] UefiCpuPkg: Update PT code to support enable collect performance duntan
2023-04-25 14:13   ` Ni, Ray
2023-04-26  1:27     ` duntan [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=BN9PR11MB5483AC32A3A5CACBFDC9AF3CE5659@BN9PR11MB5483.namprd11.prod.outlook.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