mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-11 05:38:31 +09:00
[Feat] (Bench, Pipe): run the blend-toggle case in CI, give G7 a negative control, and record the two campaign devices
- DriverBenchStateToggle runs mc_state_toggle as its own ctest entry. The case has been in kBenchCases since P0 and nothing executed it, so nothing would have noticed it rotting - and it is the exact enable/draw/disable/draw shape the microbenchmark P2 owes the GO/NO-GO measures. About 1.2 s inside an existing three-minute job. - scripts/g7_negative_control.sh breaks the pipeline/dynamic split on purpose: it inserts two boundaries so ColorMasks becomes a dynamic chunk of its own, which keeps the partition sorted, non-overlapping and complete - so it still COMPILES - while making glColorMask bump m_pipelineStateVersion without moving the pipeline-subset hash. A non-zero ctest is the pass. - Everything that could make that control lie is refused rather than reported: a missing SetterConsistency test exits 2 instead of reading "no tests matched" as a failure; a tree that is already red or already broken exits 2; a patched table that does not compile exits 2, since a build break would prove the static_asserts work rather than that the test still checks; and the restore is from byte-for-byte copies (never from git, so a dirty tree is given back intact), followed by a rebuild and a re-run that must be green. --verify-patch-only exercises the mechanism where the test does not exist yet and says explicitly that it is not a pass. - Profiles for the two campaign devices, and the guard that stops them being trusted early. Both carry PROFILE_VERIFIED=0 and every device-specific field is TODO_VERIFY_ON_DEVICE rather than a guess: the harness pins through MediaTek nodes and 35d0befa is a Qualcomm part, where `su -c 'echo ... > /proc/ppm/...'` fails with a zero exit and the run would report numbers it believes were pinned. bench.sh and session.sh now refuse an unverified profile unless --allow-unverified-profile is passed, which warns that the run is not comparable with a pinned one. The README records what earns PROFILE_VERIFIED=1.
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
#
|
||||
# Usage: session.sh --device devices/odinlite.env [--backend magma|espryt|mobileglues]
|
||||
# [--settle 150] [--retries 3] [--no-pin]
|
||||
# [--allow-unverified-profile]
|
||||
# Exits 0 with the game in-world (after settle seconds), 1 otherwise.
|
||||
# NOTE: leaves the game running AND the frequency pins active (that is the
|
||||
# point of a session). When done: am force-stop the game and unpin via
|
||||
@@ -24,7 +25,7 @@ RENDERER_ESPRYT=5e273ee2-baca-4c81-8e48-b63feefb9ba8
|
||||
RENDERER_MAGMA=2be0dc10-1eef-4ce2-b512-b266dd33fd9e
|
||||
RENDERER_MOBILEGLUES=com.fcl.plugin.mobileglues
|
||||
|
||||
DEVICE_ENV="" BACKEND="" SETTLE=150 RETRIES=3 DO_PIN=1
|
||||
DEVICE_ENV="" BACKEND="" SETTLE=150 RETRIES=3 DO_PIN=1 ALLOW_UNVERIFIED_PROFILE=0
|
||||
while [ $# -gt 0 ]; do
|
||||
case "$1" in
|
||||
--device) DEVICE_ENV=$2; shift 2 ;;
|
||||
@@ -32,12 +33,39 @@ while [ $# -gt 0 ]; do
|
||||
--settle) SETTLE=$2; shift 2 ;;
|
||||
--retries) RETRIES=$2; shift 2 ;;
|
||||
--no-pin) DO_PIN=0; shift ;;
|
||||
--allow-unverified-profile) ALLOW_UNVERIFIED_PROFILE=1; shift ;;
|
||||
*) echo "unknown arg: $1" >&2; exit 2 ;;
|
||||
esac
|
||||
done
|
||||
[ -n "$DEVICE_ENV" ] || { echo "need --device" >&2; exit 2; }
|
||||
# shellcheck disable=SC1090
|
||||
. "$DEVICE_ENV"
|
||||
|
||||
# A device profile that has not been read off its device yet is refused here rather than acted
|
||||
# on. The failure it prevents is silent and expensive: the pin path below is MediaTek-specific
|
||||
# (/proc/ppm, /proc/gpufreq), `su -c 'echo ... > /proc/...'` fails without a non-zero exit, and a
|
||||
# run against a profile whose nodes do not exist reports numbers it believes were taken under a
|
||||
# frequency pin. The pin-integrity fields sampled at window end are the only clue, and they are
|
||||
# read after the run rather than before it.
|
||||
#
|
||||
# PROFILE_VERIFIED=1 means: somebody read the cpufreq policies, the GPU OPP and the thermal zone
|
||||
# TYPE off THIS device, ran one pinned window, and checked big_cur/little_cur/gpu_cur_khz in the
|
||||
# result JSON against the pins. Nothing else earns it.
|
||||
require_verified_profile() {
|
||||
if [ "${PROFILE_VERIFIED:-1}" = "1" ]; then return 0; fi
|
||||
if [ "$ALLOW_UNVERIFIED_PROFILE" = "1" ]; then
|
||||
echo "[warn] $DEVICE_ENV declares PROFILE_VERIFIED=0 and --allow-unverified-profile was passed:" >&2
|
||||
echo "[warn] the frequency pins and the thermal gate in it are UNCONFIRMED, so any number this" >&2
|
||||
echo "[warn] run produces is not comparable with a pinned one." >&2
|
||||
return 0
|
||||
fi
|
||||
echo "$DEVICE_ENV declares PROFILE_VERIFIED=0: its sysfs nodes and OPPs have not been read off" >&2
|
||||
echo "the device, so pinning would fail silently and the run would look pinned but not be." >&2
|
||||
echo "Fill in the TODO_VERIFY_ON_DEVICE fields, confirm one pinned window, set PROFILE_VERIFIED=1 -" >&2
|
||||
echo "or pass --allow-unverified-profile to measure anyway and label the result unpinned." >&2
|
||||
exit 2
|
||||
}
|
||||
require_verified_profile
|
||||
ADB="adb -s $DEVICE_SERIAL"
|
||||
log() { echo "[session] $*" >&2; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user