summaryrefslogtreecommitdiffstats
path: root/PerformancePkg/Dp_App/DpTrace.c
diff options
context:
space:
mode:
Diffstat (limited to 'PerformancePkg/Dp_App/DpTrace.c')
-rw-r--r--PerformancePkg/Dp_App/DpTrace.c62
1 files changed, 53 insertions, 9 deletions
diff --git a/PerformancePkg/Dp_App/DpTrace.c b/PerformancePkg/Dp_App/DpTrace.c
index 632904f339..fc21cdc707 100644
--- a/PerformancePkg/Dp_App/DpTrace.c
+++ b/PerformancePkg/Dp_App/DpTrace.c
@@ -136,8 +136,11 @@ GatherStatistics(
@param[in] Limit The number of records to print. Zero is ALL.
@param[in] ExcludeFlag TRUE to exclude individual Cumulative items from display.
+ @retval EFI_SUCCESS The operation was successful.
+ @retval EFI_ABORTED The user aborts the operation.
+ @return Others from a call to gBS->LocateHandleBuffer().
**/
-VOID
+EFI_STATUS
DumpAllTrace(
IN UINTN Limit,
IN BOOLEAN ExcludeFlag
@@ -257,12 +260,17 @@ DumpAllTrace(
ElapsedTime
);
}
+ if (ShellGetExecutionBreakFlag ()) {
+ Status = EFI_ABORTED;
+ break;
+ }
}
}
if (HandleBuffer != NULL) {
FreePool (HandleBuffer);
}
SafeFreePool ((VOID *) IncFlag);
+ return Status;
}
/**
@@ -281,9 +289,11 @@ DumpAllTrace(
@param[in] Limit The number of records to print. Zero is ALL.
@param[in] ExcludeFlag TRUE to exclude individual Cumulative items from display.
-
+
+ @retval EFI_SUCCESS The operation was successful.
+ @retval EFI_ABORTED The user aborts the operation.
**/
-VOID
+EFI_STATUS
DumpRawTrace(
IN UINTN Limit,
IN BOOLEAN ExcludeFlag
@@ -298,6 +308,9 @@ DumpRawTrace(
EFI_STRING StringPtr;
EFI_STRING StringPtrUnknown;
+ EFI_STATUS Status;
+
+ Status = EFI_SUCCESS;
StringPtrUnknown = HiiGetString (gHiiHandle, STRING_TOKEN (STR_ALIT_UNKNOWN), NULL);
StringPtr = HiiGetString (gHiiHandle, STRING_TOKEN (STR_DP_SECTION_RAWTRACE), NULL);
@@ -361,7 +374,12 @@ DumpRawTrace(
Measurement.Module
);
}
+ if (ShellGetExecutionBreakFlag ()) {
+ Status = EFI_ABORTED;
+ break;
+ }
}
+ return Status;
}
/**
@@ -509,8 +527,10 @@ ProcessPhases(
Gather and print Handle data.
@param[in] ExcludeFlag TRUE to exclude individual Cumulative items from display.
-
- @return Status from a call to gBS->LocateHandle().
+
+ @retval EFI_SUCCESS The operation was successful.
+ @retval EFI_ABORTED The user aborts the operation.
+ @return Others from a call to gBS->LocateHandleBuffer().
**/
EFI_STATUS
ProcessHandles(
@@ -608,6 +628,10 @@ ProcessHandles(
);
}
}
+ if (ShellGetExecutionBreakFlag ()) {
+ Status = EFI_ABORTED;
+ break;
+ }
}
}
if (HandleBuffer != NULL) {
@@ -620,9 +644,11 @@ ProcessHandles(
Gather and print PEIM data.
Only prints complete PEIM records
-
+
+ @retval EFI_SUCCESS The operation was successful.
+ @retval EFI_ABORTED The user aborts the operation.
**/
-VOID
+EFI_STATUS
ProcessPeims(
VOID
)
@@ -634,6 +660,9 @@ ProcessPeims(
UINTN LogEntryKey;
UINTN TIndex;
EFI_STRING StringPtrUnknown;
+ EFI_STATUS Status;
+
+ Status = EFI_SUCCESS;
StringPtrUnknown = HiiGetString (gHiiHandle, STRING_TOKEN (STR_ALIT_UNKNOWN), NULL);
StringPtr = HiiGetString (gHiiHandle, STRING_TOKEN (STR_DP_SECTION_PEIMS), NULL);
@@ -687,7 +716,12 @@ ProcessPeims(
);
}
}
+ if (ShellGetExecutionBreakFlag ()) {
+ Status = EFI_ABORTED;
+ break;
+ }
}
+ return Status;
}
/**
@@ -697,9 +731,11 @@ ProcessPeims(
Only prints records where Handle is NULL
Increment TIndex for every record, even skipped ones, so that we have an
indication of every measurement record taken.
-
+
+ @retval EFI_SUCCESS The operation was successful.
+ @retval EFI_ABORTED The user aborts the operation.
**/
-VOID
+EFI_STATUS
ProcessGlobal(
VOID
)
@@ -711,6 +747,9 @@ ProcessGlobal(
UINTN LogEntryKey;
UINTN Index; // Index, or number, of the measurement record being processed
EFI_STRING StringPtrUnknown;
+ EFI_STATUS Status;
+
+ Status = EFI_SUCCESS;
StringPtrUnknown = HiiGetString (gHiiHandle, STRING_TOKEN (STR_ALIT_UNKNOWN), NULL);
StringPtr = HiiGetString (gHiiHandle, STRING_TOKEN (STR_DP_SECTION_GENERAL), NULL);
@@ -770,8 +809,13 @@ ProcessGlobal(
}
}
}
+ if (ShellGetExecutionBreakFlag ()) {
+ Status = EFI_ABORTED;
+ break;
+ }
Index++;
}
+ return Status;
}
/**