From b02d9cfdfc432aa136b9c4adca8b8cca8eee608c Mon Sep 17 00:00:00 2001 From: Alwin Berger Date: Fri, 15 Aug 2025 09:13:37 +0000 Subject: [PATCH] remove some outdated scripts --- fuzzers/FRET/benchmark/Makefile | 57 ------------------- .../FRET/benchmark/scripts/bench_rename.sh | 5 -- .../benchmark/scripts/plot_all_icounttrace.sh | 13 ----- fuzzers/FRET/benchmark/scripts/plot_stgsize.r | 23 -------- fuzzers/FRET/benchmark/sem.sh | 52 ----------------- 5 files changed, 150 deletions(-) delete mode 100644 fuzzers/FRET/benchmark/Makefile delete mode 100755 fuzzers/FRET/benchmark/scripts/bench_rename.sh delete mode 100755 fuzzers/FRET/benchmark/scripts/plot_all_icounttrace.sh delete mode 100755 fuzzers/FRET/benchmark/scripts/plot_stgsize.r delete mode 100755 fuzzers/FRET/benchmark/sem.sh diff --git a/fuzzers/FRET/benchmark/Makefile b/fuzzers/FRET/benchmark/Makefile deleted file mode 100644 index 6a479038e8..0000000000 --- a/fuzzers/FRET/benchmark/Makefile +++ /dev/null @@ -1,57 +0,0 @@ -TIME=7200 - -corpora/%/seed: - mkdir -p $$(dirname $@) - LINE=$$(grep "^$$(basename $*)" target_symbols.csv); \ - export \ - KERNEL=benchmark/build/$*.elf \ - FUZZ_MAIN=$$(echo $$LINE | cut -d, -f2) \ - FUZZ_INPUT=$$(echo $$LINE | cut -d, -f3) \ - FUZZ_INPUT_LEN=$$(echo $$LINE | cut -d, -f4) \ - BREAKPOINT=$$(echo $$LINE | cut -d, -f5) \ - SEED_DIR=benchmark/corpora/$* \ - DUMP_SEED=seed; \ - ../fuzzer.sh - -timedump/%$(FUZZ_RANDOM)$(SUFFIX): corpora/%/seed - mkdir -p $$(dirname $@) - LINE=$$(grep "^$$(basename $*)" target_symbols.csv); \ - export \ - KERNEL=benchmark/build/$*.elf \ - FUZZ_MAIN=$$(echo $$LINE | cut -d, -f2) \ - FUZZ_INPUT=$$(echo $$LINE | cut -d, -f3) \ - FUZZ_INPUT_LEN=$$(echo $$LINE | cut -d, -f4) \ - BREAKPOINT=$$(echo $$LINE | cut -d, -f5) \ - SEED_RANDOM=1 \ - TIME_DUMP=benchmark/$@ \ - CASE_DUMP=benchmark/$@; \ - ../fuzzer.sh + + + + + $(TIME) + + + > $@_log - #SEED_DIR=benchmark/corpora/$* - -all_sequential: timedump/sequential/mpeg2$(FUZZ_RANDOM) timedump/sequential/dijkstra$(FUZZ_RANDOM) timedump/sequential/epic$(FUZZ_RANDOM) \ - timedump/sequential/g723_enc$(FUZZ_RANDOM) timedump/sequential/audiobeam$(FUZZ_RANDOM) \ - timedump/sequential/gsm_enc$(FUZZ_RANDOM) - -all_kernel: timedump/kernel/bsort$(FUZZ_RANDOM) timedump/kernel/insertsort$(FUZZ_RANDOM) #timedump/kernel/fft$(FUZZ_RANDOM) - -all_app: timedump/app/lift$(FUZZ_RANDOM) - -all_system: timedump/lift$(FUZZ_RANDOM)$(SUFFIX) - -all_period: timedump/waters$(FUZZ_RANDOM)$(SUFFIX) - -tacle_rtos: timedump/tacle_rtos$(FUZZ_RANDOM) - -graphics: - Rscript --vanilla plot_comparison.r mnt/timedump/sequential audiobeam - Rscript --vanilla plot_comparison.r mnt/timedump/sequential dijkstra - Rscript --vanilla plot_comparison.r mnt/timedump/sequential epic - Rscript --vanilla plot_comparison.r mnt/timedump/sequential g723_enc - # Rscript --vanilla plot_comparison.r mnt/timedump/sequential gsm_enc - # Rscript --vanilla plot_comparison.r mnt/timedump/sequential huff_dec - Rscript --vanilla plot_comparison.r mnt/timedump/sequential mpeg2 - # Rscript --vanilla plot_comparison.r mnt/timedump/sequential rijndael_dec - # Rscript --vanilla plot_comparison.r mnt/timedump/sequential rijndael_enc - -clean: - rm -rf corpora timedump \ No newline at end of file diff --git a/fuzzers/FRET/benchmark/scripts/bench_rename.sh b/fuzzers/FRET/benchmark/scripts/bench_rename.sh deleted file mode 100755 index e9d47cff93..0000000000 --- a/fuzzers/FRET/benchmark/scripts/bench_rename.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh -export TOPLEVEL="remote/timedump" -[ -d "$TOPLEVEL/feedgeneration100" ] && mv $TOPLEVEL/feedgeneration100 $TOPLEVEL/evolutionary -[ -d "$TOPLEVEL/stg" ] && mv $TOPLEVEL/stg $TOPLEVEL/fret -[ -d "$TOPLEVEL/frafl" ] && mv $TOPLEVEL/frafl $TOPLEVEL/coverage diff --git a/fuzzers/FRET/benchmark/scripts/plot_all_icounttrace.sh b/fuzzers/FRET/benchmark/scripts/plot_all_icounttrace.sh deleted file mode 100755 index 9a08553e21..0000000000 --- a/fuzzers/FRET/benchmark/scripts/plot_all_icounttrace.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env bash -./sem.sh /tmp/plot reset 20 -declare -a PLOTS -COUNT=0 -while IFS="" read -r p || [ -n "$p" ]; -do - if [[ -z "$p" ]]; then - continue - fi - PLOTS[$COUNT]="$p" - COUNT=$((COUNT+1)) - ../../../../state2gantt/driver_sem.sh $p & -done < <(find $BENCHDIR/timedump -maxdepth 2 -type 'f' -iregex '.*icounttrace.ron$') diff --git a/fuzzers/FRET/benchmark/scripts/plot_stgsize.r b/fuzzers/FRET/benchmark/scripts/plot_stgsize.r deleted file mode 100755 index 7de8a7e8fc..0000000000 --- a/fuzzers/FRET/benchmark/scripts/plot_stgsize.r +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env Rscript -# Load necessary libraries -library(ggplot2) - -# Define the function to load CSV and plot -plot_stgsize <- function(file_path) { - print(file_path) - # Read the CSV file without headers - data <- read.csv(file_path, header = FALSE) - data['V5'] <- data['V5']/(3600*1000) - - # Plot the line chart - p <- ggplot(data, aes(x = V5, y = V2)) + - geom_line() + - labs(x = "runtime [h]", y = "# of nodes") + #, title = "Number of nodes over time.") + - theme_minimal() - - output_file <- sub("\\.stgsize$", paste0("_nodes.png"), file_path) - ggsave(basename(output_file), plot = p + theme_bw(base_size = 10), width = 3.5, height = 2, dpi = 300, units = "in", device = "png") -} - -args <- commandArgs(trailingOnly = TRUE) -plot_stgsize(args[1]) \ No newline at end of file diff --git a/fuzzers/FRET/benchmark/sem.sh b/fuzzers/FRET/benchmark/sem.sh deleted file mode 100755 index 1700aeb3e9..0000000000 --- a/fuzzers/FRET/benchmark/sem.sh +++ /dev/null @@ -1,52 +0,0 @@ -#!/usr/bin/env bash - -# A generic counting semaphore in bash -# Parameter is the lockfile and operation -# Setup: -# rm /tmp/test -# echo $num > /tmp/test - -set -e -if [[ $2 = "reset" ]]; then - if [[ ! "$3" -gt "0" ]]; then echo "Parameter 3: Needs to be a number"; exit;fi - rm -f $1 - [[ -d "$1_lockdir" ]] && rmdir $1_lockdir - echo $3 > $1 - exit 0 -fi -if [[ ! -f $1 ]]; then echo "Parameter 1: File Does not exist"; exit; fi -if [[ $2 != "lock" ]] && [[ $2 != "release" ]] && [[ $2 != "reset" ]]; then echo "Parameter 2: must be lock, release or reset"; exit; fi -if [[ $2 = "lock" ]]; then - SEM='' - while [[ -z $SEM ]]; do - if (( $(cat $1 ) == 0 )); then sleep 1; wait; continue; fi - if mkdir $1_lockdir > /dev/null 2>&1 ; then - VAL=$(cat $1) - if (( $VAL > 0 )) - then - SEM=$(sed -i "s@$VAL@$(( $VAL - 1))@w /dev/stdout" $1) - echo "Take $VAL -> $SEM" - else - sleep 1; wait - fi - else - sleep 0.5; - fi - done - rmdir $1_lockdir -else - SEM='' - while [[ -z $SEM ]]; do - if mkdir $1_lockdir > /dev/null 2>&1 ; then - VAL=$(cat $1) - SEM=$(sed -i "s@$VAL@$(( $VAL + 1))@w /dev/stdout" $1) - echo "Give $VAL -> $(( $VAL + 1 ))" - else - sleep 0.1; - fi - done - rmdir $1_lockdir -fi - -#SEM=''; while [[ -z SEM ]]; do VAL=$(cat /tmp/test); if (( $VAL > 0 )); then SEM=$(sed -i "s@$VAL@$(( $VAL - 1))@w /dev/stdout" /tmp/test); else sleep 1; wait; fi; done -