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 <james.r.harris@intel.com>
Change-Id: I7b3acbcb54033555ff42b3b21a09c798a87c481b

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/452263
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
This commit is contained in:
Jim Harris 2019-04-26 02:51:11 -07:00 committed by Darek Stojaczyk
parent 90586a7dca
commit 43cfca676b

View File

@ -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