- if test "$verbose" != "t"; then exec 4>test.output 3>&4; fi
- if ! eval >&3 "/usr/bin/time -f '%e\t%U\t%S\t%M\t%I/%O' $2" ; then
+ if test "$verbose" != "t"; then exec 4>test.output 3>&4; else exec 3>&1; fi
+ if [[ "$use_perf" = 1 ]]; then
+ command_str="perf record --call-graph=${perf_callgraph} -o ${log_dir}/${test_count}.perf $2"
+ else
+ command_str="/usr/bin/time -f '%e\t%U\t%S\t%M\t%I/%O' $2"
+ fi
+
+ if ! eval >&3 "$command_str" ; then