From 6985e47025abf87373ca1a51a0c598141545afb1 Mon Sep 17 00:00:00 2001 From: Swung0x48 Date: Thu, 8 Oct 2026 09:32:52 -0400 Subject: [PATCH] [Tools] (bench): push the frequency sampler with CRs stripped, so a CRLF checkout still runs on the device. --- tools/device_bench/disagg/fcl_probe.sh | 2 +- tools/device_bench/disagg/matrix_p14.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/device_bench/disagg/fcl_probe.sh b/tools/device_bench/disagg/fcl_probe.sh index 0ebc88d4..5dfc25d8 100755 --- a/tools/device_bench/disagg/fcl_probe.sh +++ b/tools/device_bench/disagg/fcl_probe.sh @@ -39,7 +39,7 @@ snap() { adb -s $SER shell "su -c 'cat /proc/uptime; cat /sys/class/kgsl/kgsl-3d # P15 validity rule: frequency/thermal sampler for the whole measurement window (devstate.sh judges it) BENCH="$(cd "$(dirname "$0")" && pwd)" SER=$SER bash $BENCH/pin_clocks.sh show > "$out/pin.txt" 2>&1 -adb -s $SER push "$(cygpath -w $BENCH/freq_sampler.sh)" /data/local/tmp/p15-freq_sampler.sh >/dev/null +tr -d '\r' < $BENCH/freq_sampler.sh > "$out/freq_sampler.lf.sh"; adb -s $SER push "$(cygpath -w "$out/freq_sampler.lf.sh")" /data/local/tmp/p15-freq_sampler.sh >/dev/null su_sh "chmod 755 /data/local/tmp/p15-freq_sampler.sh; rm -f /data/local/tmp/p15freq.txt; (nohup sh /data/local/tmp/p15-freq_sampler.sh /data/local/tmp/p15freq.txt 2 >/dev/null 2>&1 &)" # A: ftrace EV=/sys/kernel/tracing/events diff --git a/tools/device_bench/disagg/matrix_p14.sh b/tools/device_bench/disagg/matrix_p14.sh index e164a838..28ca3a2d 100644 --- a/tools/device_bench/disagg/matrix_p14.sh +++ b/tools/device_bench/disagg/matrix_p14.sh @@ -150,7 +150,7 @@ run_one() { local env; env="$(arm_env "$arm")"; [ -n "$EXTRA_ENV" ] && env="${env:+$env;}$EXTRA_ENV" if [ "$mode" = benchmark ]; then # P15 validity rule: frequency/thermal sampler for the whole run (devstate.sh judges it). - adb -s "$SER" push "$(cygpath -w "$SCRIPT_DIR/freq_sampler.sh")" /data/local/tmp/p15-freq_sampler.sh >/dev/null 2>&1 + tr -d '\r' < "$SCRIPT_DIR/freq_sampler.sh" > "$dir/freq_sampler.lf.sh"; adb -s "$SER" push "$(cygpath -w "$dir/freq_sampler.lf.sh")" /data/local/tmp/p15-freq_sampler.sh >/dev/null 2>&1 shq "su -c 'chmod 755 /data/local/tmp/p15-freq_sampler.sh; pkill -f p15-freq_sampler.sh; rm -f /data/local/tmp/p15freq.txt; (nohup sh /data/local/tmp/p15-freq_sampler.sh /data/local/tmp/p15freq.txt 2 >/dev/null 2>&1 &)'" >/dev/null 2>&1 shq "su -c 'nohup taskset 01 $SAMPLER $pkg 10 $app/output/benchmark.json /data/local/tmp/p14cpu.csv $TIMEOUT >/dev/null 2>&1 &'" >/dev/null 2>&1 fi