X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=PerformancePkg%2FDp_App%2FDpProfile.c;h=d550760f8397ce18b9f1f5d9a1fbaabcbe47e8af;hb=8835954602834c41db448064a7205ac0b8b66189;hp=037c6fa064c1b28209f3100c3792cb81ca8062b8;hpb=92ea1df875340a9841117762c41087bdb5561a10;p=mirror_edk2.git diff --git a/PerformancePkg/Dp_App/DpProfile.c b/PerformancePkg/Dp_App/DpProfile.c index 037c6fa064..d550760f83 100644 --- a/PerformancePkg/Dp_App/DpProfile.c +++ b/PerformancePkg/Dp_App/DpProfile.c @@ -29,22 +29,23 @@ #include "Literals.h" #include "DpInternal.h" -/** Gather and print ALL Profiling Records. - * - * Displays all "interesting" Profile measurements in order. - * The number of records displayed is controlled by: - * - records with a duration less than mInterestThreshold microseconds are not displayed. - * - No more than Limit records are displayed. A Limit of zero will not limit the output. - * - If the ExcludeFlag is TRUE, records matching entries in the CumData array are not - * displayed. - * - * @pre The mInterestThreshold global variable is set to the shortest duration to be printed. - * The mGaugeString and mUnicodeToken global arrays are used for temporary string storage. - * They must not be in use by a calling function. - * - * @param[in] Limit The number of records to print. Zero is ALL. - * @param[in] ExcludeFlag TRUE to exclude individual Cumulative items from display. - * +/** + Gather and print ALL Profiling Records. + + Displays all "interesting" Profile measurements in order. + The number of records displayed is controlled by: + - records with a duration less than mInterestThreshold microseconds are not displayed. + - No more than Limit records are displayed. A Limit of zero will not limit the output. + - If the ExcludeFlag is TRUE, records matching entries in the CumData array are not + displayed. + + @pre The mInterestThreshold global variable is set to the shortest duration to be printed. + The mGaugeString and mUnicodeToken global arrays are used for temporary string storage. + They must not be in use by a calling function. + + @param[in] Limit The number of records to print. Zero is ALL. + @param[in] ExcludeFlag TRUE to exclude individual Cumulative items from display. + **/ VOID DumpAllProfile( @@ -53,29 +54,35 @@ DumpAllProfile( ) { EFI_STRING StringPtr; + EFI_STRING StringPtrUnknown; + StringPtrUnknown = HiiGetString (gHiiHandle, STRING_TOKEN (STR_ALIT_UNKNOWN), NULL); StringPtr = HiiGetString (gHiiHandle, STRING_TOKEN (STR_DP_SECTION_PROFILE), NULL); + PrintToken( STRING_TOKEN (STR_DP_SECTION_HEADER), - (StringPtr == NULL) ? ALit_UNKNOWN: StringPtr); + (StringPtr == NULL) ? StringPtrUnknown: StringPtr); + FreePool (StringPtr); + FreePool (StringPtrUnknown); return; } -/** Gather and print Raw Profile Records. - * - * All Profile measurements with a duration greater than or equal to - * mInterestThreshold are printed without interpretation. - * - * The number of records displayed is controlled by: - * - records with a duration less than mInterestThreshold microseconds are not displayed. - * - No more than Limit records are displayed. A Limit of zero will not limit the output. - * - If the ExcludeFlag is TRUE, records matching entries in the CumData array are not - * displayed. - * - * @pre The mInterestThreshold global variable is set to the shortest duration to be printed. - * - * @param[in] Limit The number of records to print. Zero is ALL. - * @param[in] ExcludeFlag TRUE to exclude individual Cumulative items from display. - * +/** + Gather and print Raw Profile Records. + + All Profile measurements with a duration greater than or equal to + mInterestThreshold are printed without interpretation. + + The number of records displayed is controlled by: + - records with a duration less than mInterestThreshold microseconds are not displayed. + - No more than Limit records are displayed. A Limit of zero will not limit the output. + - If the ExcludeFlag is TRUE, records matching entries in the CumData array are not + displayed. + + @pre The mInterestThreshold global variable is set to the shortest duration to be printed. + + @param[in] Limit The number of records to print. Zero is ALL. + @param[in] ExcludeFlag TRUE to exclude individual Cumulative items from display. + **/ VOID DumpRawProfile( @@ -84,9 +91,13 @@ DumpRawProfile( ) { EFI_STRING StringPtr; + EFI_STRING StringPtrUnknown; + StringPtrUnknown = HiiGetString (gHiiHandle, STRING_TOKEN (STR_ALIT_UNKNOWN), NULL); StringPtr = HiiGetString (gHiiHandle, STRING_TOKEN (STR_DP_SECTION_RAWPROFILE), NULL); PrintToken( STRING_TOKEN (STR_DP_SECTION_HEADER), - (StringPtr == NULL) ? ALit_UNKNOWN: StringPtr); + (StringPtr == NULL) ? StringPtrUnknown: StringPtr); + FreePool (StringPtr); + FreePool (StringPtrUnknown); return; }