From 43cfca676bc0daa49dc504a0b19525ea29845136 Mon Sep 17 00:00:00 2001 From: Jim Harris Date: Fri, 26 Apr 2019 02:51:11 -0700 Subject: [PATCH] test/rocksdb: add tracing This will help collect evidence for the intermittent RocksDB failures seen in the test pool. The method for getting the name of the /dev/shm trace file is pretty kludgy (grepping the log) but it's the best I could come up with and is very simple. Good enough for now. Signed-off-by: Jim Harris Change-Id: I7b3acbcb54033555ff42b3b21a09c798a87c481b Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/452263 Tested-by: SPDK CI Jenkins Reviewed-by: Ben Walker Reviewed-by: Shuhei Matsumoto Reviewed-by: Darek Stojaczyk --- test/blobfs/rocksdb/rocksdb.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/blobfs/rocksdb/rocksdb.sh b/test/blobfs/rocksdb/rocksdb.sh index dcd71ab742..a351f6c322 100755 --- a/test/blobfs/rocksdb/rocksdb.sh +++ b/test/blobfs/rocksdb/rocksdb.sh @@ -19,6 +19,10 @@ run_step() { # LSAN_OPTIONS. export LSAN_OPTIONS="suppressions=$testdir/lsan_suppressions.txt" /usr/bin/time taskset 0xFF $DB_BENCH --flagfile="$1"_flags.txt &> "$1"_db_bench.txt + DB_BENCH_FILE=$(grep /dev/shm "$1"_db_bench.txt | cut -f 6 -d ' ') + gzip $DB_BENCH_FILE + mv $DB_BENCH_FILE.gz "$1"_trace.gz + chmod 644 "$1"_trace.gz echo done. } @@ -54,6 +58,9 @@ popd timing_exit db_bench_build $rootdir/scripts/gen_nvme.sh > $ROCKSDB_CONF +# 0x80 is the bit mask for BlobFS tracepoints +echo "[Global]" >> $ROCKSDB_CONF +echo "TpointGroupMask 0x80" >> $ROCKSDB_CONF trap 'run_bsdump; rm -f $ROCKSDB_CONF; exit 1' SIGINT SIGTERM EXIT