tools/aubdump: Add --device option for overriding device ID

This lets us capture AUB traces for platforms different from the one
we're running on.

Signed-off-by: Kristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
This commit is contained in:
Kristian Høgsberg Kristensen
2015-08-04 15:00:50 -07:00
parent f47bdba8b0
commit 220c7d1f91
3 changed files with 40 additions and 7 deletions
+8 -1
View File
@@ -10,6 +10,8 @@ contents and execution of the GEM application.
-o, --output=FILE Name of AUB file. Defaults to COMMAND.aub
--device=ID Override PCI ID of the reported device
-v Enable verbose output
--help Display this help message and exit
@@ -20,6 +22,7 @@ EOF
}
verbose=0
device=0
while true; do
case "$1" in
@@ -39,6 +42,10 @@ while true; do
file=${1##--output=}
shift
;;
--device=*)
device=${1##--device=}
shift
;;
--help)
show_help
;;
@@ -66,5 +73,5 @@ exec_prefix=@exec_prefix@
libdir=@libdir@
LD_PRELOAD=${libdir}/intel_aubdump.so${LD_PPRELOAD:+:${LD_PRELOAD}} \
INTEL_AUBDUMP_ARGS="verbose=$verbose;file=$file" \
INTEL_AUBDUMP_ARGS="verbose=$verbose;file=$file;device=$device" \
exec -- "$@"