Skip to content
Snippets Groups Projects
Commit 076a82d0 authored by Peter Cai's avatar Peter Cai
Browse files

Have perf stat print out deltas per 5 seconds during single runs

This gives us better numbers than the hard-coded 15-second delay
parent 45a47991
No related branches found
No related tags found
No related merge requests found
perf_stat_start() { perf_stat_start() {
local opt_args="" local opt_args=""
if [ "$PERF_STAT_NO_CORES" != "true" ]; then if [ "$PERF_STAT_NO_CORES" != "true" ]; then
opt_args="$opt_args -C $FIRST_CPU-$((FIRST_CPU + THREADS - 1))" opt_args="$opt_args -C $FIRST_CPU-$((FIRST_CPU + THREADS - 1))"
fi
if [ "$PERF_STAT_DELTA" == "true" ]; then
opt_args="$opt_args -I 5000"
fi fi
$PERF stat $PERF_EXTRA_ARGS $opt_args -e LLC-load-misses:u,LLC-load-misses:k,LLC-loads:u,LLC-loads:k,LLC-store-misses:u,LLC-store-misses:k,LLC-stores:u,LLC-stores:k,task-clock,cycles:u,cycles:k,instructions:u,instructions:k -o "$DATA_OUT/stat_$1$EXP_AUX_SUFFIX.txt" & $PERF stat $PERF_EXTRA_ARGS $opt_args -e LLC-load-misses:u,LLC-load-misses:k,LLC-loads:u,LLC-loads:k,LLC-store-misses:u,LLC-store-misses:k,LLC-stores:u,LLC-stores:k,task-clock,cycles:u,cycles:k,instructions:u,instructions:k -o "$DATA_OUT/stat_$1$EXP_AUX_SUFFIX.txt" &
PERF_STAT_PID=$! PERF_STAT_PID=$!
...@@ -14,7 +17,7 @@ perf_stat_stop() { ...@@ -14,7 +17,7 @@ perf_stat_stop() {
perf_record_start() { perf_record_start() {
local opt_args="" local opt_args=""
if [ "$PERF_STAT_NO_CORES" != "true" ]; then if [ "$PERF_STAT_NO_CORES" != "true" ]; then
opt_args="$opt_args -C $FIRST_CPU-$((FIRST_CPU + THREADS - 1))" opt_args="$opt_args -C $FIRST_CPU-$((FIRST_CPU + THREADS - 1))"
fi fi
pushd "$DATA_OUT" pushd "$DATA_OUT"
......
...@@ -76,7 +76,6 @@ memcached_pre_start() { ...@@ -76,7 +76,6 @@ memcached_pre_start() {
if [ "$FSTACK" == "true" ]; then if [ "$FSTACK" == "true" ]; then
MEMCACHED="$MEMCACHED_FSTACK" MEMCACHED="$MEMCACHED_FSTACK"
PERF_EXTRA_ARGS="-D 15000" # Account for S-Stack connection establishment delay
elif [ "$CALADAN" == "true" ]; then elif [ "$CALADAN" == "true" ]; then
MEMCACHED="$MEMCACHED_CALADAN" MEMCACHED="$MEMCACHED_CALADAN"
MEMCACHED_ARGS="$MEMCACHED_ARGS $CALADAN_CONFIG -p 11211" MEMCACHED_ARGS="$MEMCACHED_ARGS $CALADAN_CONFIG -p 11211"
......
...@@ -3,6 +3,8 @@ source "$EXP_ROOT/experiments/memcached.shared.sh" ...@@ -3,6 +3,8 @@ source "$EXP_ROOT/experiments/memcached.shared.sh"
pre_start() { pre_start() {
memcached_pre_start memcached_pre_start
EXPERIMENT_NAME_EXT="t$THREADS" EXPERIMENT_NAME_EXT="t$THREADS"
# 5-second interval delta for perf stat, so that we can manually subtract startup phases
PERF_STAT_DELTA=true
while [ ! -z "$1" ]; do while [ ! -z "$1" ]; do
case "$1" in case "$1" in
......
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