Skip to content

Commit

Permalink
add run script
Browse files Browse the repository at this point in the history
  • Loading branch information
EIRNf committed Apr 24, 2023
1 parent a464db3 commit 0b35c9c
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions scarab_run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/bash
set -eEuxo pipefail

SCARAB_DIR=/home/estebanramos/projects/scarab
DEFAULT_PARAMS_IN=${SCARAB_DIR}/src/PARAMS.kaby_lake

TRACE_NAME=$1;
echo "Trace Name: $TRACE_NAME";
TRACE_FILE=$2;
echo "Trace File: $TRACE_FILE";
TRACE_RAW_DIR=$3
echo "Trace Raw Dir: $TRACE_RAW_DIR"
RUN_DIR="$(pwd)/runs/${TRACE_NAME}"
echo "Run Directory: $RUN_DIR";

EXTRA_ARGS="" # --decode_cycles 10 --map_cycles 10

mkdir -p "${RUN_DIR}"
cp "${DEFAULT_PARAMS_IN}" "${RUN_DIR}/PARAMS.in"
START_DIR=$(pwd)
cd "${RUN_DIR}"

# Run:
${SCARAB_DIR}/src/scarab \
--frontend memtrace \
--cbp_trace_r0=${TRACE_FILE} \
--memtrace_modules_log=${TRACE_RAW_DIR} \
${EXTRA_ARGS}

cd "${START_DIR}"

0 comments on commit 0b35c9c

Please sign in to comment.