外观
P2 Startup CoreProfile 最小充分过滤集 v1 方案
根因证据
- iOS 17 与 iOS 18 的
willFinishLaunching/didFinishLaunching300 ms 单轮均为outside-core-window,但 identity verified、drop=0、marker 完整且 drain=quiescent;设备连接、目标归属与尾部排空已从根因集排除。 - iOS 17 失败轮的 CoreProfile 有效 Mach 窗口约 493–505 ms,marker 起点已消耗约 237–249 ms,marker 终点超出窗口约 46 ms;iOS 18 窗口仅约 214–224 ms。
- raw Session 频繁出现 16 MiB binary chunk,表明窗口受设备端 CoreProfile 缓冲容量限制,而不是 Host 提前取消。
- 冻结上游示例的 17 组
kdf2类别中,Perfowl 当前版本化 lifecycle decoder 只使用 6 组:动态线程归属、System Interface / Static Runtime、UIKit 阶段与 Initial Frame terminal。
最小充分过滤集
text
startupRequiredFilters = {
0x07000000, # 线程→PID 归属
0x25010000, # PERF_THD_Data 动态归属
0x1F070000, # System Interface / Static Runtime 边界
0x2BDC0000, # System Interface → Static Runtime 转换
0x2B870000, # UIKit / AppDelegate / Scene 阶段
0x31CA0000 # Initial Frame terminal
}- 集合的每一项都对应当前 decoder 的显式消费分支,不借助事件邻近或时间猜测。
- FrameTime/FPS 的
0x31800000仍由独立开关合并,不改变 Startup 集合。 - 参考上游的 17 组集合保留为证据常量,不再作为 Perfowl 正式订阅载荷。
计算、窗口与质量门禁
业务耗时仍按 StartupTiming v11 的 Mach absolute 差值计算,本批新增源配置与窗口门禁:
text
filterSetExact = actualKdebugFilters == startupRequiredFilters
insideCoreWindow = coreMinMachTicks <= markerBeginTicks
AND markerEndTicks <= coreMaxMachTicks
windowHeadroomMs = (coreMaxMachTicks - markerEndTicks)
* coreNumer / coreDenom / 1,000,000
fixtureEvidencePassed = filterSetExact
AND coreProfileDrainPassed
AND insideCoreWindow
AND markerDelayErrorMs <= markerToleranceMs
AND identityVerified
AND droppedEventHighWater == 0windowHeadroomMs < 0表示 marker 仍被截断,只保留诊断证据。- 任一必需过滤类缺失、过滤集混用、timebase 异常或阶段边界不完整时,指标为
null/—,不补 0。 - 聚合仅接受同一算法版本、同一过滤集、同一 bufferMode 的 Session。
验收
- E1:单元测试锁定 6 组过滤类及 FrameTime 合并语义。
- E2:完整 Python 测试确认 decoder、raw 录制和离线重放不变。
- E4:iOS 17、iOS 18 各执行 willFinish / didFinish 300 ms 单轮,要求 marker 完整、identity verified、drop=0、drain 通过且
insideCoreWindow=true。 - 只在单轮稳定通过后进入 3×3 因果批次;否则保持 mapping candidate 与指标
null/—。
回滚
恢复 17 组冻结上游过滤集即可回滚。历史 raw Session 不回写,通过过滤集版本区分。