guard perf track lock hooks (#1591)

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
This commit is contained in:
Matthew Kennedy 2020-07-10 21:16:36 -07:00 committed by GitHub
parent 6909c69438
commit 06360c2911
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -209,7 +209,9 @@ uint32_t maxLockedDuration = 0;
#endif /* EFI_CLOCK_LOCKS */
void onLockHook(void) {
#if ENABLE_PERF_TRACE
perfEventInstantGlobal(PE::GlobalLock);
#endif /* ENABLE_PERF_TRACE */
#if EFI_CLOCK_LOCKS
lastLockTime = getTimeNowLowerNt();
@ -228,7 +230,9 @@ void onUnlockHook(void) {
// }
#endif /* EFI_CLOCK_LOCKS */
#if ENABLE_PERF_TRACE
perfEventInstantGlobal(PE::GlobalUnlock);
#endif /* ENABLE_PERF_TRACE */
}
void firmwareError(obd_code_e code, const char *fmt, ...) {