diff --git a/configs/5.15.79-peter.sh b/configs/5.15.79-peter.sh
index 368fdaadba0193b3755b7d130d691c962f3ab2ed..b648d84594e7a3194514eef074b52834293a39e4 100644
--- a/configs/5.15.79-peter.sh
+++ b/configs/5.15.79-peter.sh
@@ -2,4 +2,5 @@ IS_CUSTOM_KERNEL=true
 KERNEL_SRC=/home/p5cai/workspace/linux
 CPUPOWER=$KERNEL_SRC/tools/power/cpupower/cpupower
 X86_ENERGY_PERF_POLICY=$KERNEL_SRC/tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy
+PERF=$KERNEL_SRC/tools/perf/perf
 export LD_LIBRARY_PATH="$LD_LIBRARY_PATH":"$KERNEL_SRC/tools/power/cpupower"
diff --git a/configs/base.sh b/configs/base.sh
index 6a561c05a2e98ee6200d8e74ccf27f602eab37cf..f4b94834674c2839e6052461222072eaf8c6b698 100644
--- a/configs/base.sh
+++ b/configs/base.sh
@@ -1,6 +1,7 @@
 IS_CUSTOM_KERNEL=false
 CPUPOWER=cpupower
 X86_ENERGY_PERF_POLICY=x86_energy_perf_policy
+PERF=perf
 
 # Execute all SSH commands under this user
 # so that we don't need ssh keys for root
diff --git a/experiments/memcached.shared.sh b/experiments/memcached.shared.sh
index 94dfe24d2bf38162f1b7f94ed99a6b9c445af8ff..e6cd0e5215865dbc66040a36dcecf144b115af07 100644
--- a/experiments/memcached.shared.sh
+++ b/experiments/memcached.shared.sh
@@ -1,3 +1,5 @@
+source "$EXP_ROOT/experiments/perf.shared.sh"
+
 CONNS=160 # per agent thread
 
 load_config() {
@@ -37,7 +39,9 @@ warmup() {
 
 run_mutilate() {
     echo "Running mutilate with $CONNS connections per agent (core) and QPS = $QPS"
+    perf_stat_start "$1"
     sudo -u $SSH_USER $MUTILATE --noload -c$CONNS $MUTCLIENTS -t30 -u 0 -q $QPS | tee $DATA_OUT/$1.txt
+    perf_stat_stop
 }
 
 memcached_pre_start() {
diff --git a/experiments/perf.shared.sh b/experiments/perf.shared.sh
new file mode 100644
index 0000000000000000000000000000000000000000..db84939e8e284bc1717f89258c02256795a1d44c
--- /dev/null
+++ b/experiments/perf.shared.sh
@@ -0,0 +1,8 @@
+perf_stat_start() {
+    $PERF stat -C 0-$((THREADS - 1)) -e LLC-load-misses:u,LLC-load-misses:k,mem_load_uops_retired.llc_miss,mem_uops_retired.all_loads,cycles,cycles:u,cycles:k,instructions,instructions:u,instructions:k,stalled-cycles-frontend,stalled-cycles-backend -o "$DATA_OUT/stat_$1.txt" &
+    PERF_STAT_PID=$!
+}
+
+perf_stat_stop() {
+    kill -INT "$PERF_STAT_PID" || true
+}