mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-11-18 23:43:23 +09:00
[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:
@@ -1,4 +1,12 @@
|
||||
#!/usr/bin/env python3
|
||||
# MobileGL - tools/device_bench/disagg/callee_split.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
|
||||
|
||||
"""Split one function's inclusive samples by its direct callees (and by malloc/atomic leaves).
|
||||
|
||||
python callee_split.py <perf.data> <binary_cache> <function substring> [--depth 1] [--thread NAME]
|
||||
|
||||
@@ -1,4 +1,12 @@
|
||||
#!/usr/bin/env python3
|
||||
# MobileGL - tools/device_bench/disagg/components.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
|
||||
|
||||
"""Inclusive share of fixed components on one thread of a simpleperf profile, converted to
|
||||
milliseconds per frame with the thread's measured CPU ms/frame.
|
||||
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
// MobileGL - tools/device_bench/disagg/cpusampler.c
|
||||
// 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
|
||||
|
||||
// Device-side per-thread CPU sampler for the perf matrix (P14).
|
||||
//
|
||||
// Usage (as root, pinned to a little core):
|
||||
|
||||
@@ -1,4 +1,12 @@
|
||||
#!/usr/bin/env python3
|
||||
# MobileGL - tools/device_bench/disagg/crosshost_report.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
|
||||
|
||||
"""Reduce crosshost_accept.sh output (.trace-work/perf-compare/crosshost/<run>/) to a table."""
|
||||
import json, os, re, statistics, sys
|
||||
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
# MobileGL - tools/device_bench/disagg/fcl_drvcaller.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
|
||||
|
||||
# fcl_drvcaller.py <rundir> <tid> <frames>: driver-layer on-CPU time keyed by (driver entry, MobileGL caller)
|
||||
import os, sys
|
||||
from collections import Counter
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
# MobileGL - tools/device_bench/disagg/fcl_incl.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
|
||||
|
||||
# fcl_incl.py <rundir> <tid|thread comm> <frames> [N]: inclusive on-CPU ms/frame of libMobileGL functions
|
||||
import os, sys
|
||||
from collections import Counter
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
# MobileGL - tools/device_bench/disagg/fcl_split.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
|
||||
|
||||
# fcl_split.py <rundir> <tid> <ms_per_frame> [depth] [--detail=layer]
|
||||
# Period-weighted on/off-CPU split of one thread of an FCL simpleperf --trace-offcpu profile.
|
||||
# On-CPU goes to a layer (driver / backend / applier / client half / jvm+game / other), off-CPU is
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
# MobileGL - tools/device_bench/disagg/fcl_stacks.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
|
||||
|
||||
# fcl_stacks.py <rundir> <tid> <frames> [depth] [filter-substring]: on-CPU inclusive function time (ms/frame) and top stacks
|
||||
import os, sys
|
||||
from collections import Counter
|
||||
|
||||
@@ -1,4 +1,12 @@
|
||||
#!/usr/bin/env python3
|
||||
# MobileGL - tools/device_bench/disagg/freqcheck.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
|
||||
|
||||
"""freqcheck.py <freq.txt> [pin.txt] - P15 measurement-validity verdict for one run.
|
||||
|
||||
freq.txt is freq_sampler.sh output; pin.txt is the `pin_clocks.sh show` output taken when the
|
||||
|
||||
@@ -1,4 +1,12 @@
|
||||
#!/usr/bin/env python3
|
||||
# MobileGL - tools/device_bench/disagg/layers.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
|
||||
|
||||
"""Split one thread of a simpleperf profile by LAYER, in ms per frame.
|
||||
|
||||
python layers.py <perf.data> <binary_cache> <thread comm> <cpu_ms_per_frame> [--tail-ms=N]
|
||||
|
||||
@@ -1,4 +1,12 @@
|
||||
#!/usr/bin/env python3
|
||||
# MobileGL - tools/device_bench/disagg/make_report.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
|
||||
|
||||
"""Render the perf-compare report tables from summary.json + per-run artefacts.
|
||||
|
||||
Usage: make_report.py [results_dir]
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
# MobileGL - tools/device_bench/disagg/offwait.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
|
||||
|
||||
# offwait.py <trace.txt> <tid> [present_marker]
|
||||
# Off-CPU accounting for one thread from an atrace/ftrace text dump:
|
||||
# - sleep (S/D) and runnable (preempted) time per frame
|
||||
|
||||
@@ -1,4 +1,12 @@
|
||||
#!/usr/bin/env python3
|
||||
# MobileGL - tools/device_bench/disagg/p14_report.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
|
||||
|
||||
"""Reduce matrix_p14.sh results: steady-state fps, per-thread CPU ms/frame, GPU busy share.
|
||||
|
||||
python p14_report.py <results_dir> [--md out.md] [--json out.json]
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
// MobileGL - tools/device_bench/disagg/sampler.c
|
||||
// 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
|
||||
|
||||
// Device-side /proc sampler: per-tid syscall occupancy + CPU + switch counters.
|
||||
// strace attach is SELinux-blocked on this device; /proc/<tid>/syscall is
|
||||
// readable same-uid via run-as, which gives the blocked-syscall histogram.
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
# MobileGL - tools/device_bench/disagg/sfalign.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
|
||||
|
||||
# sfalign.py <trace>: does SF's setTransactionState return right after SF main-thread flushTransactions?
|
||||
import re, sys, bisect
|
||||
from collections import defaultdict
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
# MobileGL - tools/device_bench/disagg/slices.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
|
||||
|
||||
# slices.py <trace> <comm-regex> : atrace slice wall time per slice name for threads whose comm-pid matches
|
||||
import re, sys
|
||||
from collections import Counter, defaultdict
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
# MobileGL - tools/device_bench/disagg/snapdiff.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 sys
|
||||
def rd(p):
|
||||
L=open(p).read().split('\n'); up=float(L[0].split()[0]); gpu=sum(int(x) for x in L[1].split())
|
||||
|
||||
Reference in New Issue
Block a user