diff --git a/eval.py b/eval.py index 5361cc7ee4238a35ba39a3b8e8f2af111225a7d8..c960c7c3f82e0c59d2e5dba28943a5bf7a9c184c 100755 --- a/eval.py +++ b/eval.py @@ -38,8 +38,13 @@ def prepare_env(update_env: T.MutableMapping) -> T.Dict: return current_env -PERF_EXE = 'perf' -PERF_EVENT_SELECTION = '-dd' +PERF_EXE = f'{os.environ["HOME"]}/linux/waitfd/src/tools/perf/perf' +PERF_EVENTS = ( + 'duration_time,user_time,system_time,task-clock,context-switches,cpu-migrations,' + 'page-faults,cycles,stalled-cycles-frontend,stalled-cycles-backend,' + 'instructions,branches,branch-misses,L1-dcache-load-misses,' + 'L1-dcache-loads,L1-dcache-prefetches,L1-icache-load-misses,L1-icache-loads' +) def perf_get_energy_events() -> str: @@ -76,7 +81,7 @@ def main(args): elif args.perf_stats or args.perf_record: perf_event_selection = ','.join( - args.perf_stats) if args.perf_stats else PERF_EVENT_SELECTION + args.perf_stats) if args.perf_stats else f'-e {PERF_EVENTS}' if args.perf_record: perf_out = RESULT_DIR / f'{target}.perf.data' diff --git a/muhq-ma-eval.sh b/muhq-ma-eval.sh index c502633808a8b193ec7be71fe08e86f48f177d44..81b944ed11b124efaaeb7dbf1dc0412c0723dc52 100755 --- a/muhq-ma-eval.sh +++ b/muhq-ma-eval.sh @@ -22,7 +22,7 @@ for mode in $PULSE_MODES; do for u in 20 80 100 200; do ./eval.py --data-root "$OUT" --measure-energy -u "$u" -p "$PULSE" \ - -i "$ITERATIONS" --pulse-mode "${mode}" + -i "$ITERATIONS" --pulse-mode "${mode}" --perf-stats # create utilization symlink pushd "$OUT" >/dev/null desc="$(grep -r "utilization: ${u}" .)"