Run COMMAND with ARGUMENTS and dump an AUB file that captures buffer
contents and execution of the GEM application.
- -g, --gdb Launch GDB
+ -g, --gdb Launch GDB
- -o, --output=FILE Name of AUB file. Defaults to COMMAND.aub
+ -o, --output=FILE Name of AUB file. Defaults to COMMAND.aub
- --device=ID Override PCI ID of the reported device
+ --device=ID Override PCI ID of the reported device
- -v Enable verbose output
+ -p, --platform=NAME Override PCI ID using a platform name
- -vv Enable extra verbosity - dumps gtt mappings
+ -c, --only-capture Only write objects flagged with EXEC_OBJECT_CAPTURE into
+ the output aub file. This helps reducing output file
+ size greatly but won't produce a file replayable
- --help Display this help message and exit
+ -f, --frame=ID Only dump objects for frame ID
+
+ -v Enable verbose output
+
+ -vv Enable extra verbosity - dumps gtt mappings
+
+ --help Display this help message and exit
EOF
exit 0
}
-ld_preload="@install_libexecdir@/libintel_dump_gpu.so${LD_PPRELOAD:+:$LD_PRELOAD}"
+ld_preload="@install_libexecdir@/libintel_dump_gpu.so${LD_PRELOAD:+:$LD_PRELOAD}"
args=""
file=""
gdb=""
+capture_only=""
+frame=""
function add_arg() {
arg=$1
add_arg "device=${1##--device=}"
shift
;;
+ -p)
+ platform=$2
+ add_arg "platform=${platform}"
+ shift 2
+ ;;
+ -p*)
+ platform=${1##-p}
+ add_arg "platform=${platform}"
+ shift
+ ;;
+ --platform=*)
+ platform=${1##--platform=}
+ add_arg "platform=${platform}"
+ shift
+ ;;
+ -f)
+ frame=$2
+ add_arg "frame=${frame}"
+ shift 2
+ ;;
+ -f*)
+ frame=${1##-f}
+ add_arg "frame=${frame}"
+ shift
+ ;;
+ --frame=*)
+ frame=${1##--frame=}
+ add_arg "frame=${frame}"
+ shift
+ ;;
--gdb)
gdb=1
shift
gdb=1
shift
;;
+ -c)
+ add_arg "capture_only=1"
+ shift
+ ;;
+ --only-capture)
+ add_arg "capture_only=1"
+ shift
+ ;;
--help)
show_help
;;
echo -e $args > $tmp_file
if [ -z $gdb ]; then
- LD_PRELOAD="$ld_preload" INTEL_DUMP_GPU_CONFIG=$tmp_file $@
+ LD_PRELOAD="$ld_preload" INTEL_DUMP_GPU_CONFIG=$tmp_file "$@"
else
- gdb -iex "set exec-wrapper env LD_PRELOAD=$ld_preload INTEL_DUMP_GPU_CONFIG=$tmp_file" --args $@
+ gdb -iex "set exec-wrapper env LD_PRELOAD=$ld_preload INTEL_DUMP_GPU_CONFIG=$tmp_file" --args "$@"
fi
ret=$?