2 * Measured Profiling reporting for the Dp utility.
4 * Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>
5 * This program and the accompanying materials
6 * are licensed and made available under the terms and conditions of the BSD License
7 * which accompanies this distribution. The full text of the license may be found at
8 * http://opensource.org/licenses/bsd-license.php
10 * THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
14 #include <Library/BaseLib.h>
15 #include <Library/BaseMemoryLib.h>
16 #include <Library/MemoryAllocationLib.h>
17 #include <Library/DebugLib.h>
18 #include <Library/UefiBootServicesTableLib.h>
19 #include <Library/TimerLib.h>
20 #include <Library/PeCoffGetEntryPointLib.h>
21 #include <Library/PerformanceLib.h>
22 #include <Library/PrintLib.h>
23 #include <Library/HiiLib.h>
24 #include <Library/PcdLib.h>
26 #include <Guid/Performance.h>
30 #include "DpInternal.h"
32 /** Gather and print ALL Profiling Records.
34 * Displays all "interesting" Profile measurements in order.
35 * The number of records displayed is controlled by:
36 * - records with a duration less than mInterestThreshold microseconds are not displayed.
37 * - No more than Limit records are displayed. A Limit of zero will not limit the output.
38 * - If the ExcludeFlag is TRUE, records matching entries in the CumData array are not
41 * @pre The mInterestThreshold global variable is set to the shortest duration to be printed.
42 * The mGaugeString and mUnicodeToken global arrays are used for temporary string storage.
43 * They must not be in use by a calling function.
45 * @param[in] Limit The number of records to print. Zero is ALL.
46 * @param[in] ExcludeFlag TRUE to exclude individual Cumulative items from display.
52 IN BOOLEAN ExcludeFlag
57 StringPtr
= HiiGetString (gHiiHandle
, STRING_TOKEN (STR_DP_SECTION_PROFILE
), NULL
);
58 PrintToken( STRING_TOKEN (STR_DP_SECTION_HEADER
),
59 (StringPtr
== NULL
) ? ALit_UNKNOWN
: StringPtr
);
63 /** Gather and print Raw Profile Records.
65 * All Profile measurements with a duration greater than or equal to
66 * mInterestThreshold are printed without interpretation.
68 * The number of records displayed is controlled by:
69 * - records with a duration less than mInterestThreshold microseconds are not displayed.
70 * - No more than Limit records are displayed. A Limit of zero will not limit the output.
71 * - If the ExcludeFlag is TRUE, records matching entries in the CumData array are not
74 * @pre The mInterestThreshold global variable is set to the shortest duration to be printed.
76 * @param[in] Limit The number of records to print. Zero is ALL.
77 * @param[in] ExcludeFlag TRUE to exclude individual Cumulative items from display.
83 IN BOOLEAN ExcludeFlag
88 StringPtr
= HiiGetString (gHiiHandle
, STRING_TOKEN (STR_DP_SECTION_RAWPROFILE
), NULL
);
89 PrintToken( STRING_TOKEN (STR_DP_SECTION_HEADER
),
90 (StringPtr
== NULL
) ? ALit_UNKNOWN
: StringPtr
);