Skip to content
Snippets Groups Projects
Commit 24f9d294 authored by Andre Maroneze's avatar Andre Maroneze Committed by Andre Maroneze
Browse files

[analysis-scripts] remove obsolete slevel tweaker

parent 82ccc1c0
No related branches found
No related tags found
No related merge requests found
......@@ -119,7 +119,6 @@ EVAFLAGS ?= \
-no-deps-print -no-calldeps-print \
-eva-warn-key garbled-mix \
-memexec-all -calldeps -permissive -from-verbose 0 \
$(SLEVEL) \
$(if $(EVABUILTINS), -eva-builtin=$(call fc_list,$(EVABUILTINS)),) \
$(if $(EVAUSESPECS), -eva-use-spec $(call fc_list,$(EVAUSESPECS)),)
FCFLAGS ?=
......@@ -181,7 +180,6 @@ SHELL := /bin/bash
mv $@/{running,command}
touch $@ # Update timestamp and prevents remake if nothing changes
%.slevel.eva: SLEVEL = -slevel $(word 2,$(subst ., ,$*))
%.eva: EVA = $(FRAMAC) $(FCFLAGS) -eva $(EVAFLAGS)
%.eva: PARSE_RESULT = $(word 1,$(subst ., ,$*)).parse
%.eva: $$(PARSE_RESULT) $$(shell $(DIR)cmd-dep.sh $$@/command $$(EVA)) $(if $(BENCHMARK),.FORCE,)
......
#!/bin/bash -u
declare -A alarms
declare -A utimes
function print_results()
{
local s
local t
if [ -z "$quiet" ]
then
echo -e '\e\0143'
printf "%24s" 'file / slevel'
for s in $slevels
do
printf "%8s" $s
done
printf "\n"
for t in $targets
do
printf "\n"
printf "%18s%6s" $t '#alrm'
for s in $slevels
do
printf "%8s" ${alarms["$t,$s"]-}
done
printf "\n"
printf "%18s%6s" '' 'time'
for s in $slevels
do
printf "%8s" ${utimes["$t,$s"]-}
done
printf "\n"
done
printf "\n"
fi
}
function poll_results()
{
for s in $slevels
do
for t in $targets
do
base=$t.$s.slevel.eva
if [ -f $base/stats.txt ]
then
read alarms["$t,$s"] utimes["$t,$s"] <<< $(
source $base/stats.txt
echo ${alarms:-x} ${user_time:- }
)
fi
done
done
}
# Parse command Line
slevels="0 10 20 50 100 200 500 1000 2000 5000 10000 20000 50000"
run="make --jobs 9"
targets=""
quiet=""
while [[ $# > 0 ]]
do
case $1 in
-f|--file|--makefile)
run="$run $1 $2"
shift
;;
-B|--always-make)
run="$run $1"
;;
-q|--quiet)
quiet="yes"
;;
*)
targets="$targets $1"
;;
esac
shift
done
# List make targets
for s in $slevels
do
for t in $targets
do
run="$run $t.$s.slevel.eva"
done
done
# Run and display
{
$run > /dev/null &
pid=$!
print_results
while ps -p $pid >/dev/null
do
sleep 1
poll_results
print_results
done
} 2> slevel-tweaker.log
cat slevel-tweaker.log >&2
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment