diff --git a/docs/Disaggregated/notes/p7/device-window-2/README.md b/docs/Disaggregated/notes/p7/device-window-2/README.md new file mode 100755 index 00000000..b78a139a --- /dev/null +++ b/docs/Disaggregated/notes/p7/device-window-2/README.md @@ -0,0 +1,19 @@ +# 设备窗口 #2(P7 收官)· 工具与 dry run + +- 运行手册:[`tools/RUNBOOK.md`](tools/RUNBOOK.md)(一条命令 `tools/window.sh `,detached、可续跑;工作副本在 `~/w7/notes/p7/window2/`)。 +- 脚本:`tools/{lib.sh,detach.sh,window.sh,10-build.sh,21-preflight.sh,20-install.sh,30-gate3.sh,40-bsl-stats.sh,50-cts-after.sh,60-reduce.py,90-restore.sh}`; + `tools/dry-run-p7w6.sh` 是下面 dry run 的原样命令。 +- `$BASE` 的机器可读 JSON 此前缺失,已由 `cts_multi_report.py --adopt-legacy` 从 `~/w7/logs/cts-a64/base/runs` 重生成: + `tools/cts/baselines/base-DirectVulkan-monolith-p7w1-9be62cbc.{json,md}`(逐块数字与 `../device-window-1/CTS-base/README.md` 一致)。 + +## dry run(2026-09-23,Redmi `2f7cbe2e`,已装 p7w6 APK,只证管线) + +| 目录 | 内容 | +|---|---| +| `dry-run/dry-p7w6/` | preflight(找到:supervisor 在跑 / stay-on 15 / UNPINNED)→ 身份核对(设备 `base.apk` = `45759c30…`)→ 门 3 两例(OpenRA、iris-bsl-in-world)× 四臂 × 1 → bsl inproc → CTS dsa 前 20 例 → reduce → restore;`verdict.txt` 与 `timing.tsv` | +| `dry-run/dry-p7w6-b-bsl/` | 修 supervisor 探测与采样器预停后重跑:bsl inproc + spawn 的 maps / RSS 峰值与 `wbuf[]` | +| `dry-run/dry-p7w6-c-cts-ssbo-dsa/` | CTS 计时样本:p7w6 inproc 全 ssbo + dsa | +| `dry-run/build-p7w7dry-14e1c8b9/` | `10-build.sh 14e1c8b9 p7w7dry-14e1c8b9`:APK 131 s、主机制品 223 s;**未安装** | +| `dry-run/pre-14e1c8b9-cts/` | pipe 头 lib 的 CTS 五块预读(inproc)与红例的 monolith / inproc 逐例归属(`attribution.txt`)——门 5 在该头上会红,见 RUNBOOK §6 | + +原始归档(actual PNG、角色日志、qpa)在 `~/w7/logs/devprep/w2//`。 diff --git a/docs/Disaggregated/notes/p7/device-window-2/dry-run/build-p7w7dry-14e1c8b9/apk.sha256 b/docs/Disaggregated/notes/p7/device-window-2/dry-run/build-p7w7dry-14e1c8b9/apk.sha256 new file mode 100644 index 00000000..b2842a2b --- /dev/null +++ b/docs/Disaggregated/notes/p7/device-window-2/dry-run/build-p7w7dry-14e1c8b9/apk.sha256 @@ -0,0 +1 @@ +f2ca6b02c790c1be51e432aa3671d577888bc46cca7554108914dab1e38b2f3a trace-p7w7dry-14e1c8b9.apk diff --git a/docs/Disaggregated/notes/p7/device-window-2/dry-run/build-p7w7dry-14e1c8b9/host.sha256 b/docs/Disaggregated/notes/p7/device-window-2/dry-run/build-p7w7dry-14e1c8b9/host.sha256 new file mode 100644 index 00000000..2b0138df --- /dev/null +++ b/docs/Disaggregated/notes/p7/device-window-2/dry-run/build-p7w7dry-14e1c8b9/host.sha256 @@ -0,0 +1,3 @@ +3d6a959f2fb8caa0780d339393eb3194f051130749ac264e94aee961c93acdde libMobileGL.so +7a95cb4d276b40e4843c9d9f8c4d0f3486bfa6b5fc3e3b9a0dd842e1e9403ed6 libMobileGLServer.so +700907be83c2c1c1c83eec8de37300a6fdab4c7f06387116fa8aaee0169b7291 mobilegl_trace_replay diff --git a/docs/Disaggregated/notes/p7/device-window-2/dry-run/build-p7w7dry-14e1c8b9/lib.sha256 b/docs/Disaggregated/notes/p7/device-window-2/dry-run/build-p7w7dry-14e1c8b9/lib.sha256 new file mode 100644 index 00000000..93acec0e --- /dev/null +++ b/docs/Disaggregated/notes/p7/device-window-2/dry-run/build-p7w7dry-14e1c8b9/lib.sha256 @@ -0,0 +1,2 @@ +7891670f7286d0a6522d52185a48b810004f3273e37e7c7bdf4d2d6f1bed3804 libMobileGL.so +24c4eaf39a7c3ec3dbdc1198c269c72abde1e318fbce1c428ac92a6bbd1efc39 libMobileGLServer.so diff --git a/docs/Disaggregated/notes/p7/device-window-2/dry-run/build-p7w7dry-14e1c8b9/timing.tsv b/docs/Disaggregated/notes/p7/device-window-2/dry-run/build-p7w7dry-14e1c8b9/timing.tsv new file mode 100644 index 00000000..2683eea0 --- /dev/null +++ b/docs/Disaggregated/notes/p7/device-window-2/dry-run/build-p7w7dry-14e1c8b9/timing.tsv @@ -0,0 +1,3 @@ +build-apk 2026-09-23T09:32:36 2026-09-23T09:34:47 131 +build-host 2026-09-23T09:34:47 2026-09-23T09:38:30 223 +build 2026-09-23T09:32:32 2026-09-23T09:38:30 358 all diff --git a/docs/Disaggregated/notes/p7/device-window-2/dry-run/dry-p7w6-b-bsl/verdict.txt b/docs/Disaggregated/notes/p7/device-window-2/dry-run/dry-p7w6-b-bsl/verdict.txt new file mode 100644 index 00000000..ba44e40c --- /dev/null +++ b/docs/Disaggregated/notes/p7/device-window-2/dry-run/dry-p7w6-b-bsl/verdict.txt @@ -0,0 +1,28 @@ +== BSL-ESC-MENU MOBILEGL_PIPE_STATS (maps lines / RSS peaks, wbuf[] gauges) == +[inproc] rc=0 seconds=14 finished=2026-09-23T09:43:28-04:00 + replay: passed=True ssim=0.999791667 sha=155dcdd13a24e0ee + pid comm role samples maps_peak VmRSS_peak_kB VmHWM_kB span_s + 483 ugin.p7w1.trace app 38 8536 822968 822968 14.0 + 3 wbuf[wbufs=28 wlivepk=1052 wdefpk=3312832 wdefsync=24] +[spawn] rc=0 seconds=14 finished=2026-09-23T09:43:47-04:00 + replay: passed=True ssim=0.999791667 sha=155dcdd13a24e0ee + pid comm role samples maps_peak VmRSS_peak_kB VmHWM_kB span_s + 7405 libMobileGLServ server 32 7401 342144 343392 13.1 + 677 ugin.p7w1.trace app 33 4595 552672 554952 13.5 + 3 wbuf[wbufs=28 wlivepk=1052 wdefpk=3312832 wdefsync=24] + +== CTS AFTER (inproc x DirectVulkan) vs BASE (monolith x DirectVulkan, p7w1) == +rate = Pass/(results-NotSupported); gate: delta >= -0.5 pp and 0 new crash per block +block cases BASE P/NS/F/X rate AFTER P/NS/F/X rate delta pp crash regr fixed verdict +dsa 20 19/0/0/1 95.000% 19/0/0/1 95.000% +0.000 0 0 0 PASS (SUBSET) +CTS PASS (SUBSET run: not a gate verdict) + +== TIMING == + preflight 5s 2026-09-23T09:43:03 -> 2026-09-23T09:43:08 reboot=0 pin=1 + install 0s 2026-09-23T09:43:08 -> 2026-09-23T09:43:08 verify_only=1 + bsl-inproc 14s 2026-09-23T09:43:11 -> 2026-09-23T09:43:25 + bsl-spawn 14s 2026-09-23T09:43:30 -> 2026-09-23T09:43:44 + bsl 38s 2026-09-23T09:43:09 -> 2026-09-23T09:43:47 + cts-dsa 1s 2026-09-23T09:43:51 -> 2026-09-23T09:43:52 limit=20 + cts 6s 2026-09-23T09:43:47 -> 2026-09-23T09:43:53 blocks=[dsa] limit=20 +reduce rc=0 diff --git a/docs/Disaggregated/notes/p7/device-window-2/dry-run/dry-p7w6-c-cts-ssbo-dsa/verdict.txt b/docs/Disaggregated/notes/p7/device-window-2/dry-run/dry-p7w6-c-cts-ssbo-dsa/verdict.txt new file mode 100644 index 00000000..4101b8f9 --- /dev/null +++ b/docs/Disaggregated/notes/p7/device-window-2/dry-run/dry-p7w6-c-cts-ssbo-dsa/verdict.txt @@ -0,0 +1,18 @@ +== CTS AFTER (inproc x DirectVulkan) vs BASE (monolith x DirectVulkan, p7w1) == +rate = Pass/(results-NotSupported); gate: delta >= -0.5 pp and 0 new crash per block +block cases BASE P/NS/F/X rate AFTER P/NS/F/X rate delta pp crash regr fixed verdict +dsa 371 368/0/2/1 99.191% 366/0/3/2 98.652% -0.539 1 2 0 FAIL + ! 1 NEW crash(es) + ! delta -0.539 pp < -0.5 pp + NEW CRASH KHR-GL46.direct_state_access.renderbuffers_storage + Pass->not KHR-GL46.direct_state_access.renderbuffers_storage + Pass->not KHR-GL46.direct_state_access.renderbuffers_storage_multisample +ssbo 124 124/0/0/0 100.000% 124/0/0/0 100.000% +0.000 0 0 0 PASS +CTS FAIL + +== TIMING == + preflight 6s 2026-09-23T09:56:51 -> 2026-09-23T09:56:57 reboot=0 pin=1 + cts-ssbo 3s 2026-09-23T09:57:00 -> 2026-09-23T09:57:03 limit=0 + cts-dsa 9s 2026-09-23T09:57:04 -> 2026-09-23T09:57:13 limit=0 + cts 16s 2026-09-23T09:56:57 -> 2026-09-23T09:57:13 blocks=[ssbo dsa] limit=0 +reduce rc=1 diff --git a/docs/Disaggregated/notes/p7/device-window-2/dry-run/dry-p7w6/apk-install.txt b/docs/Disaggregated/notes/p7/device-window-2/dry-run/dry-p7w6/apk-install.txt new file mode 100644 index 00000000..e7fb9682 --- /dev/null +++ b/docs/Disaggregated/notes/p7/device-window-2/dry-run/dry-p7w6/apk-install.txt @@ -0,0 +1,5 @@ + codePath=/data/app/~~4br5M_QTsaPrvHx-69f_Xg==/top.mobilegl.plugin.p7w1.trace-NDMXLIpuwnAYYsgnuI7hRA== + primaryCpuAbi=arm64-v8a + versionCode=26091061 minSdk=26 targetSdk=34 + versionName=26.09.0e16ca2-trace + lastUpdateTime=2026-09-23 12:03:48 diff --git a/docs/Disaggregated/notes/p7/device-window-2/dry-run/dry-p7w6/apk-on-device.sha256 b/docs/Disaggregated/notes/p7/device-window-2/dry-run/dry-p7w6/apk-on-device.sha256 new file mode 100644 index 00000000..cd82c703 --- /dev/null +++ b/docs/Disaggregated/notes/p7/device-window-2/dry-run/dry-p7w6/apk-on-device.sha256 @@ -0,0 +1 @@ +device base.apk: /data/app/~~4br5M_QTsaPrvHx-69f_Xg==/top.mobilegl.plugin.p7w1.trace-NDMXLIpuwnAYYsgnuI7hRA==/base.apk 45759c3038854c5cff558a352b27f86553ebcddad2ee218fe796d74208406cf8 diff --git a/docs/Disaggregated/notes/p7/device-window-2/dry-run/dry-p7w6/cts-IDENTITY.txt b/docs/Disaggregated/notes/p7/device-window-2/dry-run/dry-p7w6/cts-IDENTITY.txt new file mode 100644 index 00000000..2ebec736 --- /dev/null +++ b/docs/Disaggregated/notes/p7/device-window-2/dry-run/dry-p7w6/cts-IDENTITY.txt @@ -0,0 +1,8 @@ +apk : /home/swung/w7/logs/p7w6/trace-p7w6.apk +apk sha256 : 45759c3038854c5cff558a352b27f86553ebcddad2ee218fe796d74208406cf8 +lib sha256 : 12861aa16bfce3001ead2f958bb128825336b5fba712b6dd3ae2331b03b4294c +lib stamp hits : 0 (dry-p7w6) +device before : 7f58aa0b140dd6501586f89bf2a352d81ac77bb3148f2bb3059e097b202b4994 +glcts sha256 : e980ea0abc6a729d413454b4c84ec87d90d0488a7b1d9e3e78671464adc7b809 +env : MOBILEGL_BACKEND_TYPE=DirectVulkan MOBILEGL_CTS_FBO_COLOR_TEXTURE=1 MOBILEGL_TRANSPORT=inproc MOBILEGL_IPC_ROLE_SPLIT_STATE=1 MOBILEGL_IPC_STRICT_ERRORS=1 MOBILEGL_IPC_RUN_AHEAD=1 +device after : 12861aa16bfce3001ead2f958bb128825336b5fba712b6dd3ae2331b03b4294c diff --git a/docs/Disaggregated/notes/p7/device-window-2/dry-run/dry-p7w6/cts-arm-proof.txt b/docs/Disaggregated/notes/p7/device-window-2/dry-run/dry-p7w6/cts-arm-proof.txt new file mode 100644 index 00000000..09ea5bb6 --- /dev/null +++ b/docs/Disaggregated/notes/p7/device-window-2/dry-run/dry-p7w6/cts-arm-proof.txt @@ -0,0 +1,2 @@ +mgprobe: transport-marker=1 ipc-lines=[Config: IPC ring=8MiB stage=32MiB wire-deferred=64MiB spin=50us persistent-block=64KiB adopt-tier=2 verb-barrier=1 run-ahead=1 present-credit=1 strict=1 audit=0 role-split-state=1 affinity='auto'] fatal=0 -> PROVEN +glcts KHR-GL46.direct_state_access.buffers_clear: transport-marker=1 ipc-lines=[Config: IPC ring=8MiB stage=32MiB wire-deferred=64MiB spin=50us persistent-block=64KiB adopt-tier=2 verb-barrier=1 run-ahead=1 present-credit=1 strict=1 audit=0 role-split-state=1 affinity='auto'] fatal=0 -> PROVEN diff --git a/docs/Disaggregated/notes/p7/device-window-2/dry-run/dry-p7w6/gate3-progress.tsv b/docs/Disaggregated/notes/p7/device-window-2/dry-run/dry-p7w6/gate3-progress.tsv new file mode 100644 index 00000000..99e18b1f --- /dev/null +++ b/docs/Disaggregated/notes/p7/device-window-2/dry-run/dry-p7w6/gate3-progress.tsv @@ -0,0 +1,8 @@ +monolith OpenRA 0 6 2026-09-23T09:39:50-04:00 +monolith minecraft-1.21.4-fabric-iris-bsl-in-world 0 8 2026-09-23T09:39:58-04:00 +inproc OpenRA 0 7 2026-09-23T09:40:06-04:00 +inproc minecraft-1.21.4-fabric-iris-bsl-in-world 0 8 2026-09-23T09:40:14-04:00 +spawn OpenRA 0 7 2026-09-23T09:40:22-04:00 +spawn minecraft-1.21.4-fabric-iris-bsl-in-world 0 8 2026-09-23T09:40:30-04:00 +inproc-ra0 OpenRA 1 6 2026-09-23T09:40:37-04:00 +inproc-ra0 minecraft-1.21.4-fabric-iris-bsl-in-world 1 8 2026-09-23T09:40:46-04:00 diff --git a/docs/Disaggregated/notes/p7/device-window-2/dry-run/dry-p7w6/session-found.env b/docs/Disaggregated/notes/p7/device-window-2/dry-run/dry-p7w6/session-found.env new file mode 100644 index 00000000..c1e55193 --- /dev/null +++ b/docs/Disaggregated/notes/p7/device-window-2/dry-run/dry-p7w6/session-found.env @@ -0,0 +1,5 @@ +FOUND_SUPERVISOR=1 +FOUND_STAYON=15 +FOUND_PIN=UNPINNED +FOUND_AT=2026-09-23T09:39:38-04:00 +# FOUND_SUPERVISOR corrected 0->1 by hand: the first preflight read a live supervisor (am_kill of pid 17256 :mglsrv at 21:39:47 device time, AFTER this record) as absent through the pipefail + grep -q bug since fixed in lib.sh diff --git a/docs/Disaggregated/notes/p7/device-window-2/dry-run/dry-p7w6/session-restored.txt b/docs/Disaggregated/notes/p7/device-window-2/dry-run/dry-p7w6/session-restored.txt new file mode 100644 index 00000000..6694cec8 --- /dev/null +++ b/docs/Disaggregated/notes/p7/device-window-2/dry-run/dry-p7w6/session-restored.txt @@ -0,0 +1,5 @@ +focus : mCurrentFocus=Window{3128f99 u0 com.miui.home/com.miui.home.launcher.Launcher} +supervisor : listening (found: 1) +pin : UNPINNED (found: UNPINNED) +stayon : 15 (found: 15) +doze wl : user,top.mobilegl.plugin.p7w1.trace,10318 diff --git a/docs/Disaggregated/notes/p7/device-window-2/dry-run/dry-p7w6/timing.tsv b/docs/Disaggregated/notes/p7/device-window-2/dry-run/dry-p7w6/timing.tsv new file mode 100644 index 00000000..e2a36dee --- /dev/null +++ b/docs/Disaggregated/notes/p7/device-window-2/dry-run/dry-p7w6/timing.tsv @@ -0,0 +1,12 @@ +preflight 2026-09-23T09:39:38 2026-09-23T09:39:43 5 reboot=0 pin=1 +install 2026-09-23T09:39:43 2026-09-23T09:39:43 0 verify_only=1 +gate3-monolith 2026-09-23T09:39:44 2026-09-23T09:39:59 15 2 cases +gate3-inproc 2026-09-23T09:39:59 2026-09-23T09:40:15 16 2 cases +gate3-spawn 2026-09-23T09:40:15 2026-09-23T09:40:30 15 2 cases +gate3-inproc-ra0 2026-09-23T09:40:31 2026-09-23T09:40:46 15 2 cases +gate3 2026-09-23T09:39:43 2026-09-23T09:40:46 63 +bsl-inproc 2026-09-23T09:40:48 2026-09-23T09:41:01 13 +bsl 2026-09-23T09:40:47 2026-09-23T09:41:05 18 +cts-dsa 2026-09-23T09:41:08 2026-09-23T09:41:09 1 limit=20 +cts 2026-09-23T09:41:05 2026-09-23T09:41:10 5 blocks=[dsa] limit=20 +restore 2026-09-23T09:41:16 2026-09-23T09:41:23 7 diff --git a/docs/Disaggregated/notes/p7/device-window-2/dry-run/dry-p7w6/verdict.txt b/docs/Disaggregated/notes/p7/device-window-2/dry-run/dry-p7w6/verdict.txt new file mode 100644 index 00000000..a4ad1473 --- /dev/null +++ b/docs/Disaggregated/notes/p7/device-window-2/dry-run/dry-p7w6/verdict.txt @@ -0,0 +1,39 @@ +== GATE 3 (DirectVulkan x pbuffer; split repeat=1; tol |ssim-monolith| <= 0.0005) == +case verdict monolith inproc(min..max) #sha spawn(min..max) #sha ra0 i==s==m +OpenRA PASS 1.000000 1.000000..1.000000 #1 1.000000..1.000000 #1 1.000000 yes +minecraft-1.21.4-fabric-iris-bsl-in-world PASS 0.997010 0.997010..0.997010 #1 0.997010..0.997010 #1 0.997010 yes +-- RUN_AHEAD=0 control (recorded, not gating): 2 case(s); proofs: run-ahead=0 +-- excluded (red on monolith, CONTRACT-P7 7.1): minecraft-1.21.1-neoforge-create-indirect-in-world, minecraft-1.21.11-main-menu, minecraft-1.21.4-fabric-iris-photon-v1.3b-in-world +GATE3 PASS: 2/2 cases PASS (denominator is 2, not the gate's 36: a subset run is NOT a gate verdict) + +== BSL-ESC-MENU MOBILEGL_PIPE_STATS (maps lines / RSS peaks, wbuf[] gauges) == +[inproc] rc=0 seconds=13 finished=2026-09-23T09:41:05-04:00 + replay: passed=True ssim=0.999791667 sha=155dcdd13a24e0ee + pid comm samples maps_peak VmRSS_peak_kB VmHWM_kB span_s + 32599 ugin.p7w1.trace 38 8115 821992 823612 13.9 + 32416 ugin.p7w1.trace 6 5191 768728 804116 1.9 + 3 wbuf[wbufs=28 wlivepk=1052 wdefpk=3312832 wdefsync=24] + +== CTS AFTER (inproc x DirectVulkan) vs BASE (monolith x DirectVulkan, p7w1) == +rate = Pass/(results-NotSupported); gate: delta >= -0.5 pp and 0 new crash per block +block cases BASE P/NS/F/X rate AFTER P/NS/F/X rate delta pp crash regr fixed verdict +dsa 20 19/0/0/1 95.000% 19/0/0/1 95.000% +0.000 0 0 0 PASS (SUBSET) +CTS PASS (SUBSET run: not a gate verdict) + +== TIMING == + preflight 5s 2026-09-23T09:39:38 -> 2026-09-23T09:39:43 reboot=0 pin=1 + install 0s 2026-09-23T09:39:43 -> 2026-09-23T09:39:43 verify_only=1 + gate3-monolith 15s 2026-09-23T09:39:44 -> 2026-09-23T09:39:59 2 cases + gate3-inproc 16s 2026-09-23T09:39:59 -> 2026-09-23T09:40:15 2 cases + gate3-spawn 15s 2026-09-23T09:40:15 -> 2026-09-23T09:40:30 2 cases + gate3-inproc-ra0 15s 2026-09-23T09:40:31 -> 2026-09-23T09:40:46 2 cases + gate3 63s 2026-09-23T09:39:43 -> 2026-09-23T09:40:46 + bsl-inproc 13s 2026-09-23T09:40:48 -> 2026-09-23T09:41:01 + bsl 18s 2026-09-23T09:40:47 -> 2026-09-23T09:41:05 + cts-dsa 1s 2026-09-23T09:41:08 -> 2026-09-23T09:41:09 limit=20 + cts 5s 2026-09-23T09:41:05 -> 2026-09-23T09:41:10 blocks=[dsa] limit=20 + gate3 monolith 2 case invocations, mean 7s, total 14s + gate3 inproc 2 case invocations, mean 8s, total 15s + gate3 spawn 2 case invocations, mean 8s, total 15s + gate3 inproc-ra0 2 case invocations, mean 7s, total 14s +reduce rc=0 diff --git a/docs/Disaggregated/notes/p7/device-window-2/dry-run/pre-14e1c8b9-cts/IDENTITY.txt b/docs/Disaggregated/notes/p7/device-window-2/dry-run/pre-14e1c8b9-cts/IDENTITY.txt new file mode 100644 index 00000000..0f40a843 --- /dev/null +++ b/docs/Disaggregated/notes/p7/device-window-2/dry-run/pre-14e1c8b9-cts/IDENTITY.txt @@ -0,0 +1,8 @@ +apk : /home/swung/w7/logs/devprep/w2/p7w7dry-14e1c8b9/apk/trace-p7w7dry-14e1c8b9.apk +apk sha256 : f2ca6b02c790c1be51e432aa3671d577888bc46cca7554108914dab1e38b2f3a +lib sha256 : 7891670f7286d0a6522d52185a48b810004f3273e37e7c7bdf4d2d6f1bed3804 +lib stamp hits : 0 (pre-14e1c8b9) +device before : 7f58aa0b140dd6501586f89bf2a352d81ac77bb3148f2bb3059e097b202b4994 +glcts sha256 : e980ea0abc6a729d413454b4c84ec87d90d0488a7b1d9e3e78671464adc7b809 +env : MOBILEGL_BACKEND_TYPE=DirectVulkan MOBILEGL_CTS_FBO_COLOR_TEXTURE=1 MOBILEGL_TRANSPORT=inproc MOBILEGL_IPC_ROLE_SPLIT_STATE=1 MOBILEGL_IPC_STRICT_ERRORS=1 MOBILEGL_IPC_RUN_AHEAD=1 +device after : 7891670f7286d0a6522d52185a48b810004f3273e37e7c7bdf4d2d6f1bed3804 diff --git a/docs/Disaggregated/notes/p7/device-window-2/dry-run/pre-14e1c8b9-cts/arm-proof.txt b/docs/Disaggregated/notes/p7/device-window-2/dry-run/pre-14e1c8b9-cts/arm-proof.txt new file mode 100644 index 00000000..09ea5bb6 --- /dev/null +++ b/docs/Disaggregated/notes/p7/device-window-2/dry-run/pre-14e1c8b9-cts/arm-proof.txt @@ -0,0 +1,2 @@ +mgprobe: transport-marker=1 ipc-lines=[Config: IPC ring=8MiB stage=32MiB wire-deferred=64MiB spin=50us persistent-block=64KiB adopt-tier=2 verb-barrier=1 run-ahead=1 present-credit=1 strict=1 audit=0 role-split-state=1 affinity='auto'] fatal=0 -> PROVEN +glcts KHR-GL46.direct_state_access.buffers_clear: transport-marker=1 ipc-lines=[Config: IPC ring=8MiB stage=32MiB wire-deferred=64MiB spin=50us persistent-block=64KiB adopt-tier=2 verb-barrier=1 run-ahead=1 present-credit=1 strict=1 audit=0 role-split-state=1 affinity='auto'] fatal=0 -> PROVEN diff --git a/docs/Disaggregated/notes/p7/device-window-2/dry-run/pre-14e1c8b9-cts/attribution.txt b/docs/Disaggregated/notes/p7/device-window-2/dry-run/pre-14e1c8b9-cts/attribution.txt new file mode 100644 index 00000000..c525b600 --- /dev/null +++ b/docs/Disaggregated/notes/p7/device-window-2/dry-run/pre-14e1c8b9-cts/attribution.txt @@ -0,0 +1,16 @@ +direct_state_access.renderbuffers_storage monolith RC=0 StatusCode="Pass" +direct_state_access.renderbuffers_storage inproc-gate RC=134 Fatal{ReplyTooLarge, "ReadPixels 256x512 0x1908/0x1406 2097152 > 2097136"} +direct_state_access.renderbuffers_storage inproc-plain RC=134 Fatal{ReplyTooLarge, "ReadPixels 256x512 0x1908/0x1406 2097152 > 2097136"} +direct_state_access.renderbuffers_storage_multisample monolith RC=0 StatusCode="Pass" +direct_state_access.renderbuffers_storage_multisample inproc-gate RC=1 StatusCode="Fail" +direct_state_access.renderbuffers_storage_multisample inproc-plain RC=1 StatusCode="Fail" +shader_image_load_store.incomplete_textures monolith RC=1 StatusCode="Fail" +shader_image_load_store.incomplete_textures inproc-gate RC=134 Fatal{UnmigratedVerb, "Magma:image-view-window"} +shader_image_load_store.incomplete_textures inproc-plain RC=134 Fatal{UnmigratedVerb, "Magma:image-view-window"} +shader_image_load_store.advanced-sync-vertexArray monolith RC=1 StatusCode="Fail" +shader_image_load_store.advanced-sync-vertexArray inproc-gate RC=1 StatusCode="Fail" +shader_image_load_store.advanced-sync-vertexArray inproc-plain RC=1 StatusCode="Fail" +texture_border_clamp.Texture2DArrayCompressed monolith RC=0 StatusCode="Pass" +texture_border_clamp.Texture2DArrayCompressed inproc-gate RC=0 StatusCode="Pass" +texture_border_clamp.Texture2DArrayCompressed inproc-plain RC=0 StatusCode="Pass" +BASE lib restored (7f58aa0b140dd6501586f89bf2a352d81ac77bb3148f2bb3059e097b202b4994) diff --git a/docs/Disaggregated/notes/p7/device-window-2/dry-run/pre-14e1c8b9-cts/report-dsa.txt b/docs/Disaggregated/notes/p7/device-window-2/dry-run/pre-14e1c8b9-cts/report-dsa.txt new file mode 100644 index 00000000..14a9b0b5 --- /dev/null +++ b/docs/Disaggregated/notes/p7/device-window-2/dry-run/pre-14e1c8b9-cts/report-dsa.txt @@ -0,0 +1,17 @@ +=== glcts conformance summary [DirectVulkan-inproc-dsa] === +files parsed : 2 +cases with result : 371 + + Pass 366 98.65% + ! Fail 3 0.81% + CompatibilityWarning 1 0.27% + ! Crash 1 0.27% + +conformance pass rate (Pass+NotSupported+warnings) : 98.92% (367/371) +strict pass rate (Pass only) : 98.65% (366/371) +failures : 4 + +--- worst groups (of 1) --- + KHR-GL46.direct_state_access 4/371 fail ( 1.1%) + +wrote /home/swung/w7/logs/devprep/w2/pre-14e1c8b9/cts/report-dsa.json diff --git a/docs/Disaggregated/notes/p7/device-window-2/dry-run/pre-14e1c8b9-cts/report-packed-pixels.txt b/docs/Disaggregated/notes/p7/device-window-2/dry-run/pre-14e1c8b9-cts/report-packed-pixels.txt new file mode 100644 index 00000000..e620d264 --- /dev/null +++ b/docs/Disaggregated/notes/p7/device-window-2/dry-run/pre-14e1c8b9-cts/report-packed-pixels.txt @@ -0,0 +1,11 @@ +=== glcts conformance summary [DirectVulkan-inproc-packed-pixels] === +files parsed : 1 +cases with result : 4732 + + Pass 4732 100.00% + +conformance pass rate (Pass+NotSupported+warnings) : 100.00% (4732/4732) +strict pass rate (Pass only) : 100.00% (4732/4732) +failures : 0 + +wrote /home/swung/w7/logs/devprep/w2/pre-14e1c8b9/cts/report-packed-pixels.json diff --git a/docs/Disaggregated/notes/p7/device-window-2/dry-run/pre-14e1c8b9-cts/report-shader-image.txt b/docs/Disaggregated/notes/p7/device-window-2/dry-run/pre-14e1c8b9-cts/report-shader-image.txt new file mode 100644 index 00000000..610e5c5d --- /dev/null +++ b/docs/Disaggregated/notes/p7/device-window-2/dry-run/pre-14e1c8b9-cts/report-shader-image.txt @@ -0,0 +1,17 @@ +=== glcts conformance summary [DirectVulkan-inproc-shader-image] === +files parsed : 2 +cases with result : 125 + + Pass 65 52.00% + NotSupported 56 44.80% + ! Fail 3 2.40% + ! Crash 1 0.80% + +conformance pass rate (Pass+NotSupported+warnings) : 96.80% (121/125) +strict pass rate (Pass only) : 52.00% (65/125) +failures : 4 + +--- worst groups (of 2) --- + KHR-GL46.shader_image_load_store 4/51 fail ( 7.8%) + +wrote /home/swung/w7/logs/devprep/w2/pre-14e1c8b9/cts/report-shader-image.json diff --git a/docs/Disaggregated/notes/p7/device-window-2/dry-run/pre-14e1c8b9-cts/report-ssbo.txt b/docs/Disaggregated/notes/p7/device-window-2/dry-run/pre-14e1c8b9-cts/report-ssbo.txt new file mode 100644 index 00000000..f114114b --- /dev/null +++ b/docs/Disaggregated/notes/p7/device-window-2/dry-run/pre-14e1c8b9-cts/report-ssbo.txt @@ -0,0 +1,11 @@ +=== glcts conformance summary [DirectVulkan-inproc-ssbo] === +files parsed : 1 +cases with result : 124 + + Pass 124 100.00% + +conformance pass rate (Pass+NotSupported+warnings) : 100.00% (124/124) +strict pass rate (Pass only) : 100.00% (124/124) +failures : 0 + +wrote /home/swung/w7/logs/devprep/w2/pre-14e1c8b9/cts/report-ssbo.json diff --git a/docs/Disaggregated/notes/p7/device-window-2/dry-run/pre-14e1c8b9-cts/report-texture.txt b/docs/Disaggregated/notes/p7/device-window-2/dry-run/pre-14e1c8b9-cts/report-texture.txt new file mode 100644 index 00000000..371271a9 --- /dev/null +++ b/docs/Disaggregated/notes/p7/device-window-2/dry-run/pre-14e1c8b9-cts/report-texture.txt @@ -0,0 +1,23 @@ +=== glcts conformance summary [DirectVulkan-inproc-texture] === +files parsed : 1 +cases with result : 1054 + + Pass 823 78.08% + NotSupported 221 20.97% + ! Fail 10 0.95% + +conformance pass rate (Pass+NotSupported+warnings) : 99.05% (1044/1054) +strict pass rate (Pass only) : 78.08% (823/1054) +failures : 10 + +--- NOT MEASURED (excluded from the rates above) --- + quarantined up front : 1 + The rates above cover only cases that produced a result. + +--- worst groups (of 19) --- + KHR-GL46.texture_cube_map_array 5/27 fail ( 18.5%) + KHR-GL46.texture_border_clamp 3/32 fail ( 9.4%) + KHR-GL46.texture_buffer 1/16 fail ( 6.2%) + KHR-GL46.texture_view 1/7 fail ( 14.3%) + +wrote /home/swung/w7/logs/devprep/w2/pre-14e1c8b9/cts/report-texture.json diff --git a/docs/Disaggregated/notes/p7/device-window-2/dry-run/pre-14e1c8b9-cts/runs-dsa-crashed.txt b/docs/Disaggregated/notes/p7/device-window-2/dry-run/pre-14e1c8b9-cts/runs-dsa-crashed.txt new file mode 100644 index 00000000..2fd5bb5c --- /dev/null +++ b/docs/Disaggregated/notes/p7/device-window-2/dry-run/pre-14e1c8b9-cts/runs-dsa-crashed.txt @@ -0,0 +1 @@ +KHR-GL46.direct_state_access.renderbuffers_storage diff --git a/docs/Disaggregated/notes/p7/device-window-2/dry-run/pre-14e1c8b9-cts/runs-shader-image-crashed.txt b/docs/Disaggregated/notes/p7/device-window-2/dry-run/pre-14e1c8b9-cts/runs-shader-image-crashed.txt new file mode 100644 index 00000000..0e1edc02 --- /dev/null +++ b/docs/Disaggregated/notes/p7/device-window-2/dry-run/pre-14e1c8b9-cts/runs-shader-image-crashed.txt @@ -0,0 +1 @@ +KHR-GL46.shader_image_load_store.incomplete_textures diff --git a/docs/Disaggregated/notes/p7/device-window-2/dry-run/pre-14e1c8b9-cts/verdict.txt b/docs/Disaggregated/notes/p7/device-window-2/dry-run/pre-14e1c8b9-cts/verdict.txt new file mode 100644 index 00000000..bb1344a1 --- /dev/null +++ b/docs/Disaggregated/notes/p7/device-window-2/dry-run/pre-14e1c8b9-cts/verdict.txt @@ -0,0 +1,42 @@ +== CTS AFTER (inproc x DirectVulkan) vs BASE (monolith x DirectVulkan, p7w1) == +rate = Pass/(results-NotSupported); gate: delta >= -0.5 pp and 0 new crash per block +block cases BASE P/NS/F/X rate AFTER P/NS/F/X rate delta pp crash regr fixed verdict +dsa 371 368/0/2/1 99.191% 366/0/3/2 98.652% -0.539 1 2 0 FAIL + ! 1 NEW crash(es) + ! delta -0.539 pp < -0.5 pp + NEW CRASH KHR-GL46.direct_state_access.renderbuffers_storage + Pass->not KHR-GL46.direct_state_access.renderbuffers_storage + Pass->not KHR-GL46.direct_state_access.renderbuffers_storage_multisample +packed-pixels 4732 4732/0/0/0 100.000% 4732/0/0/0 100.000% +0.000 0 0 0 PASS +shader-image 125 63/56/6/0 91.304% 65/56/3/1 94.203% +2.899 1 1 3 FAIL + ! 1 NEW crash(es) + ! note: AFTER is 2.899 pp ABOVE BASE (not a regression; review the fixed list) + NEW CRASH KHR-GL46.shader_image_load_store.incomplete_textures + Pass->not KHR-GL46.shader_image_load_store.advanced-sync-vertexArray + not->Pass KHR-GL46.shader_image_load_store.advanced-sync-drawIndirect + not->Pass KHR-GL46.shader_image_load_store.advanced-sync-textureUpdate + not->Pass KHR-GL46.shader_image_load_store.non-layered_binding +ssbo 124 124/0/0/0 100.000% 124/0/0/0 100.000% +0.000 0 0 0 PASS +texture 1054 815/221/18/0 97.839% 823/221/10/0 98.800% +0.960 0 1 9 PASS + ! note: AFTER is 0.960 pp ABOVE BASE (not a regression; review the fixed list) + Pass->not KHR-GL46.texture_border_clamp.Texture2DArrayCompressed + not->Pass KHR-GL46.texture_barrier.disjoint-texels + not->Pass KHR-GL46.texture_barrier.overlapping-texels + not->Pass KHR-GL46.texture_barrier.same-texel-rw + not->Pass KHR-GL46.texture_barrier.same-texel-rw-multipass + not->Pass KHR-GL46.texture_size_promotion.functional + not->Pass KHR-GL46.texture_swizzle.functional_format_idx_19_target_idx_7 + not->Pass KHR-GL46.texture_swizzle.functional_format_idx_19_target_idx_8 + not->Pass KHR-GL46.texture_swizzle.functional_format_idx_8_target_idx_7 + not->Pass KHR-GL46.texture_swizzle.functional_format_idx_8_target_idx_8 +CTS FAIL + +== TIMING == + preflight 5s 2026-09-23T09:59:01 -> 2026-09-23T09:59:06 reboot=0 pin=1 + cts-shader-image 9s 2026-09-23T09:59:10 -> 2026-09-23T09:59:19 limit=0 + cts-ssbo 3s 2026-09-23T09:59:20 -> 2026-09-23T09:59:23 limit=0 + cts-dsa 9s 2026-09-23T09:59:24 -> 2026-09-23T09:59:33 limit=0 + cts-texture 108s 2026-09-23T09:59:34 -> 2026-09-23T10:01:22 limit=0 + cts-packed-pixels 220s 2026-09-23T10:01:23 -> 2026-09-23T10:05:03 limit=0 + cts 358s 2026-09-23T09:59:06 -> 2026-09-23T10:05:04 blocks=[shader-image ssbo dsa texture packed-pixels] limit=0 +reduce rc=1 diff --git a/docs/Disaggregated/notes/p7/device-window-2/tools/10-build.sh b/docs/Disaggregated/notes/p7/device-window-2/tools/10-build.sh new file mode 100755 index 00000000..0fcea566 --- /dev/null +++ b/docs/Disaggregated/notes/p7/device-window-2/tools/10-build.sh @@ -0,0 +1,127 @@ +#!/usr/bin/env bash +# 10-build.sh [] [--apk-only|--host-only] +# +# Builds the window's two artefacts from ONE source commit and ONE explicit stamp: +# /apk/trace-.apk signed, debuggable, side-by-side id top.mobilegl.plugin.p7w1.trace +# /host/{libMobileGL.so,libMobileGLServer.so,mobilegl_trace_replay} + catalog.json +# ( = ~/w7/logs/p7w7/; stamp defaults to p7w7-). The same stamp on both ends is +# what MOBILEGL_IPC_REQUIRE_SAME_BUILD=1 checks, and the device server must be THIS build (F changed +# the wire fingerprint: an old server + new client only says `no Welcome (rc=6)`). +# +# It never builds in ~/w7/pipe (read-only for agents, and a gate needs its status clean): the source +# is a DETACHED worktree ~/w7/p7w7-tree- at , submodules copied from the pipe +# checkout when their recorded commit matches, the glslang External tree copied, LFS fixtures +# smudged by the worktree checkout. That tree is also the tools tree the device steps run from. +# Recipe = ~/w7/logs/p7w6-apk-inner.sh + ~/w7/logs/p7w6host-build.sh, parameterised. +set -euo pipefail +. "$(dirname "$0")/lib.sh" + +[ $# -ge 1 ] || die "usage: $0 [] [--apk-only|--host-only]" +SHA=$(git -C "$W2_PIPE" rev-parse --verify "$1^{commit}") || die "unknown commit $1 in $W2_PIPE" +SHA8=${SHA:0:8} +STAMP=${2:-p7w7-$SHA8} +case "${2:-}" in --*) STAMP=p7w7-$SHA8;; esac +MODE=all +for a in "$@"; do case "$a" in --apk-only) MODE=apk;; --host-only) MODE=host;; esac; done +TREE=${W2_BUILD_TREE:-$HOME/w7/p7w7-tree-$SHA8} +OUT=$(w2_out "$STAMP") +mkdir -p "$OUT/apk" "$OUT/host" +t0=$(date +%s) +log "build sha=$SHA stamp=$STAMP tree=$TREE out=$OUT mode=$MODE" + +# ---- source tree --------------------------------------------------------------------------- +if [ ! -e "$TREE/.git" ]; then + log "creating detached worktree $TREE @ $SHA8" + git -C "$W2_PIPE" worktree add --detach "$TREE" "$SHA" > "$OUT/worktree.log" 2>&1 +fi +[ "$(git -C "$TREE" rev-parse HEAD)" = "$SHA" ] || die "$TREE is not at $SHA (refusing to move a tree someone may be using)" +# Submodules: copy the pipe checkout's copy when it is at the recorded commit (fast, offline); +# otherwise fall back to a real submodule update for that path. +git -C "$TREE" submodule status | while read -r st path _; do + want=${st#[-+U ]} + [ -z "$(ls -A "$TREE/$path" 2>/dev/null)" ] || continue + have=$(git -C "$W2_PIPE/$path" rev-parse HEAD 2>/dev/null || true) + if [ "$have" = "$want" ]; then + rm -rf "$TREE/$path" + cp -a "$W2_PIPE/$path" "$TREE/$path" + rm -f "$TREE/$path/.git" # the gitlink points into pipe's module store: never share it + log "submodule $path: copied from pipe ($want)" + else + log "submodule $path: pipe has ${have:-nothing}, want $want - git submodule update" + git -C "$TREE" submodule update --init --recursive -- "$path" + fi +done +[ -d "$TREE/3rdparty/glslang/External/spirv-tools" ] \ + || cp -a "$W2_PIPE/3rdparty/glslang/External" "$TREE/3rdparty/glslang/" +if head -c 40 "$TREE/tools/trace_replay/fixtures/openra.tgz" | grep -q 'git-lfs'; then + log "fixtures are LFS pointers - git lfs pull" + git -C "$TREE" lfs pull +fi + +# ---- APK ----------------------------------------------------------------------------------- +if [ "$MODE" != host ]; then + ta=$(date +%s) + export JAVA_HOME=/usr/lib/jvm/java-21-openjdk ANDROID_HOME=$HOME/android-sdk ANDROID_SDK_ROOT=$HOME/android-sdk + export PATH=$JAVA_HOME/bin:$PATH + BT=$(ls -d "$HOME"/android-sdk/build-tools/* | sort -V | tail -1) + SUFFIX=${STAMP%%-*} + export MOBILEGL_BUILD_STAMP=$STAMP + ( cd "$TREE" + rm -rf android-plugin/app/.cxx .cxx build/intermediates/cxx android-plugin/app/build/outputs/apk/trace + "$HOME/gradle-8.10.2/bin/gradle" --no-daemon -p android-plugin :app:assembleTraceRelease \ + -Pmobilegl.apkSuffix="$SUFFIX" -Pmobilegl.applicationIdSuffix=.p7w1 -Pmobilegl.debuggableRelease=true \ + -Pmobilegl.logLevel=MOBILEGL_LOG_LEVEL_INFO -Pmobilegl.pipePush=ON \ + -Pmobilegl.buildDisaggregated=ON -Pmobilegl.buildDisaggregatedInproc=ON \ + --parallel --max-workers 8 ) > "$OUT/apk/gradle.log" 2>&1 || { tail -40 "$OUT/apk/gradle.log"; die "gradle failed"; } + unsigned="$TREE/android-plugin/app/build/outputs/apk/trace/release/MobileGL-plugin-trace-release-$SUFFIX.apk" + [ -f "$unsigned" ] || die "gradle produced no $unsigned" + APK="$OUT/apk/trace-$STAMP.apk" + "$BT/apksigner" sign --ks "$HOME/.android/debug.keystore" --ks-pass pass:android --key-pass pass:android \ + --ks-key-alias androiddebugkey --out "$APK" "$unsigned" + rm -rf "$TREE/android-plugin/app/.cxx" + ( cd "$OUT/apk" && sha256sum "trace-$STAMP.apk" > apk.sha256 ) + rm -rf "$OUT/apk/lib" && mkdir -p "$OUT/apk/lib" + unzip -o -q -j "$APK" lib/arm64-v8a/libMobileGL.so lib/arm64-v8a/libMobileGLServer.so -d "$OUT/apk/lib" + n=$(strings "$OUT/apk/lib/libMobileGL.so" | grep -c -F "$STAMP" || true) + [ "$n" -ge 1 ] || die "stamp $STAMP not found in the APK's libMobileGL.so" + ( cd "$OUT/apk/lib" && sha256sum libMobileGL.so libMobileGLServer.so > ../lib.sha256 ) + unzip -l "$APK" | grep -E 'libMobileGL(Server)?\.so' > "$OUT/apk/lib-listing.txt" + log "APK $(stat -c %s "$APK") bytes sha256 $(cut -c1-16 "$OUT/apk/apk.sha256"), stamp strings in lib: $n" + w2_timing "$OUT" build-apk "$ta" "$(date +%s)" +fi + +# ---- host artefacts (the TCP client side; same stamp) --------------------------------------- +if [ "$MODE" != apk ]; then + th=$(date +%s) + cmake -S "$TREE" -B "$TREE/build-host" -G Ninja \ + -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ \ + -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ + -DMOBILEGL_BUILD_DISAGGREGATED=ON -DMOBILEGL_BUILD_DISAGGREGATED_INPROC=ON \ + -DMOBILEGL_PIPE_PUSH=ON -DMOBILEGL_BUILD_TRACE_REPLAY=ON \ + -DMOBILEGL_BUILD_INTEGRATION_TEST=ON -DMOBILEGL_BUILD_TEST=ON \ + -DMOBILEGL_BUILD_STAMP="$STAMP" -DMOBILEGL_LOG_ACTIVE_LEVEL=MOBILEGL_LOG_LEVEL_INFO \ + -DMOBILEGL_ITEST_EGL_VENDOR=/usr/share/glvnd/egl_vendor.d/50_mesa.json \ + -DMOBILEGL_ITEST_VK_ICD=/usr/share/vulkan/icd.d/lvp_icd.json \ + -DMOBILEGL_ITEST_TCP_ENDPOINT=tcp://127.0.0.1:41317 \ + > "$OUT/host/configure.log" 2>&1 || { tail -30 "$OUT/host/configure.log"; die "host configure failed"; } + cmake --build "$TREE/build-host" -j 8 --target MobileGL MobileGLServer mobilegl_trace_replay \ + > "$OUT/host/build.log" 2>&1 || { tail -30 "$OUT/host/build.log"; die "host build failed"; } + cp "$TREE/build-host/libMobileGL.so" "$TREE/build-host/libMobileGLServer.so" \ + "$TREE/build-host/tools/trace_replay/mobilegl_trace_replay" "$OUT/host/" + n=$(strings "$OUT/host/libMobileGL.so" | grep -c -F "$STAMP" || true) + [ "$n" -ge 1 ] || die "stamp $STAMP not found in the host libMobileGL.so" + ( cd "$OUT/host" && sha256sum libMobileGL.so libMobileGLServer.so mobilegl_trace_replay > ../host.sha256 ) + ( cd "$TREE/build-host" && ctest --show-only=json-v1 > "$OUT/host/catalog.json" ) + log "host artefacts in $OUT/host (stamp strings: $n)" + w2_timing "$OUT" build-host "$th" "$(date +%s)" +fi + +cat > "$OUT/build.env" < [--verify-only] +# +# Installs /apk/trace-.apk over the side-by-side package (adb install -r keeps the +# package's data and never uninstalls anything), waits for dex2oat, and PROVES the identity: the +# on-device base.apk sha256 must equal the signed file's. That on-device hash - not run.json, not +# the newest Gradle output (W6-verify README's wrong-SHA note) - is what names the binary behind +# every picture of the window. --verify-only skips the install (the dry run proves p7w6 this way). +# The TCP supervisor dies with the package on install; 90-restore.sh restarts it if it was up. +set -euo pipefail +. "$(dirname "$0")/lib.sh" + +[ $# -ge 1 ] || die "usage: $0 [--verify-only]" +STAMP=$1; VERIFY_ONLY=0; [ "${2:-}" = --verify-only ] && VERIFY_ONLY=1 +w2_load_build "$STAMP" +OUT=$(w2_out "$STAMP")/session +mkdir -p "$OUT" +w2_require_device +w2_lock +t0=$(date +%s) +WANT=$(sha256sum "$W2_APK" | cut -d' ' -f1) +echo "$WANT $W2_APK" > "$OUT/apk.sha256" +if [ $VERIFY_ONLY -eq 0 ]; then + Ash "pm list packages | grep -i mobilegl" > "$OUT/packages-before.txt" || true + log "installing $W2_APK ($WANT)" + A install -r "$W2_APK" 2>&1 | tr -d '\r' | tee "$OUT/install.txt" + grep -q Success "$OUT/install.txt" || die "install failed" +fi +Ash "dumpsys package $W2_PKG" | grep -E 'versionName|versionCode|lastUpdateTime|codePath|primaryCpuAbi' > "$OUT/apk-install.txt" +cat "$OUT/apk-install.txt" +BASE=$(Ash "pm path $W2_PKG" | sed -n 's/^package://p' | grep 'base.apk' | head -1) +GOT=$(Ash "sha256sum $BASE" | cut -d' ' -f1) +echo "device base.apk: $BASE $GOT" | tee "$OUT/apk-on-device.sha256" +[ "$GOT" = "$WANT" ] || die "installed APK ($GOT) is not $W2_APK ($WANT)" +if [ -n "${BUILD_SHA:-}" ]; then + grep -q "versionName=.*${BUILD_SHA:0:7}" "$OUT/apk-install.txt" || die "versionName does not carry ${BUILD_SHA:0:7}" +fi +# An am_kill "due to installPackageLI" inside an arm measures the installer (runbook 1 section 3). +Ash 'n=0; while pgrep dex2oat >/dev/null && [ $n -lt 150 ]; do sleep 2; n=$((n+1)); done; echo "dex2oat idle after $((n*2))s"' | tee "$OUT/dex2oat.txt" +w2_timing "$(w2_out "$STAMP")" install "$t0" "$(date +%s)" "verify_only=$VERIFY_ONLY" +log "=== INSTALL OK $STAMP (on-device sha256 $GOT) ===" diff --git a/docs/Disaggregated/notes/p7/device-window-2/tools/21-preflight.sh b/docs/Disaggregated/notes/p7/device-window-2/tools/21-preflight.sh new file mode 100755 index 00000000..abc1dea2 --- /dev/null +++ b/docs/Disaggregated/notes/p7/device-window-2/tools/21-preflight.sh @@ -0,0 +1,96 @@ +#!/usr/bin/env bash +# 21-preflight.sh [--reboot] [--no-pin] +# +# Session start (runbook 1 section 2, CONTRACT-P7 7.2 "same reboot-clean session"): +# --reboot records boot_id, reboots, waits for boot_completed, records boot_id again; the two +# must differ or the window is NOT reboot-clean. Gate 3 requires it; the dry run +# does not reboot. +# records the state 90-restore.sh puts back: TCP supervisor up or not, stay-on setting, pin +# state, Doze whitelist line, focused activity; +# wakes the phone and sets `svc power stayon true` (息屏 cut child TCP in window 1b, ID-P7-48); +# pins (pin_device.sh pin) unless --no-pin, then classifies `check` (PINNED-1100 = the board's +# documented 1100 MHz pwrlevel-0 reading, accepted); +# checks the CTS bundle is on the device and there is room to work. +set -uo pipefail +. "$(dirname "$0")/lib.sh" + +[ $# -ge 1 ] || die "usage: $0 [--reboot] [--no-pin]" +STAMP=$1; shift +REBOOT=0; PIN=1 +for a in "$@"; do case "$a" in --reboot) REBOOT=1;; --no-pin) PIN=0;; *) die "unknown option $a";; esac; done +w2_load_build "$STAMP" +OUT=$(w2_out "$STAMP")/session +mkdir -p "$OUT" +w2_require_device +w2_lock +t0=$(date +%s) + +# ---- what we found (only the FIRST preflight of a stamp writes these: restore reads them) --- +if [ ! -f "$OUT/found.env" ]; then + sup=0; w2_supervisor_running && sup=1 + stayon=$(Ash "settings get global stay_on_while_plugged_in") + pinstate=$(w2_pin_check "$W2_TOOLS" "$OUT/pin-found.txt") + cat > "$OUT/found.env" < "$OUT/deviceidle-found.txt" || true + Ash "dumpsys window" | grep -E 'mCurrentFocus' > "$OUT/focus-found.txt" || true + Ash "ps -A -o PID,PPID,USER,NAME,ARGS" | grep -iE 'mobilegl|mglsrv' > "$OUT/processes-found.txt" || true + log "found: supervisor=$sup stayon=$stayon pin=$pinstate" +fi + +if [ $REBOOT -eq 1 ]; then + Ash "cat /proc/sys/kernel/random/boot_id" > "$OUT/boot-id-before.txt" + log "rebooting for a reboot-clean session" + A reboot + sleep 20 + A wait-for-device + for _ in $(seq 1 120); do [ "$(Ash 'getprop sys.boot_completed')" = 1 ] && break; sleep 2; done + sleep 20 + # File-based encryption: the app's data dir (where trace-replay-ci.sh copies each fixture with + # run-as) is readable only after the first unlock. A phone with a lock-screen credential needs + # one manual unlock here; wait up to 10 minutes for it rather than failing every case. + w2_wake + for i in $(seq 1 120); do + [ "$(Ash 'getprop sys.user.0.ce_available')" = true ] && break + [ $i = 1 ] && log "waiting for credential-encrypted storage: UNLOCK THE PHONE BY HAND if it shows a lock screen" + sleep 5 + done + [ "$(Ash 'getprop sys.user.0.ce_available')" = true ] || die "user 0 storage still locked after 10 min" +fi +Ash "cat /proc/sys/kernel/random/boot_id" > "$OUT/boot-id.txt" +if [ $REBOOT -eq 1 ]; then + if cmp -s "$OUT/boot-id-before.txt" "$OUT/boot-id.txt"; then die "boot_id unchanged: the reboot did not happen"; fi + echo "reboot-clean: $(cat "$OUT/boot-id-before.txt") -> $(cat "$OUT/boot-id.txt")" | tee "$OUT/reboot-clean.txt" +else + echo "NOT reboot-clean (no --reboot): boot_id $(cat "$OUT/boot-id.txt"), up $(Ash 'cat /proc/uptime' | cut -d' ' -f1)s" | tee "$OUT/reboot-clean.txt" +fi + +w2_wake +Ash "svc power stayon true" +Ash "dumpsys power" | grep -E 'mWakefulness=|mStayOn=' > "$OUT/power.txt" +Ash "dumpsys deviceidle get deep" > "$OUT/deviceidle-deep.txt" 2>&1 || true +{ + echo "model : $(Ash 'getprop ro.product.model') / $(Ash 'getprop ro.board.platform')" + echo "build : $(Ash 'getprop ro.build.fingerprint')" + echo "battery : $(Ash 'dumpsys battery' | grep -E 'level|temperature|AC powered|USB powered' | tr -s ' ' | tr '\n' ' ')" + echo "memory : $(Ash 'grep -E "MemTotal|MemAvailable" /proc/meminfo' | tr -s ' ' | tr '\n' ' ')" + echo "tmp free : $(Ash 'df -h /data/local/tmp' | tail -1)" + echo "mgcts : $(Ash "ls $W2_CTS_DEV 2>&1" | tr '\n' ' ')" + echo "apk : $(grep versionName "$(w2_out "$STAMP")/session/apk-install.txt" 2>/dev/null | tr -d ' ')" +} | tee "$OUT/device.txt" + +if [ $PIN -eq 1 ]; then + bash "$W2_TOOLS/tools/device_bench/pin_device.sh" "$W2_SERIAL" pin > "$OUT/pin-session-start.txt" 2>&1 + echo 1 > "$OUT/pinned-by-window" +fi +pin=$(w2_pin_check "$W2_TOOLS" "$OUT/pin-check-00.txt") +log "pin: $pin" +if [ $PIN -eq 1 ] && [ "$pin" != PINNED ] && [ "$pin" != PINNED-1100 ]; then + die "pin did not take ($pin, see $OUT/pin-check-00.txt)" +fi +w2_timing "$(w2_out "$STAMP")" preflight "$t0" "$(date +%s)" "reboot=$REBOOT pin=$PIN" +log "=== PREFLIGHT OK $STAMP ===" diff --git a/docs/Disaggregated/notes/p7/device-window-2/tools/30-gate3.sh b/docs/Disaggregated/notes/p7/device-window-2/tools/30-gate3.sh new file mode 100755 index 00000000..cf595885 --- /dev/null +++ b/docs/Disaggregated/notes/p7/device-window-2/tools/30-gate3.sh @@ -0,0 +1,124 @@ +#!/usr/bin/env bash +# 30-gate3.sh [--cases a,b,...] [--repeat N] [--arms monolith,inproc,spawn,inproc-ra0] +# +# CONTRACT-P7 7.1/7.2 exit gate 3, one reboot-clean session, DirectVulkan x --use-pbuffer: +# monolith x1 the same-session control every split reading is scored against +# inproc xN (N = --repeat, default 3) must be bit-identical across passes +# spawn xN same, server role in a second process +# inproc-ra0 x1 MOBILEGL_IPC_RUN_AHEAD=0 lockstep control, recorded only +# over the 36-case denominator = --matrix's DirectVulkan cases minus W2_EXCLUDED (the three that +# are red on monolith: create-indirect, 1.21.11 main menu, photon v1.3b). iterationrp carries the +# apk.yml:460-462 Magma knobs on every arm. Every repeat's result.json, actual PNG, both role logs, +# transport proof and logcat are archived under /gate3/archive//-DirectVulkan/. +# +# RESUMABLE: one runner invocation per (arm, case); a finished pair writes +# /gate3/state//.done and is skipped on the next start. An interrupted pair is +# re-run from scratch (its partial archive is removed first). Run it detached: +# bash detach.sh ~/w7/logs/p7w7//gate3.log 30-gate3.sh +set -uo pipefail +. "$(dirname "$0")/lib.sh" + +[ $# -ge 1 ] || die "usage: $0 [--cases a,b] [--repeat N] [--arms list]" +STAMP=$1; shift +CASES_ARG=""; REPEAT=3; ARMS="monolith inproc spawn inproc-ra0" +while [ $# -gt 0 ]; do + case "$1" in + --cases) CASES_ARG=$2; shift 2;; + --repeat) REPEAT=$2; shift 2;; + --arms) ARMS=${2//,/ }; shift 2;; + *) die "unknown option $1";; + esac +done +w2_load_build "$STAMP" +OUT=$(w2_out "$STAMP")/gate3 +mkdir -p "$OUT" +w2_require_device +w2_lock +export MOBILEGL_TRACE_PACKAGE=$W2_PKG MOBILEGL_TRACE_SKIP_INSTALL=1 MOBILEGL_TRACE_APK=$W2_APK +RUNNER="$W2_TOOLS/tools/trace_replay/run_android_retrace_local.py" + +# ---- the case list is frozen on first start so a resume cannot change the denominator ---------- +if [ ! -s "$OUT/cases.txt" ]; then + if [ -n "$CASES_ARG" ]; then + tr ',' '\n' <<<"$CASES_ARG" | sed '/^$/d' > "$OUT/cases.txt" + else + W2_EXCLUDED="$W2_EXCLUDED" python3 - "$W2_TOOLS/tools/trace_replay" > "$OUT/cases.txt" <<'PY' +import os, sys +sys.path.insert(0, sys.argv[1]) +from trace_cases import ci_backends, ci_trace_cases, load_trace_cases, split_trace_cases +excluded = set(os.environ["W2_EXCLUDED"].split()) +for case in split_trace_cases(ci_trace_cases(load_trace_cases())): + if "DirectVulkan" in ci_backends(case) and case["name"] not in excluded: + print(case["name"]) +PY + fi + printf '%s\n' $W2_EXCLUDED > "$OUT/excluded.txt" +fi +mapfile -t CASES < "$OUT/cases.txt" +[ ${#CASES[@]} -gt 0 ] || die "empty case list" +[ -f "$OUT/arms.txt" ] || printf 'arms=%s\nrepeat=%s\napk=%s\ntools=%s\n' "$ARMS" "$REPEAT" "$W2_APK" "$W2_TOOLS" > "$OUT/arms.txt" +log "gate3 stamp=$STAMP cases=${#CASES[@]} arms=[$ARMS] repeat=$REPEAT apk=$W2_APK tools=$W2_TOOLS" + +arm_args() { # -> runner arguments + case "$1" in + monolith) echo "--transport monolith --repeat 1";; + inproc) echo "--transport inproc --repeat $REPEAT";; + spawn) echo "--transport spawn --repeat $REPEAT";; + inproc-ra0) echo "--transport inproc --repeat 1 --env MOBILEGL_IPC_RUN_AHEAD=0";; + *) die "unknown arm $1";; + esac +} + +t_all=$(date +%s) +for arm in $ARMS; do + mkdir -p "$OUT/state/$arm" "$OUT/logs/$arm" "$OUT/archive/$arm" + pending=0 + for c in "${CASES[@]}"; do [ -f "$OUT/state/$arm/$c.done" ] || pending=$((pending + 1)); done + if [ $pending -eq 0 ]; then log "arm $arm: all ${#CASES[@]} done, skipping"; continue; fi + log "=== arm $arm start ($pending pending) ===" + pin=$(w2_pin_check "$W2_TOOLS" "$OUT/pin-before-$arm.txt"); log "pin before $arm: $pin" + t_arm=$(date +%s) + for c in "${CASES[@]}"; do + [ -f "$OUT/state/$arm/$c.done" ] && continue + rm -rf "$OUT/archive/$arm/$c-DirectVulkan" + if [ "$c" = "$W2_ITERATIONRP" ]; then + # apk.yml:460-462, verbatim; trace-replay-ci.sh reads them from the environment. + export MOBILEGL_MAGMA_FIX_ITERATIONRP_SUBGROUP_SCRATCH=1 MOBILEGL_MAGMA_DERIVE_NUM_SUBGROUPS=1 \ + MOBILEGL_MAGMA_ITERATIONRP_FIX_BARRIER=1 + else + unset MOBILEGL_MAGMA_FIX_ITERATIONRP_SUBGROUP_SCRATCH MOBILEGL_MAGMA_DERIVE_NUM_SUBGROUPS \ + MOBILEGL_MAGMA_ITERATIONRP_FIX_BARRIER + fi + attempt=1 + while :; do + w2_require_device + w2_wake + t0=$(date +%s) + # shellcheck disable=SC2046 + python3 "$RUNNER" --case "$c" --backend DirectVulkan --use-pbuffer $(arm_args "$arm") \ + --archive-dir "$OUT/archive/$arm" > "$OUT/logs/$arm/$c.attempt$attempt.log" 2>&1 + rc=$? + t1=$(date +%s) + # trace-replay-ci.sh's "infrastructure" verdict (adb/system_server gone, not the case): + # the CI lane retries once, so does this driver - and says so in the done marker. + if [ $attempt -eq 1 ] && grep -q 'requesting one infrastructure retry' "$OUT/logs/$arm/$c.attempt1.log"; then + log " $arm $c: infrastructure failure, one retry" + attempt=2; rm -rf "$OUT/archive/$arm/$c-DirectVulkan"; sleep 20; continue + fi + break + done + cp "$OUT/logs/$arm/$c.attempt$attempt.log" "$OUT/logs/$arm/$c.log" + # The runner rewrites /run.json per invocation; keep each case's copy beside it. + [ -f "$OUT/archive/$arm/run.json" ] && mv "$OUT/archive/$arm/run.json" "$OUT/archive/$arm/$c-DirectVulkan/run.json" 2>/dev/null + passes=$(grep -c '"passed": true' "$OUT/logs/$arm/$c.log" || true) + printf 'rc=%s seconds=%s attempts=%s passed_lines=%s finished=%s\n' "$rc" "$((t1 - t0))" "$attempt" "$passes" "$(date -Is)" \ + > "$OUT/state/$arm/$c.done" + printf '%s\t%s\t%s\t%s\t%s\n' "$arm" "$c" "$rc" "$((t1 - t0))" "$(date -Is)" >> "$OUT/progress.tsv" + log " $arm $c rc=$rc $((t1 - t0))s" + done + pin=$(w2_pin_check "$W2_TOOLS" "$OUT/pin-after-$arm.txt"); log "pin after $arm: $pin" + w2_timing "$(w2_out "$STAMP")" "gate3-$arm" "$t_arm" "$(date +%s)" "${#CASES[@]} cases" + log "=== arm $arm done in $(( $(date +%s) - t_arm ))s ===" +done +w2_timing "$(w2_out "$STAMP")" gate3 "$t_all" "$(date +%s)" +log "=== GATE3 DONE $STAMP ===" diff --git a/docs/Disaggregated/notes/p7/device-window-2/tools/40-bsl-stats.sh b/docs/Disaggregated/notes/p7/device-window-2/tools/40-bsl-stats.sh new file mode 100755 index 00000000..fc03eab2 --- /dev/null +++ b/docs/Disaggregated/notes/p7/device-window-2/tools/40-bsl-stats.sh @@ -0,0 +1,125 @@ +#!/usr/bin/env bash +# 40-bsl-stats.sh [--arms inproc,spawn] [--interval 0.25] +# +# The M2 device reading the W6 window did not take (W6-verify/README.md: "峰值与 wbuf[] 仍待开 +# stats 的专门一遍采集"): minecraft-1.21.4-fabric-iris-bsl-esc-menu-854, DirectVulkan x pbuffer, +# one replay per arm with MOBILEGL_PIPE_STATS=1 (PERIOD=1), while an on-device root sampler +# records every 0.25 s, for the replay's process(es): +# /proc//maps line count (the vm.max_map_count question CONTRACT-P7 12 left open) +# VmRSS / VmHWM +# inproc samples the app process (both roles live there); spawn samples the app (client) and the +# libMobileGLServer.so child it launched. The TCP supervisor's own libMobileGLServer.so (argv has +# tcp://...) is excluded by name. The wbuf[] gauges are read from the archived role logs. +# Output: /bsl//{samples.txt,peaks.txt,wbuf.txt} + the archived repeat. +set -uo pipefail +. "$(dirname "$0")/lib.sh" + +[ $# -ge 1 ] || die "usage: $0 [--arms inproc,spawn] [--interval S]" +STAMP=$1; shift +ARMS="inproc spawn"; INTERVAL=0.25 +while [ $# -gt 0 ]; do + case "$1" in + --arms) ARMS=${2//,/ }; shift 2;; + --interval) INTERVAL=$2; shift 2;; + *) die "unknown option $1";; + esac +done +w2_load_build "$STAMP" +OUT=$(w2_out "$STAMP")/bsl +mkdir -p "$OUT" +w2_require_device +w2_lock +[ "$(Ash "su -c 'id -u'")" = 0 ] || die "no root on $W2_SERIAL: /proc//maps of an app process needs it" +export MOBILEGL_TRACE_PACKAGE=$W2_PKG MOBILEGL_TRACE_SKIP_INSTALL=1 MOBILEGL_TRACE_APK=$W2_APK +unset MOBILEGL_MAGMA_FIX_ITERATIONRP_SUBGROUP_SCRATCH MOBILEGL_MAGMA_DERIVE_NUM_SUBGROUPS MOBILEGL_MAGMA_ITERATIONRP_FIX_BARRIER +RUNNER="$W2_TOOLS/tools/trace_replay/run_android_retrace_local.py" +DEV_SAMPLER=/data/local/tmp/p7w7-sampler.sh + +cat > "$OUT/sampler.sh" <<'SH' +#!/system/bin/sh +# p7w7 window-2 sampler: +out=$1; pkg=$2; stop=$3; interval=$4 +: > "$out" +while [ ! -f "$stop" ]; do + ts=$(date +%s.%N) + for p in $(pidof "$pkg") $(pgrep -f libMobileGLServer); do + [ -r /proc/$p/maps ] || continue + args=$(tr '\0' ' ' < /proc/$p/cmdline 2>/dev/null) + case "$args" in *tcp://*|*p7w7-sampler*) continue;; esac + n=$(wc -l < /proc/$p/maps) + st=$(grep -E '^(VmRSS|VmHWM):' /proc/$p/status | tr -s ' \t' ' ' | tr '\n' ' ') + echo "$ts pid=$p comm=$(cat /proc/$p/comm) maps=$n $st" + done >> "$out" + sleep "$interval" +done +SH +A push "$OUT/sampler.sh" "$DEV_SAMPLER" >/dev/null || die "push sampler failed" +Ash "chmod 755 $DEV_SAMPLER" + +t_all=$(date +%s) +for arm in $ARMS; do + [ -f "$OUT/$arm/.done" ] && { log "bsl $arm already done"; continue; } + rm -rf "$OUT/$arm"; mkdir -p "$OUT/$arm" + dev_out=/data/local/tmp/p7w7-samples-$arm.txt; dev_stop=/data/local/tmp/p7w7-sampler.stop + Ash "su -c 'rm -f $dev_stop $dev_out'" + # The previous replay's app process outlives its Activity; stop it BEFORE the sampler starts, + # or its 800 MB and its maps count land in this arm's peaks (seen in the dry run: a 2 s pid + # that was gate 3's last case, not this replay). + Ash "am force-stop $W2_PKG" + sleep 1 + w2_wake + # The sampler runs as root on the device, in the background of one adb shell. + adb -s "$W2_SERIAL" shell "su -c 'sh $DEV_SAMPLER $dev_out $W2_PKG $dev_stop $INTERVAL'" > "$OUT/$arm/sampler-adb.log" 2>&1 & + sampler=$! + sleep 1 + t0=$(date +%s) + python3 "$RUNNER" --case "$W2_BSL" --backend DirectVulkan --use-pbuffer --transport "$arm" --repeat 1 \ + --archive-dir "$OUT/$arm/archive" --env MOBILEGL_PIPE_STATS=1 --env MOBILEGL_PIPE_STATS_PERIOD=1 \ + > "$OUT/$arm/replay.log" 2>&1 + rc=$? + t1=$(date +%s) + sleep 2 + Ash "su -c 'touch $dev_stop'" + for _ in $(seq 1 20); do kill -0 $sampler 2>/dev/null || break; sleep 1; done + kill $sampler 2>/dev/null || true + A pull "$dev_out" "$OUT/$arm/samples.txt" >/dev/null 2>&1 || log " WARN: no samples pulled for $arm" + Ash "su -c 'rm -f $dev_stop $dev_out'" + # peaks per (pid, comm) + python3 - "$OUT/$arm/samples.txt" > "$OUT/$arm/peaks.txt" <<'PY' +import re, sys +peaks = {} +try: + lines = open(sys.argv[1], encoding="utf-8", errors="replace").read().splitlines() +except OSError: + lines = [] +for line in lines: + m = re.match(r"(\S+) pid=(\d+) comm=(\S+) maps=(\d+)(.*)", line) + if not m: + continue + key = (m.group(2), m.group(3)) + rss = re.search(r"VmRSS: (\d+) kB", m.group(5)); hwm = re.search(r"VmHWM: (\d+) kB", m.group(5)) + p = peaks.setdefault(key, {"samples": 0, "maps": 0, "rss": 0, "hwm": 0, "first": m.group(1), "last": m.group(1)}) + p["samples"] += 1; p["last"] = m.group(1) + p["maps"] = max(p["maps"], int(m.group(4))) + if rss: p["rss"] = max(p["rss"], int(rss.group(1))) + if hwm: p["hwm"] = max(p["hwm"], int(hwm.group(1))) +print("%-8s %-18s %-6s %7s %10s %12s %12s %8s" % ("pid", "comm", "role", "samples", "maps_peak", "VmRSS_peak_kB", "VmHWM_kB", "span_s")) +for (pid, comm), p in sorted(peaks.items(), key=lambda kv: -kv[1]["maps"]): + # comm is 15 chars: the app reads "ugin.p7w1.trace", the spawned server "libMobileGLServ". + role = "server" if comm.startswith("libMobileGL") else "app" + print("%-8s %-18s %-6s %7d %10d %12d %12d %8.1f" % (pid, comm, role, p["samples"], p["maps"], p["rss"], p["hwm"], + float(p["last"]) - float(p["first"]))) +if not peaks: + print("NO SAMPLES") +PY + grep -rh 'wbuf\[' "$OUT/$arm/archive" 2>/dev/null | sed 's/^.*MGPipe stats: //' > "$OUT/$arm/wbuf.txt" || true + grep -rhoE 'wbuf\[[^]]*\]' "$OUT/$arm/archive" 2>/dev/null | sort | uniq -c > "$OUT/$arm/wbuf-gauges.txt" || true + printf 'rc=%s seconds=%s finished=%s\n' "$rc" "$((t1 - t0))" "$(date -Is)" > "$OUT/$arm/.done" + log "bsl $arm rc=$rc $((t1 - t0))s" + sed 's/^/ /' "$OUT/$arm/peaks.txt" + sed 's/^/ /' "$OUT/$arm/wbuf-gauges.txt" + w2_timing "$(w2_out "$STAMP")" "bsl-$arm" "$t0" "$t1" +done +Ash "rm -f $DEV_SAMPLER" +w2_timing "$(w2_out "$STAMP")" bsl "$t_all" "$(date +%s)" +log "=== BSL STATS DONE $STAMP ===" diff --git a/docs/Disaggregated/notes/p7/device-window-2/tools/50-cts-after.sh b/docs/Disaggregated/notes/p7/device-window-2/tools/50-cts-after.sh new file mode 100755 index 00000000..dedc403b --- /dev/null +++ b/docs/Disaggregated/notes/p7/device-window-2/tools/50-cts-after.sh @@ -0,0 +1,146 @@ +#!/usr/bin/env bash +# 50-cts-after.sh [--blocks shader-image,ssbo,dsa,texture,packed-pixels] [--limit N] +# [--restore-base-lib] +# +# CONTRACT-P7 7.3 exit gate 5, AFTER reading: the five KHR-GL46 blocks, inproc x DirectVulkan, +# against device-window-1/CTS-base ($BASE = monolith x DirectVulkan, p7w1). Same glcts bundle, +# same caselists, same skip file and the same run_cts.py flags as $BASE (CTS-base/README.md, +# ~/w7/logs/cts-a64/base/run-base-inner.sh); the ONLY differences are the library and the arm: +# MOBILEGL_TRANSPORT=inproc + the split acceptance knobs the retrace split lane uses +# (MOBILEGL_IPC_ROLE_SPLIT_STATE=1 MOBILEGL_IPC_STRICT_ERRORS=1 MOBILEGL_IPC_RUN_AHEAD=1). +# The library is this build's APK arm64 libMobileGL.so, pushed to /data/local/tmp/mgcts exactly as +# ~/w7/logs/cts-a64/deploy/deploy.sh pushed the $BASE one, and verified by sha256 on the device. +# +# Arm proof before any block: mgprobe (the SKILL step-5 preflight) and one glcts case, each under +# the AFTER environment, must log ConfigLoader's "Config: MOBILEGL_TRANSPORT=inproc - the MGPipe +# record stream" and a "Config: IPC" line with strict=1 role-split-state=1 run-ahead=1. +# RESUMABLE per block (/cts/runs//.done). --limit N runs the first N cases of each +# block (the dry run). --restore-base-lib re-pushes the $BASE library afterwards (dry run only). +set -uo pipefail +. "$(dirname "$0")/lib.sh" + +[ $# -ge 1 ] || die "usage: $0 [--blocks list] [--limit N] [--restore-base-lib]" +STAMP=$1; shift +BLOCKS="shader-image ssbo dsa texture packed-pixels"; LIMIT=0; RESTORE_BASE=0 +while [ $# -gt 0 ]; do + case "$1" in + --blocks) BLOCKS=${2//,/ }; shift 2;; + --limit) LIMIT=$2; shift 2;; + --restore-base-lib) RESTORE_BASE=1; shift;; + *) die "unknown option $1";; + esac +done +w2_load_build "$STAMP" +OUT=$(w2_out "$STAMP")/cts +mkdir -p "$OUT/deploy" "$OUT/runs" "$OUT/caselists" +w2_require_device +w2_lock +CTS_ENV=(MOBILEGL_CTS_FBO_COLOR_TEXTURE=1 MOBILEGL_TRANSPORT=inproc $W2_SPLIT_KNOBS) +ENV_ARGS=(); for kv in "${CTS_ENV[@]}"; do ENV_ARGS+=(--env "$kv"); done +DEV_ENV="MOBILEGL_BACKEND_TYPE=DirectVulkan ${CTS_ENV[*]}" +t_all=$(date +%s) + +# ---- deploy --------------------------------------------------------------------------------- +for f in glcts mgprobe; do + [ "$(Ash "test -x $W2_CTS_DEV/$f && echo ok")" = ok ] || die "$W2_CTS_DEV/$f missing: deploy the bundle first ($W2_CTS_BUNDLE/deploy.sh $W2_SERIAL)" +done +[ "$(Ash "test -d $W2_CTS_DEV/gl_cts && echo ok")" = ok ] || die "$W2_CTS_DEV/gl_cts missing" +unzip -o -q -j "$W2_APK" lib/arm64-v8a/libMobileGL.so -d "$OUT/deploy" || die "no arm64 libMobileGL.so in $W2_APK" +WANT=$(sha256sum "$OUT/deploy/libMobileGL.so" | cut -d' ' -f1) +BEFORE=$(Ash "sha256sum $W2_CTS_DEV/libMobileGL.so" | cut -d' ' -f1) +{ + echo "apk : $W2_APK" + echo "apk sha256 : $(sha256sum "$W2_APK" | cut -d' ' -f1)" + echo "lib sha256 : $WANT" + echo "lib stamp hits : $(strings "$OUT/deploy/libMobileGL.so" | grep -c -F "${BUILD_STAMP:-$STAMP}" || true) (${BUILD_STAMP:-$STAMP})" + echo "device before : $BEFORE" + echo "glcts sha256 : $(Ash "sha256sum $W2_CTS_DEV/glcts" | cut -d' ' -f1)" + echo "env : $DEV_ENV" +} > "$OUT/deploy/IDENTITY.txt" +if [ "$BEFORE" != "$WANT" ]; then + A push "$OUT/deploy/libMobileGL.so" "$W2_CTS_DEV/libMobileGL.so" > "$OUT/deploy/push.log" 2>&1 || die "push failed" +fi +GOT=$(Ash "sha256sum $W2_CTS_DEV/libMobileGL.so" | cut -d' ' -f1) +echo "device after : $GOT" >> "$OUT/deploy/IDENTITY.txt" +[ "$GOT" = "$WANT" ] || die "the device does not carry the AFTER library ($GOT != $WANT)" +log "deployed AFTER lib $WANT to $W2_CTS_DEV" + +# ---- preflight + arm proof --------------------------------------------------------------------- +arm_proof() { #