reason = "ResetTrue"
elseif buf[3] == 3 then
reason = "RateZero"
+ elseif buf[3] == 4 then
+ reason = "TSMismatch"
end
printf("%s %-15s ( %-10s %-10s ) ----------------------------------------\n",
prefix, reason, format_timestamp_arm(buf[1]), format_timestamp_intel(buf[2]))
printf("%s ( %-10s Reset )\n",
prefix, format_timestamp_arm(buf[1]), format_timestamp_intel(buf[2]))
else
- printf("%s ( %-10s %-10s )\n",
- prefix, format_timestamp_arm(buf[1]), format_timestamp_intel(buf[2]))
+ local skip = ""
+ if buf[3] == 1 then
+ skip = "Int handler"
+ end
+ printf("%s ( %-10s %-10s ) %s\n",
+ prefix, format_timestamp_arm(buf[1]), format_timestamp_intel(buf[2]), skip)
end
end)
+trace_codename("MACH_CLOCK_BRIDGE_SKIP_TS", function(buf)
+ local prefix = get_prefix(buf, "*")
+
+ if buf[4] > 0 then
+ printf("%s SKIP_RESET:%3d (Cur: %-10s Prev:%-10s) %-10s\n",
+ prefix, buf[4], format_timestamp_arm(buf[1]), format_timestamp_arm(buf[3]),
+ format_timestamp_intel(buf[2]))
+ else
+ printf("%s SKIP_DISTANCE: (Cur: %-10s Prev: %-10s) %-10s\n",
+ prefix, format_timestamp_arm(buf[1]), format_timestamp_arm(buf[3]),
+ format_timestamp_intel(buf[2]))
+ end
+
+end)
+
+trace_codename("MACH_CLOCK_BRIDGE_TS_MISMATCH", function(buf)
+ local prefix = get_prefix(buf, "?")
+
+ local diff = (math.abs(buf[2] - buf[3]))/1000000
+
+ printf("%s ( Cur: %-10s Pred: %-10s Diff: %5.6f ms ) @ %-20s\n",
+ prefix, format_timestamp_intel(buf[2]), format_timestamp_intel(buf[3]),
+ diff, format_timestamp_arm(buf[1]))
+
+end)
+
+trace_codename("MACH_CLOCK_BRIDGE_OBSV_RATE", function(buf)
+ local prefix = get_prefix(buf, "=")
+
+ local rate
+ if darwin.uint64_to_double then
+ rate = darwin.uint64_to_double(buf[1])
+ else
+ rate = math.nan
+ end
+
+ printf("%s obsv_rate = %f exceeded limits(0.8, 1.2)\n", prefix, rate)
+
+end)