[edk2-devel] [Patch V2 2/2] UefiCpuPkg: Update PT code to support enable collect performance

duntan dun.tan at intel.com
Wed Apr 26 01:27:58 UTC 2023


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

Thanks,
Dun

-----Original Message-----
From: Ni, Ray <ray.ni at intel.com> 
Sent: Tuesday, April 25, 2023 10:14 PM
To: Tan, Dun <dun.tan at intel.com>; devel at edk2.groups.io
Cc: Dong, Eric <eric.dong at intel.com>; Kumar, Rahul R <rahul.r.kumar at intel.com>; Gerd Hoffmann <kraxel at redhat.com>; Chen, Xiao X <xiao.x.chen at 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.



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#103603): https://edk2.groups.io/g/devel/message/103603
Mute This Topic: https://groups.io/mt/98489093/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-




More information about the edk2-devel-archive mailing list