Loading...
iokit/Kernel/IOInterruptEventSource.cpp xnu-8020.101.4 xnu-8019.41.5
--- xnu/xnu-8020.101.4/iokit/Kernel/IOInterruptEventSource.cpp
+++ xnu/xnu-8019.41.5/iokit/Kernel/IOInterruptEventSource.cpp
@@ -409,18 +409,18 @@
 		}
 
 		if (reserved->statistics) {
+			if (IA_GET_STATISTIC_ENABLED(kInterruptAccountingSecondLevelCountIndex)) {
+				IA_ADD_VALUE(&reserved->statistics->interruptStatistics[kInterruptAccountingSecondLevelCountIndex], 1);
+			}
+
+			if (IA_GET_STATISTIC_ENABLED(kInterruptAccountingSecondLevelCPUTimeIndex)) {
+				endCPUTime = thread_get_runtime_self();
+				IA_ADD_VALUE(&reserved->statistics->interruptStatistics[kInterruptAccountingSecondLevelCPUTimeIndex], endCPUTime - startCPUTime);
+			}
+
 			if (IA_GET_STATISTIC_ENABLED(kInterruptAccountingSecondLevelSystemTimeIndex)) {
 				endSystemTime = mach_absolute_time();
 				IA_ADD_VALUE(&reserved->statistics->interruptStatistics[kInterruptAccountingSecondLevelSystemTimeIndex], endSystemTime - startSystemTime);
-			}
-
-			if (IA_GET_STATISTIC_ENABLED(kInterruptAccountingSecondLevelCPUTimeIndex)) {
-				endCPUTime = thread_get_runtime_self();
-				IA_ADD_VALUE(&reserved->statistics->interruptStatistics[kInterruptAccountingSecondLevelCPUTimeIndex], endCPUTime - startCPUTime);
-			}
-
-			if (IA_GET_STATISTIC_ENABLED(kInterruptAccountingSecondLevelCountIndex)) {
-				IA_ADD_VALUE(&reserved->statistics->interruptStatistics[kInterruptAccountingSecondLevelCountIndex], 1);
 			}
 		}