[Chore] (MG_Backend/DirectGLES, MG_Backend/DirectVulkan, MG_Impl/EGLImpl, MG_Impl/Pipe, MG_IntegrationTest/Harness, MG_IntegrationTest/Scenarios, MG_Pipe, MG_Remote, MG_Remote/Client, MG_Remote/Server, MG_Remote/Transport, MG_Test/Backend, MG_Test/EGLState, MG_Test/Wire, scripts, scripts/ci, tools/cts, tools/device_bench, tools/spikes, tools/trace_replay, tools/wgl-smoke): add the license header where it is missing

This commit is contained in:
2026-10-15 10:15:34 -04:00
parent 35c7b589f4
commit c4fb9397cb
159 changed files with 1239 additions and 3 deletions
@@ -1,4 +1,12 @@
#!/usr/bin/env python3
# MobileGL - tools/trace_replay/benchmark_tcp_credits.py
# Copyright (c) 2025-2026 MobileGL-Dev
# Licensed under the GNU Lesser General Public License v3.0:
# https://www.gnu.org/licenses/gpl-3.0.txt
# https://www.gnu.org/licenses/lgpl-3.0.txt
# SPDX-License-Identifier: LGPL-3.0-only
# End of Source File Header
"""Record complete TCP benchmark runs for credit 1/2/3 with exact common tail frames."""
import argparse
import json
+8
View File
@@ -1,4 +1,12 @@
#!/usr/bin/env python3
# MobileGL - tools/trace_replay/compare_actuals.py
# Copyright (c) 2025-2026 MobileGL-Dev
# Licensed under the GNU Lesser General Public License v3.0:
# https://www.gnu.org/licenses/gpl-3.0.txt
# https://www.gnu.org/licenses/lgpl-3.0.txt
# SPDX-License-Identifier: LGPL-3.0-only
# End of Source File Header
"""Actual-vs-actual SSIM for archived retrace repeats, on the retrace gate's own SSIM.
WHY THIS EXISTS. `result.json` carries ONE number per run: this attempt's actual against its
@@ -1,3 +1,11 @@
// MobileGL - tools/trace_replay/fixture_tools/realign_buffer_ranges.cpp
// Copyright (c) 2025-2026 MobileGL-Dev
// Licensed under the GNU Lesser General Public License v3.0:
// https://www.gnu.org/licenses/gpl-3.0.txt
// https://www.gnu.org/licenses/lgpl-3.0.txt
// SPDX-License-Identifier: LGPL-3.0-only
// End of Source File Header
// realign_buffer_ranges: make a GL trace's indexed uniform / storage buffer range binds portable.
//
// An app sizes glBindBufferRange offsets by the GL_{UNIFORM,SHADER_STORAGE}_BUFFER_OFFSET_ALIGNMENT
+8
View File
@@ -1,4 +1,12 @@
#!/usr/bin/env python3
# MobileGL - tools/trace_replay/frame_stats.py
# Copyright (c) 2025-2026 MobileGL-Dev
# Licensed under the GNU Lesser General Public License v3.0:
# https://www.gnu.org/licenses/gpl-3.0.txt
# https://www.gnu.org/licenses/lgpl-3.0.txt
# SPDX-License-Identifier: LGPL-3.0-only
# End of Source File Header
"""Pair client/server present intervals and summarize their frame time.
MOBILEGL_PIPE_STATS=1 enables the per-present clocks. Frame IDs are matched
@@ -1,3 +1,11 @@
// MobileGL - tools/trace_replay/macos_cgs_surface_bounds.cpp
// Copyright (c) 2025-2026 MobileGL-Dev
// Licensed under the GNU Lesser General Public License v3.0:
// https://www.gnu.org/licenses/gpl-3.0.txt
// https://www.gnu.org/licenses/lgpl-3.0.txt
// SPDX-License-Identifier: LGPL-3.0-only
// End of Source File Header
#include <Carbon/Carbon.h>
using CGSConnectionID = void*;
@@ -1,4 +1,12 @@
#!/usr/bin/env python3
# MobileGL - tools/trace_replay/measure_loopback_cpu.py
# Copyright (c) 2025-2026 MobileGL-Dev
# Licensed under the GNU Lesser General Public License v3.0:
# https://www.gnu.org/licenses/gpl-3.0.txt
# https://www.gnu.org/licenses/lgpl-3.0.txt
# SPDX-License-Identifier: LGPL-3.0-only
# End of Source File Header
"""Compare current unix+shm and loopback TCP+stream using per-frame role CPU clocks.
Start a stats-enabled supervisor separately at --endpoint. This runner neither
@@ -1,4 +1,12 @@
#!/usr/bin/env python3
# MobileGL - tools/trace_replay/measure_tcp_stage_burst.py
# Copyright (c) 2025-2026 MobileGL-Dev
# Licensed under the GNU Lesser General Public License v3.0:
# https://www.gnu.org/licenses/gpl-3.0.txt
# https://www.gnu.org/licenses/lgpl-3.0.txt
# SPDX-License-Identifier: LGPL-3.0-only
# End of Source File Header
"""Measure one real 64 MiB buffer upload consumed by a TCP server draw.
The timed interval includes client staging, stream delivery, backend work, and
@@ -1,4 +1,12 @@
#!/usr/bin/env python3
# MobileGL - tools/trace_replay/measure_transport_cpu.py
# Copyright (c) 2025-2026 MobileGL-Dev
# Licensed under the GNU Lesser General Public License v3.0:
# https://www.gnu.org/licenses/gpl-3.0.txt
# https://www.gnu.org/licenses/lgpl-3.0.txt
# SPDX-License-Identifier: LGPL-3.0-only
# End of Source File Header
"""Record client thread CPU and sampled apply-thread CPU for unchanged trace workloads.
The client clock comes from the existing benchmark runner. Apply CPU comes from
@@ -1,4 +1,12 @@
#!/usr/bin/env python3
# MobileGL - tools/trace_replay/paired_tcp_benchmark.py
# Copyright (c) 2025-2026 MobileGL-Dev
# Licensed under the GNU Lesser General Public License v3.0:
# https://www.gnu.org/licenses/gpl-3.0.txt
# https://www.gnu.org/licenses/lgpl-3.0.txt
# SPDX-License-Identifier: LGPL-3.0-only
# End of Source File Header
"""Reboot-clean, pinned Redmi TCP credit measurements with original-state restore.
This explicitly mutating session is separate from the ordinary benchmark tool.
@@ -1,4 +1,12 @@
#!/usr/bin/env python3
# MobileGL - tools/trace_replay/run_android_retrace_local.py
# Copyright (c) 2025-2026 MobileGL-Dev
# Licensed under the GNU Lesser General Public License v3.0:
# https://www.gnu.org/licenses/gpl-3.0.txt
# https://www.gnu.org/licenses/lgpl-3.0.txt
# SPDX-License-Identifier: LGPL-3.0-only
# End of Source File Header
import argparse
import datetime
import hashlib
@@ -1,4 +1,12 @@
#!/usr/bin/env python3
# MobileGL - tools/trace_replay/run_macos_window_retrace_local.py
# Copyright (c) 2025-2026 MobileGL-Dev
# Licensed under the GNU Lesser General Public License v3.0:
# https://www.gnu.org/licenses/gpl-3.0.txt
# https://www.gnu.org/licenses/lgpl-3.0.txt
# SPDX-License-Identifier: LGPL-3.0-only
# End of Source File Header
import argparse
import concurrent.futures
import json
+8
View File
@@ -1,4 +1,12 @@
#!/usr/bin/env python3
# MobileGL - tools/trace_replay/run_tcp_matrix.py
# Copyright (c) 2025-2026 MobileGL-Dev
# Licensed under the GNU Lesser General Public License v3.0:
# https://www.gnu.org/licenses/gpl-3.0.txt
# https://www.gnu.org/licenses/lgpl-3.0.txt
# SPDX-License-Identifier: LGPL-3.0-only
# End of Source File Header
"""Run manifest-selected TCP retraces from a CTest JSON catalog, with resumable evidence.
Requires Linux/WSL process groups. The old local CTest/manifest TIMEOUT is not a
@@ -1,4 +1,12 @@
#!/usr/bin/env python3
# MobileGL - tools/trace_replay/skills/renderdoc-debug-on-trace-replay/scripts/capture_android_retrace.py
# Copyright (c) 2025-2026 MobileGL-Dev
# Licensed under the GNU Lesser General Public License v3.0:
# https://www.gnu.org/licenses/gpl-3.0.txt
# https://www.gnu.org/licenses/lgpl-3.0.txt
# SPDX-License-Identifier: LGPL-3.0-only
# End of Source File Header
"""Capture an exact frame from MobileGL's Android trace replay activity."""
from __future__ import annotations
@@ -1,4 +1,12 @@
#!/usr/bin/env python3
# MobileGL - tools/trace_replay/skills/renderdoc-debug-on-trace-replay/scripts/queue_android_frame.py
# Copyright (c) 2025-2026 MobileGL-Dev
# Licensed under the GNU Lesser General Public License v3.0:
# https://www.gnu.org/licenses/gpl-3.0.txt
# https://www.gnu.org/licenses/lgpl-3.0.txt
# SPDX-License-Identifier: LGPL-3.0-only
# End of Source File Header
"""Queue an exact RenderDoc frame through an Android TargetControl socket."""
from __future__ import annotations
@@ -1,4 +1,12 @@
#!/usr/bin/env python3
# MobileGL - tools/trace_replay/skills/trace-fixture-authoring-on-android-fcl/scripts/adb_capture.py
# Copyright (c) 2025-2026 MobileGL-Dev
# Licensed under the GNU Lesser General Public License v3.0:
# https://www.gnu.org/licenses/gpl-3.0.txt
# https://www.gnu.org/licenses/lgpl-3.0.txt
# SPDX-License-Identifier: LGPL-3.0-only
# End of Source File Header
import argparse
import subprocess
from pathlib import Path
@@ -1,4 +1,12 @@
#!/usr/bin/env python3
# MobileGL - tools/trace_replay/skills/trace-fixture-authoring-on-android-fcl/scripts/build_android_egltrace.py
# Copyright (c) 2025-2026 MobileGL-Dev
# Licensed under the GNU Lesser General Public License v3.0:
# https://www.gnu.org/licenses/gpl-3.0.txt
# https://www.gnu.org/licenses/lgpl-3.0.txt
# SPDX-License-Identifier: LGPL-3.0-only
# End of Source File Header
import argparse
import os
import shutil
@@ -1,4 +1,12 @@
#!/usr/bin/env python3
# MobileGL - tools/trace_replay/skills/trace-fixture-authoring-on-android-fcl/scripts/package_capture_fixture.py
# Copyright (c) 2025-2026 MobileGL-Dev
# Licensed under the GNU Lesser General Public License v3.0:
# https://www.gnu.org/licenses/gpl-3.0.txt
# https://www.gnu.org/licenses/lgpl-3.0.txt
# SPDX-License-Identifier: LGPL-3.0-only
# End of Source File Header
import argparse
import json
import re
+8
View File
@@ -1,4 +1,12 @@
#!/usr/bin/env python3
# MobileGL - tools/trace_replay/tcp_device_server.py
# Copyright (c) 2025-2026 MobileGL-Dev
# Licensed under the GNU Lesser General Public License v3.0:
# https://www.gnu.org/licenses/gpl-3.0.txt
# https://www.gnu.org/licenses/lgpl-3.0.txt
# SPDX-License-Identifier: LGPL-3.0-only
# End of Source File Header
"""Start or stop the trace APK's TCP server through adb.
Two servers, one at a time (P12 D8; whichever starts last owns the port):
@@ -1,4 +1,12 @@
#!/usr/bin/env python3
# MobileGL - tools/trace_replay/test_android_lifecycle.py
# Copyright (c) 2025-2026 MobileGL-Dev
# Licensed under the GNU Lesser General Public License v3.0:
# https://www.gnu.org/licenses/gpl-3.0.txt
# https://www.gnu.org/licenses/lgpl-3.0.txt
# SPDX-License-Identifier: LGPL-3.0-only
# End of Source File Header
"""Run the Android replay ownership regression without an emulator or Gradle."""
import pathlib
@@ -1,4 +1,12 @@
#!/usr/bin/env python3
# MobileGL - tools/trace_replay/test_benchmark_tcp_credits.py
# Copyright (c) 2025-2026 MobileGL-Dev
# Licensed under the GNU Lesser General Public License v3.0:
# https://www.gnu.org/licenses/gpl-3.0.txt
# https://www.gnu.org/licenses/lgpl-3.0.txt
# SPDX-License-Identifier: LGPL-3.0-only
# End of Source File Header
"""Offline controls for selecting truthful TCP benchmark windows."""
import json
from pathlib import Path
@@ -1,4 +1,12 @@
#!/usr/bin/env python3
# MobileGL - tools/trace_replay/test_compare_actuals.py
# Copyright (c) 2025-2026 MobileGL-Dev
# Licensed under the GNU Lesser General Public License v3.0:
# https://www.gnu.org/licenses/gpl-3.0.txt
# https://www.gnu.org/licenses/lgpl-3.0.txt
# SPDX-License-Identifier: LGPL-3.0-only
# End of Source File Header
"""Synthetic-only regressions for the actual-vs-actual SSIM and the archive summary.
No device, no PNG the retrace produced and no golden: every raster here is written by the test
+8
View File
@@ -1,4 +1,12 @@
#!/usr/bin/env python3
# MobileGL - tools/trace_replay/test_frame_stats.py
# Copyright (c) 2025-2026 MobileGL-Dev
# Licensed under the GNU Lesser General Public License v3.0:
# https://www.gnu.org/licenses/gpl-3.0.txt
# https://www.gnu.org/licenses/lgpl-3.0.txt
# SPDX-License-Identifier: LGPL-3.0-only
# End of Source File Header
"""Small fixture checks for frame ID pairing and additive frame attribution."""
import tempfile
@@ -1,4 +1,12 @@
#!/usr/bin/env python3
# MobileGL - tools/trace_replay/test_run_tcp_matrix.py
# Copyright (c) 2025-2026 MobileGL-Dev
# Licensed under the GNU Lesser General Public License v3.0:
# https://www.gnu.org/licenses/gpl-3.0.txt
# https://www.gnu.org/licenses/lgpl-3.0.txt
# SPDX-License-Identifier: LGPL-3.0-only
# End of Source File Header
"""Small process/fixture stubs only: no GL, network peer, adb or production trace."""
import contextlib
import io
+8
View File
@@ -1,4 +1,12 @@
#!/usr/bin/env python3
# MobileGL - tools/trace_replay/trace_cases.py
# Copyright (c) 2025-2026 MobileGL-Dev
# Licensed under the GNU Lesser General Public License v3.0:
# https://www.gnu.org/licenses/gpl-3.0.txt
# https://www.gnu.org/licenses/lgpl-3.0.txt
# SPDX-License-Identifier: LGPL-3.0-only
# End of Source File Header
import argparse
import json
import sys
@@ -1,3 +1,11 @@
// MobileGL - tools/trace_replay/trace_env_overrides_test.cpp
// Copyright (c) 2025-2026 MobileGL-Dev
// Licensed under the GNU Lesser General Public License v3.0:
// https://www.gnu.org/licenses/gpl-3.0.txt
// https://www.gnu.org/licenses/lgpl-3.0.txt
// SPDX-License-Identifier: LGPL-3.0-only
// End of Source File Header
// Host-side check for the retrace lane's `K=V;K=V` environment passthrough.
//
// The passthrough is the one hand-rolled parse between a CI flag and setenv(), and the
+8
View File
@@ -1,3 +1,11 @@
// MobileGL - tools/trace_replay/trace_replay_cli.cpp
// Copyright (c) 2025-2026 MobileGL-Dev
// Licensed under the GNU Lesser General Public License v3.0:
// https://www.gnu.org/licenses/gpl-3.0.txt
// https://www.gnu.org/licenses/lgpl-3.0.txt
// SPDX-License-Identifier: LGPL-3.0-only
// End of Source File Header
#include "trace_replay_core.hpp"
#include <cctype>
@@ -1,3 +1,11 @@
// MobileGL - tools/trace_replay/trace_replay_lease_test.cpp
// Copyright (c) 2025-2026 MobileGL-Dev
// Licensed under the GNU Lesser General Public License v3.0:
// https://www.gnu.org/licenses/gpl-3.0.txt
// https://www.gnu.org/licenses/lgpl-3.0.txt
// SPDX-License-Identifier: LGPL-3.0-only
// End of Source File Header
#include "trace_replay_lease.hpp"
#include <iostream>