diff --git a/selfdrive/debug/internal/rt/atrace.sh b/selfdrive/debug/internal/rt/atrace.sh deleted file mode 100755 index 826178c329..0000000000 --- a/selfdrive/debug/internal/rt/atrace.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/bash - -echo 96000 > /d/tracing/buffer_size_kb -atrace -t 10 sched workq -b 96000 > /tmp/trace.txt diff --git a/selfdrive/debug/internal/rt/record_trace.sh b/selfdrive/debug/internal/rt/record_trace.sh deleted file mode 100755 index 00593bfca4..0000000000 --- a/selfdrive/debug/internal/rt/record_trace.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/bash - -cd /d/tracing - -# setup tracer -echo "function" > current_tracer - -echo "start tracing" -echo 1 > tracing_on - -# do stuff -sleep 2 -#/data/openpilot/scripts/restart_modem.sh -#sleep 3 -#/data/openpilot/scripts/restart_modem.sh -sleep 5 - -# disable tracing -echo "done tracing" -echo 0 > tracing_on - -# copy -echo "copy traces" -cp trace /tmp/trace.txt -cp per_cpu/cpu3/trace /tmp/trace_cpu3.txt diff --git a/selfdrive/debug/internal/rt/waste3.c b/selfdrive/debug/internal/rt/waste3.c deleted file mode 100644 index c536ca9c6d..0000000000 --- a/selfdrive/debug/internal/rt/waste3.c +++ /dev/null @@ -1,63 +0,0 @@ -#define _GNU_SOURCE -#include -#include -#include -#include -#include -#include -#include "../../../common/util.h" -#include "../../../common/timing.h" - -#define CORES 3 -double ttime[CORES]; -double oout[CORES]; - -void waste(int core) { - prctl(PR_SET_NAME, (unsigned long)"waste", 0, 0, 0); - - cpu_set_t my_set; - CPU_ZERO(&my_set); - CPU_SET(core, &my_set); - int ret = sched_setaffinity(0, sizeof(cpu_set_t), &my_set); - printf("set affinity to %d: %d\n", core, ret); - - //struct sched_param sa; - //memset(&sa, 0, sizeof(sa)); - //sa.sched_priority = 51; - //sched_setscheduler(syscall(SYS_gettid), SCHED_FIFO, &sa); - - float32x4_t *tmp = (float32x4_t *)malloc(0x1000008*sizeof(float32x4_t)); - float32x4_t out; - - uint64_t i = 0; - double sec = seconds_since_boot(); - while(1) { - int j; - for (j = 0; j < 0x1000000; j++) { - out = vmlaq_f32(out, tmp[j], tmp[j+1]); - } - if (i == 0x8) { - double nsec = seconds_since_boot(); - ttime[core] = nsec-sec; - oout[core] = out[0] + out[1] + out[2] + out[3]; - i = 0; - sec = nsec; - } - i++; - } -} - -int main() { - pthread_t waster[CORES]; - for (int i = 0 ; i < CORES; i++) { - pthread_create(&waster[i], NULL, waste, (void*)i); - } - while (1) { - for (int i = 0 ; i < CORES; i++) { - printf("%.2f ", ttime[i]); - } - printf("\n"); - sleep(1); - } -} - diff --git a/selfdrive/debug/internal/sounds/set_volume.sh b/selfdrive/debug/internal/sounds/set_volume.sh deleted file mode 100755 index b25a421822..0000000000 --- a/selfdrive/debug/internal/sounds/set_volume.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/bash -while true -do - service call audio 3 i32 3 i32 $1 i32 1 - sleep 1 -done diff --git a/selfdrive/debug/internal/sounds/test_sound_stability.py b/selfdrive/debug/internal/sounds/test_sound_stability.py deleted file mode 100755 index ba6c59220b..0000000000 --- a/selfdrive/debug/internal/sounds/test_sound_stability.py +++ /dev/null @@ -1,45 +0,0 @@ -#!/usr/bin/env python3 -import os -import subprocess -import time -import datetime -import random - -from common.basedir import BASEDIR -import cereal.messaging as messaging - -if __name__ == "__main__": - - sound_dir = os.path.join(BASEDIR, "selfdrive/assets/sounds") - sound_files = [f for f in os.listdir(sound_dir) if f.endswith(".wav")] - play_sound = os.path.join(BASEDIR, "selfdrive/ui/test/play_sound") - - print("disabling charging") - os.system('echo "0" > /sys/class/power_supply/battery/charging_enabled') - - os.environ["LD_LIBRARY_PATH"] = "" - - sm = messaging.SubMaster(["deviceState"]) - - FNULL = open(os.devnull, "w") - start_time = time.time() - while True: - volume = 15 - - n = random.randint(5, 10) - procs = [] - for _ in range(n): - sound = random.choice(sound_files) - p = subprocess.Popen([play_sound, os.path.join(sound_dir, sound), str(volume)], stdout=FNULL, stderr=FNULL) - procs.append(p) - time.sleep(random.uniform(0, 0.75)) - - time.sleep(random.randint(0, 5)) - for p in procs: - p.terminate() - - sm.update(0) - s = time.time() - start_time - hhmmss = str(datetime.timedelta(seconds=s)).split(".")[0] - print("test duration:", hhmmss) - print("\tbattery percent", sm["deviceState"].batteryPercent) diff --git a/selfdrive/debug/internal/sounds/test_sounds.py b/selfdrive/debug/internal/sounds/test_sounds.py deleted file mode 100755 index 3ed3a51589..0000000000 --- a/selfdrive/debug/internal/sounds/test_sounds.py +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env python3 - -import os -import subprocess -import time - -from common.basedir import BASEDIR - -if __name__ == "__main__": - - sound_dir = os.path.join(BASEDIR, "selfdrive/assets/sounds") - sound_files = [f for f in os.listdir(sound_dir) if f.endswith(".wav")] - - play_sound = os.path.join(BASEDIR, "selfdrive/ui/test/play_sound") - - os.environ["LD_LIBRARY_PATH"] = "" - - while True: - for volume in range(10, 16): - for sound in sound_files: - p = subprocess.Popen([play_sound, os.path.join(sound_dir, sound), str(volume)]) - time.sleep(1) - p.terminate()